7namespace RoboidControl {
18 template <
unsigned int sensorCount>
104 bool SwitchOn(
float fromAngle,
float toAngle);
Module to which keeps track of objects around the roboid.
Definition Perception.h:10
unsigned int sensorCount
The number of Sensors used for Perception.
Definition Perception.h:110
float DistanceForward(float direction=90)
Distance to the closest object on the front of the Roboid.
Definition Perception.cpp:28
Sensor * GetSensor(unsigned int sensorIx)
Get a specific Sensor on the Roboid.
Definition Perception.cpp:17
Placement * sensorPlacements
The Placement of the Sensors used for Perception.
Definition Perception.h:108
unsigned int GetSensorCount()
Get the number of Sensors.
Definition Perception.cpp:13
float DistanceUp()
Distance to the closest object above the Roboid.
Definition Perception.h:80
Perception(Placement(&sensors)[sensorCount])
Template to make it possible to leave out ths sensorCount.
Definition Perception.h:19
Perception()
Default Constructor.
Definition Perception.cpp:6
float DistanceRight()
Distance to the closest object on the right.
Definition Perception.h:68
bool SwitchOn(float fromAngle, float toAngle)
Checks if an object is close within the give range in the horizontal plane.
Definition Perception.cpp:115
Placement * GetSensorPlacement(unsigned int sensorIx)
Get the placement of a specific Sensor.
float DistanceLeft()
Distance to the closest object on the left.
Definition Perception.h:53
float DistanceDown()
Disatnce to the closest object under the Roboid.
Definition Perception.h:89
A plament is used to specify where a Thing is placed on the Roboid.
Definition Placement.h:38
A sensor is a thing which can perform measurements in the environment.
Definition Sensor.h:9