BeoPilot Class Reference

#include <Robots/Beobot2/Hardware/BeoPilot.H>

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

List of all members.

Public Member Functions

 BeoPilot (int id, OptionManager &mgr, const std::string &descrName="BeoPilot", const std::string &tagName="BeoPilot")
virtual void evolve ()
virtual void updateMessage (const RobotSimEvents::EventMessagePtr &eMsg, const Ice::Current &)
 to publishes a message.
virtual void registerTopics ()
 and registerPublisher calls that you would like to happen automatically after init.
void checkLogFile ()
void loadFromLogFile ()
void start3 ()
void updateGUI ()
void SetMotors (float motor1speed, float motor2speed)
unsigned char getRCStatus ()
unsigned int getRCChannel (int channel)
unsigned char getRCEnabled ()
unsigned int getRCSpeed ()
void UpdateRCStatus ()
void resetEncoder ()
void UpdatePosition (void)
void getCurrentLogData (void)
void reDrawMap (double scale)
void drawAllMap (void)
int file_exists (const char *fileName)
void start ()
void SetMotors (float motor1speed, float motor2speed)
void SetMotorsPid (float motor1speed, float motor2speed)
unsigned char getRCStatus ()
unsigned int getRCChannel (int channel)
unsigned char getRCEnabled ()
unsigned int getRCSpeed ()
void UpdateRCStatus ()
void UpdatePosition (void)
void resetEncoder ()

Public Attributes

SerialitsSerial
ros::Time itsPreviousTime
Point3D itsPosition
Point3D itsDiffPosition
Point3D itsVelocity
control_toolbox::Pid itsPidSpeed
control_toolbox::Pid itsPidRot
ros::Duration dt

Detailed Description

The BeoPilot module is responsible for actually driving the BeoBot2. All motor requests are serviced to hardware by this module through MotorRequest messages.

Definition at line 99 of file BeoPilot.H.


Member Function Documentation

void BeoPilot::evolve (  )  [virtual]

Evolve keeps the motor driver propeller up to date on the latest motor speed requests. If the evolve loop ever hangs for more than 1/4 second, then the propeller will shut down the motors until it recieves a new message.

dev/ttyUSB0

Reimplemented from RobotBrainComponent.

Definition at line 254 of file BeoPilot.C.

References Timer::get(), Timer::getSecs(), OModelParam< T >::getVal(), Timer::pause(), RobotBrainComponent::publish(), Timer::reset(), Timer::resume(), and PID< T >::update().

void BeoPilot::loadFromLogFile (  ) 

Check the serial port to ensure that we are connected to a 'motorboard' propeller, and also check the sanity of our command line options

Definition at line 163 of file BeoPilot.C.

References OModelParam< T >::getVal(), and Timer::reset().

void BeoPilot::registerTopics (  )  [virtual]

and registerPublisher calls that you would like to happen automatically after init.

Register Topics: This function is called at the end of init, and is virtual so that is can be overloaded by chid classes. In your overloaded version you should put all of the registerSubsciption

Reimplemented from RobotBrainComponent.

Definition at line 246 of file BeoPilot.C.

References RobotBrainComponent::registerPublisher(), and RobotBrainComponent::registerSubscription().

void BeoPilot::start (  ) 

Evolve keeps the motor driver propeller up to date on the latest motor speed requests. If the evolve loop ever hangs for more than 1/4 second, then the propeller will shut down the motors until it recieves a new message.

Reimplemented from ModelComponent.

Definition at line 22 of file BeoPilot.C.

void BeoPilot::start3 (  )  [virtual]

start3: Gets called immediately after start2, which is after all of the subcomponents have been started. If you have any code that needs to run only once at the beginning before the general run/evolve loop, but after the constructor, then you can put it here.

Reimplemented from RobotBrainComponent.

Definition at line 221 of file BeoPilot.C.

References OModelParam< T >::getVal().

void BeoPilot::updateMessage ( const RobotSimEvents::EventMessagePtr &  eMsg,
const Ice::Current &   
) [virtual]

to publishes a message.

Update Message: Gets called by the Ice runtime when a publisher of a message that your object subscribes

Reimplemented from RobotBrainComponent.

Definition at line 1020 of file BeoPilot.C.

References Timer::reset().


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