Public Member Functions | |
Roomba (OptionManager &mgr, const std::string &descrName="Roomba", const std::string &tagName="Roomba", const char *defdev="/dev/ttyUSB0") | |
Default constructor. | |
~Roomba () | |
Destructor. | |
int | getSpeed () |
int | getAngle () |
int | getRadius () |
int | getDist () |
void | setSpeed (const int speed) |
void | setRadius (const int radius) |
void | sendRawCmd (const std::string &data) |
void | playSong (int song) |
void | sendStart () |
void | setMode (const int mode) |
void | setDemo (const short demo) |
void | setLED (const short led, const short color, const short intensity) |
void | getDistanceAngle (int &dist, int &ang) |
void | sendDriveCommand () |
Send the command to drive the robot. | |
void | sendDirectDriveCommand (float steering) |
Send the command to direct drive the robot. | |
Protected Attributes | |
int | itsSpeed |
int | itsRadius |
current speed | |
int | itsAngle |
current turning radius set | |
int | itsDist |
total angle turned since start | |
bool | robotStarted |
total dist travelled since start | |
nub::soft_ref< Serial > | itsPort |
robot start status must be true to send commands |
Definition at line 47 of file Roomba.H.
Roomba::Roomba | ( | OptionManager & | mgr, | |
const std::string & | descrName = "Roomba" , |
|||
const std::string & | tagName = "Roomba" , |
|||
const char * | defdev = "/dev/ttyUSB0" | |||
) |
void Roomba::sendDirectDriveCommand | ( | float | steering | ) |
void Roomba::sendDriveCommand | ( | ) |
Send the command to drive the robot.
Definition at line 116 of file Roomba.C.
References itsPort, itsRadius, and robotStarted.
int Roomba::itsAngle [protected] |
int Roomba::itsDist [protected] |
nub::soft_ref<Serial> Roomba::itsPort [protected] |
robot start status must be true to send commands
Definition at line 86 of file Roomba.H.
Referenced by Roomba(), sendDirectDriveCommand(), and sendDriveCommand().
int Roomba::itsRadius [protected] |
current speed
Definition at line 82 of file Roomba.H.
Referenced by Roomba(), and sendDriveCommand().
bool Roomba::robotStarted [protected] |
total dist travelled since start
Definition at line 85 of file Roomba.H.
Referenced by sendDriveCommand().