Roomba Class Reference

Inheritance diagram for Roomba:
Inheritance graph
[legend]
Collaboration diagram for Roomba:
Collaboration graph
[legend]

List of all members.

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< SerialitsPort
 robot start status must be true to send commands

Detailed Description

Definition at line 47 of file Roomba.H.


Constructor & Destructor Documentation

Roomba::Roomba ( OptionManager mgr,
const std::string descrName = "Roomba",
const std::string tagName = "Roomba",
const char *  defdev = "/dev/ttyUSB0" 
)

Default constructor.

Definition at line 49 of file Roomba.C.

References ModelComponent::addSubComponent(), itsAngle, itsDist, itsPort, and itsRadius.

Roomba::~Roomba (  ) 

Destructor.

Definition at line 66 of file Roomba.C.


Member Function Documentation

void Roomba::sendDirectDriveCommand ( float  steering  ) 

Send the command to direct drive the robot.

Definition at line 285 of file Roomba.C.

References itsPort.

void Roomba::sendDriveCommand (  ) 

Send the command to drive the robot.

Definition at line 116 of file Roomba.C.

References itsPort, itsRadius, and robotStarted.


Member Data Documentation

int Roomba::itsAngle [protected]

current turning radius set

Definition at line 83 of file Roomba.H.

Referenced by Roomba().

int Roomba::itsDist [protected]

total angle turned since start

Definition at line 84 of file Roomba.H.

Referenced by Roomba().

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().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:46 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3