diff --git a/NetworkPerception.cpp b/NetworkPerception.cpp index 0ead299..3fbf571 100644 --- a/NetworkPerception.cpp +++ b/NetworkPerception.cpp @@ -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); } diff --git a/Perception.cpp b/Perception.cpp index 461de59..fb3da07 100644 --- a/Perception.cpp +++ b/Perception.cpp @@ -196,12 +196,13 @@ bool Perception::ObjectNearby(float direction, float range) { // #include // 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; diff --git a/Perception.h b/Perception.h index 9aa7ba6..a46144b 100644 --- a/Perception.h +++ b/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,