RoboidControl
Loading...
Searching...
No Matches
d:/PlatformIO/RoboidControl/TrackedObject.h
Go to the documentation of this file.
1#pragma once
2
6#include "Sensor.h"
7
8namespace Passer {
9namespace RoboidControl {
10
13public:
19 Quaternion orientation = Quaternion::identity);
20
25 void Refresh(Polar position);
26 void Refresh(Spherical position,
27 Quaternion orientation = Quaternion::identity);
28
35 bool DegradeConfidence(float deltaTime);
36
42 bool IsTheSameAs(InterestingThing *otherObj);
51 static constexpr float equalityDistance = 0.3F;
59 static constexpr float equalityAngle = 5.0F;
60
61 unsigned char networkId;
63 unsigned char id;
64
65 char parentId = 0;
67 Spherical position = Spherical::zero;
69 Quaternion orientation = Quaternion::identity;
71 Sensor *sensor = nullptr;
72
73 unsigned char type = 0x00;
74 unsigned char confidence;
75 bool updated = false;
76
77protected:
78 static constexpr unsigned char maxConfidence = 255;
79 static constexpr unsigned char confidenceDropSpeed = 10; // 150; // 2;
80};
81
82} // namespace RoboidControl
83} // namespace Passer
An object tracked by the roboid.
Definition TrackedObject.h:12
bool updated
Definition TrackedObject.h:75
Sensor * sensor
The sensor which provided that lastet pose this object.
Definition TrackedObject.h:71
Spherical position
The current position of the object.
Definition TrackedObject.h:67
static constexpr float equalityAngle
The maximum difference in angle from the roboids orientation in which two objects may be considered t...
Definition TrackedObject.h:59
bool IsTheSameAs(InterestingThing *otherObj)
Determine whether this object is the same as another object.
Definition TrackedObject.cpp:24
bool DegradeConfidence(float deltaTime)
Decrease the confidence based on the elapsed time.
Definition TrackedObject.cpp:53
unsigned char confidence
Definition TrackedObject.h:74
static constexpr unsigned char maxConfidence
Definition TrackedObject.h:78
static constexpr float equalityDistance
The maximum difference in distance from the roboid in which two objects may be considered the same.
Definition TrackedObject.h:51
Quaternion orientation
The current orientation of the object.
Definition TrackedObject.h:69
unsigned char id
The id of the tracked object.
Definition TrackedObject.h:63
unsigned char networkId
Definition TrackedObject.h:61
static constexpr unsigned char confidenceDropSpeed
Definition TrackedObject.h:79
unsigned char type
Definition TrackedObject.h:73
void Refresh(Polar position)
Update the position of the object.
Definition TrackedObject.cpp:70
char parentId
Definition TrackedObject.h:65
A sensor is a thing which can perform measurements in the environment.
Definition Sensor.h:9
Definition AbsoluteEncoder.h:5