An object tracked by the roboid.
More...
#include <TrackedObject.h>
|
unsigned char | networkId |
|
unsigned char | id |
| The id of the tracked object.
|
|
char | parentId = 0 |
|
Spherical | position = Spherical::zero |
| The current position of the object.
|
|
Quaternion | orientation = Quaternion::identity |
| The current orientation of the object.
|
|
Sensor * | sensor = nullptr |
| The sensor which provided that lastet pose this object.
|
|
unsigned char | type = 0x00 |
|
unsigned char | confidence |
|
bool | updated = false |
|
|
static constexpr float | equalityDistance = 0.3F |
| The maximum difference in distance from the roboid in which two objects may be considered the same.
|
|
static constexpr float | equalityAngle = 5.0F |
| The maximum difference in angle from the roboids orientation in which two objects may be considered the same.
|
|
An object tracked by the roboid.
◆ InterestingThing() [1/2]
InterestingThing::InterestingThing |
( |
Sensor * |
sensor, |
|
|
Polar |
position |
|
) |
| |
An object tracked by the roboid.
- Parameters
-
sensor | The Sensor which detected this object |
position | The position in polar coordinates local to the roboid |
◆ InterestingThing() [2/2]
InterestingThing::InterestingThing |
( |
Sensor * |
sensor, |
|
|
Spherical |
position, |
|
|
Quaternion |
orientation = Quaternion::identity |
|
) |
| |
◆ Refresh() [1/2]
void InterestingThing::Refresh |
( |
Polar |
position | ) |
|
Update the position of the object.
- Parameters
-
position | The latest known position of the object |
This will also update the confidence of the object to the maxConfidence value
◆ Refresh() [2/2]
void InterestingThing::Refresh |
( |
Spherical |
position, |
|
|
Quaternion |
orientation = Quaternion::identity |
|
) |
| |
◆ DegradeConfidence()
bool InterestingThing::DegradeConfidence |
( |
float |
deltaTime | ) |
|
Decrease the confidence based on the elapsed time.
- Parameters
-
deltaTime | The time since the last DegradeConfidence call |
- Returns
- Returns false when the object's confidence has reached zero, true otherwise
When this function returns false, the object should no longer be tracked.
◆ IsTheSameAs()
Determine whether this object is the same as another object.
- Parameters
-
otherObj | The other object to compare to |
- Returns
- Returns true when both objects are considered the same The result of this check depends on the equalityDistance and equalityAngle value.
◆ equalityDistance
constexpr float Passer::RoboidControl::InterestingThing::equalityDistance = 0.3F |
|
staticconstexpr |
The maximum difference in distance from the roboid in which two objects may be considered the same.
When the difference in distance is exactly this value, the objects can be the same. With a value of 0.3, objects with coordinates position->distance = 1.2F and position->distance = 1.6 will be considered different, but objects with coordinates position->distance = 1.2 and position->distance = 1.0 can be the same.
◆ equalityAngle
constexpr float Passer::RoboidControl::InterestingThing::equalityAngle = 5.0F |
|
staticconstexpr |
The maximum difference in angle from the roboids orientation in which two objects may be considered the same.
When the difference in angle is exactly this value, the objects can be the same. With a value of 5.0, object with coordinates position->angle = 30 and position->angle = 36 will be considered different, but object with coordinated position->angle = 30 and position->angle = 27 can be the same.
◆ networkId
unsigned char Passer::RoboidControl::InterestingThing::networkId |
◆ id
unsigned char Passer::RoboidControl::InterestingThing::id |
The id of the tracked object.
◆ parentId
char Passer::RoboidControl::InterestingThing::parentId = 0 |
◆ position
Spherical Passer::RoboidControl::InterestingThing::position = Spherical::zero |
The current position of the object.
◆ orientation
Quaternion Passer::RoboidControl::InterestingThing::orientation = Quaternion::identity |
The current orientation of the object.
◆ sensor
Sensor* Passer::RoboidControl::InterestingThing::sensor = nullptr |
The sensor which provided that lastet pose this object.
◆ type
unsigned char Passer::RoboidControl::InterestingThing::type = 0x00 |
◆ confidence
unsigned char Passer::RoboidControl::InterestingThing::confidence |
◆ updated
bool Passer::RoboidControl::InterestingThing::updated = false |
◆ maxConfidence
constexpr unsigned char Passer::RoboidControl::InterestingThing::maxConfidence = 255 |
|
staticconstexprprotected |
◆ confidenceDropSpeed
constexpr unsigned char Passer::RoboidControl::InterestingThing::confidenceDropSpeed = 10 |
|
staticconstexprprotected |
The documentation for this class was generated from the following files: