gusimplewhiteboard
|
Contains the latest Sonar readings. More...
#include <SENSORSSonarSensors.hpp>
Public Member Functions | |
SENSORSSonarSensors () | |
bool | operator== (const SENSORSSonarSensors &s) |
comparison operator More... | |
bool | operator!= (const SENSORSSonarSensors &s) |
compare two sonar sensor value records and return false if they are the same More... | |
SENSORSSonarSensors (const std::string &str) | |
string constructor (see from_string() below) More... | |
void | from_string (const std::string &str) |
parse class properties from a string More... | |
std::string | description () const |
pretty print method for showing the current property values More... | |
Contains the latest Sonar readings.
Measured in CM, Range is 0-255, Updated at 10Hz (currently, max of 100Hz). Object nearer than 20cm to a Nao will report a distance of 20cm.
Get the distance in cm to the nearest object on the left
SENSORSSonarSensors s = SENSORSSonarSensors_t.get(); //get from the whiteboard int dist = s.sonar(Sonar::Left0); //pull the variable out of the class
Definition at line 119 of file SENSORSSonarSensors.hpp.
|
inline |
Definition at line 123 of file SENSORSSonarSensors.hpp.
|
inline |
string constructor (see from_string() below)
str | a serialised string containing properties to set in this class |
Definition at line 151 of file SENSORSSonarSensors.hpp.
References from_string().
|
inline |
pretty print method for showing the current property values
Definition at line 172 of file SENSORSSonarSensors.hpp.
References guWhiteboard::Sonar::NUMBER_OF_READINGS.
|
inline |
parse class properties from a string
str | a serialised string containing properties to set in this class |
Definition at line 156 of file SENSORSSonarSensors.hpp.
References guWhiteboard::Sonar::NUMBER_OF_READINGS, and u_int8_t.
Referenced by SENSORSSonarSensors().
|
inline |
compare two sonar sensor value records and return false if they are the same
Definition at line 142 of file SENSORSSonarSensors.hpp.
|
inline |
comparison operator
Definition at line 129 of file SENSORSSonarSensors.hpp.
References guWhiteboard::Sonar::Left0, and guWhiteboard::Sonar::NUMBER_OF_READINGS.