RoboidControl
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes | List of all members
Passer::RoboidControl::InterestingThing Class Reference

An object tracked by the roboid. More...

#include <TrackedObject.h>

Public Member Functions

 InterestingThing (Sensor *sensor, Polar position)
 An object tracked by the roboid.
 
 InterestingThing (Sensor *sensor, Spherical position, Quaternion orientation=Quaternion::identity)
 
void Refresh (Polar position)
 Update the position of the object.
 
void Refresh (Spherical position, Quaternion orientation=Quaternion::identity)
 
bool DegradeConfidence (float deltaTime)
 Decrease the confidence based on the elapsed time.
 
bool IsTheSameAs (InterestingThing *otherObj)
 Determine whether this object is the same as another object.
 

Public Attributes

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.
 
Sensorsensor = nullptr
 The sensor which provided that lastet pose this object.
 
unsigned char type = 0x00
 
unsigned char confidence
 
bool updated = false
 

Static Public Attributes

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.
 

Static Protected Attributes

static constexpr unsigned char maxConfidence = 255
 
static constexpr unsigned char confidenceDropSpeed = 10
 

Detailed Description

An object tracked by the roboid.

Constructor & Destructor Documentation

◆ InterestingThing() [1/2]

InterestingThing::InterestingThing ( Sensor sensor,
Polar  position 
)

An object tracked by the roboid.

Parameters
sensorThe Sensor which detected this object
positionThe position in polar coordinates local to the roboid

◆ InterestingThing() [2/2]

InterestingThing::InterestingThing ( Sensor sensor,
Spherical  position,
Quaternion  orientation = Quaternion::identity 
)

Member Function Documentation

◆ Refresh() [1/2]

void InterestingThing::Refresh ( Polar  position)

Update the position of the object.

Parameters
positionThe 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
deltaTimeThe 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()

bool InterestingThing::IsTheSameAs ( InterestingThing otherObj)

Determine whether this object is the same as another object.

Parameters
otherObjThe 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.

Member Data Documentation

◆ 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: