Merged changes
This commit is contained in:
parent
86a795dd81
commit
b2adaac890
@ -105,8 +105,8 @@ void NetworkPerception::ReceivePlane(unsigned char* data, Roboid* roboid) {
|
||||
// worldPosition.y, worldPosition.z, roboidPosition.x,
|
||||
// roboidPosition.y, roboidPosition.z, position.distance,
|
||||
// (float)position.horizontalAngle, (float)position.verticalAngle);
|
||||
printf("Received plane %f (%f %f)\n", position.distance,
|
||||
position.horizontal.ToFloat(), position.vertical.ToFloat());
|
||||
// printf("Received plane %f (%f %f)\n", position.distance,
|
||||
// (float)position.horizontalAngle, (float)position.verticalAngle);
|
||||
roboid->perception->AddTrackedObject(this, position, Quaternion::identity,
|
||||
0x80, 0x80, networkId);
|
||||
}
|
||||
|
@ -196,12 +196,13 @@ bool Perception::ObjectNearby(float direction, float range) {
|
||||
|
||||
// #include <WifiSync.h>
|
||||
// This function is deprecated
|
||||
/*
|
||||
void Perception::AddTrackedObject(Sensor* sensor,
|
||||
Polar position,
|
||||
Spherical16 position,
|
||||
unsigned char thingType,
|
||||
unsigned char networkId) {
|
||||
Spherical16 sPos =
|
||||
Spherical16(position.distance, Angle16(position.angle.ToFloat()), 0);
|
||||
// Spherical16 sPos =
|
||||
// Spherical16(position.distance, Angle16(position.angle.ToFloat()), 0);
|
||||
Quaternion orientation = Quaternion::identity;
|
||||
AddTrackedObject(sensor, sPos, orientation, 0x00, thingType, networkId);
|
||||
/*
|
||||
@ -277,15 +278,15 @@ void Perception::AddTrackedObject(Sensor* sensor,
|
||||
// No available slot, delete trackedobject
|
||||
delete obj;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
InterestingThing* Perception::AddTrackedObject(Sensor* sensor,
|
||||
Spherical16 position,
|
||||
Quaternion orientation,
|
||||
unsigned char thingType,
|
||||
unsigned char thingId,
|
||||
unsigned networkId) {
|
||||
unsigned char networkId) {
|
||||
InterestingThing* thing = new InterestingThing(sensor, position, orientation);
|
||||
if (thingId != 0x00)
|
||||
thing->id = thingId;
|
||||
|
10
Perception.h
10
Perception.h
@ -89,17 +89,17 @@ class Perception {
|
||||
/// @param sensor The sensor which has detected the object
|
||||
/// @param position The position of the sensor in polar coordinates local to
|
||||
/// the roboid
|
||||
void AddTrackedObject(Sensor* sensor,
|
||||
Polar position,
|
||||
unsigned char objectType = 0xFF,
|
||||
unsigned char networkId = 0x00);
|
||||
// void AddTrackedObject(Sensor* sensor,
|
||||
// Spherical16 position,
|
||||
// unsigned char objectType = 0x00,
|
||||
// unsigned char networkId = 0x00);
|
||||
InterestingThing* AddTrackedObject(
|
||||
Sensor* sensor,
|
||||
Spherical16 position,
|
||||
Quaternion orientation = Quaternion::identity,
|
||||
unsigned char objectType = 0xFF,
|
||||
unsigned char objectId = 0x00,
|
||||
unsigned networkId = 0x00);
|
||||
unsigned char networkId = 0x00);
|
||||
|
||||
InterestingThing* AddTrackedObject(
|
||||
Sensor* sensor,
|
||||
|
Loading…
x
Reference in New Issue
Block a user