This namespace groups typedefs and enums used in the rs::RangeSensor class and the rs::RangeSensor class itself. More...
Classes | |
class | RangeSensor |
The rs::RangeSensor class simulates different range finder sensors based on the given rs::SensorType enumerator. More... | |
Typedefs | |
typedef std::shared_ptr< std::vector< float > > | rangeArray_ptr |
shortcut for a pointer to a vector of floats representing range readings in meters. More... | |
Enumerations | |
enum | SensorType { laser, us } |
Enumerator for supported sensor types. More... | |
Functions | |
double | correctYawAngle (const double theta, const double increment) |
Calculate a correct euler angle after incrementing/decrementing. More... | |
double | degToRad (double angle) |
Conversion from degrees to radiants. More... | |
double | radToDeg (double angle) |
Conversion from radiants to degrees. More... | |
const int | sgn (const int x) |
Get the sign of an interger. More... | |
This namespace groups typedefs and enums used in the rs::RangeSensor class and the rs::RangeSensor class itself.
shortcut for a pointer to a vector of floats representing range readings in meters.
Definition at line 30 of file RangeSensor.h.
enum rs::SensorType |
Enumerator for supported sensor types.
Enumerator | |
---|---|
laser |
enum of laser sensor type |
us |
enum of ultra sensonic range sensor type |
Definition at line 35 of file RangeSensor.h.
double rs::correctYawAngle | ( | const double | theta, |
const double | increment | ||
) |
Calculate a correct euler angle after incrementing/decrementing.
Problem: Euler angles are not continous, they jump from 180deg to -180 deg. This function calculates new euler angles with respect to this particular behaviour.
[in] | theta | base angle in radiants to be incremented/decremented |
[in] | increment | amount of change to be applied to the theta value |
Definition at line 12 of file RangeSensor.cpp.
double rs::degToRad | ( | double | angle | ) |
Conversion from degrees to radiants.
[in] | angle | angle in degrees |
Definition at line 33 of file RangeSensor.cpp.
double rs::radToDeg | ( | double | angle | ) |
Conversion from radiants to degrees.
[in] | angle | angle in radiants |
Definition at line 35 of file RangeSensor.cpp.
const int rs::sgn | ( | const int | x | ) |
Get the sign of an interger.
[in] | x | input integer value |
Definition at line 31 of file RangeSensor.cpp.