


Public Types | |
| enum | RobotType { RCBOT_JEEP, RCBOT_TRUCK, WIREBOT, BEOBOT, SIMULATION } |
Public Member Functions | |
| BotControl (OptionManager &mgr, const std::string &descrName="Robot Controller", const std::string &tagName="BotControl", RobotType inBotType=SIMULATION) | |
| ~BotControl () | |
| Destructor. | |
| void | init () |
| Init process. | |
| float | getSpeed () |
| set the speed -1.0 (reverse) ... 1.0 (forward) | |
| bool | setSpeed (const float speedPos) |
| get the speed -1.0 ... 1.0 | |
| float | getSteering () |
| gets steering angle; input from -1.0 (full left) to 1.0 (full right) | |
| bool | setSteering (const float steeringPos) |
| sets steering angle; input from -1.0 (full left) to 1.0 (full right) | |
| Image< PixRGB< byte > > | getImageSensor (int i=0) |
| gets the image sensor i | |
| void | getImageSensorDims (short &w, short &h, int i=0) |
| Get image sersor dims. | |
| void | setInfo (const char *info, Point2D< int > trackLoc, Point2D< int > recLoc) |
| Added extra info to the display. | |
| int | getUserInput (Point2D< int > &loc) |
| Get user input from window. | |
| void | setDisplay (bool sd) |
| Set Display. | |
Protected Attributes | |
| nub::soft_ref< SC8000 > | sc8000 |
| sc8000 servo controller | |
| nub::soft_ref< SSC > | ssc |
| ssc servo controller | |
| nub::soft_ref< BeoChip > | bc |
| BeoChip controller. | |
| nub::soft_ref< InputFrameSeries > | ifs |
| XWinManaged * | xwin |
Definition at line 61 of file BotControl.H.
| BotControl::~BotControl | ( | ) |
Destructor.
Definition at line 106 of file BotControl.C.
gets the image sensor i
Definition at line 292 of file BotControl.C.
References Timer::getReset(), and Image< T >::initialized().
| void BotControl::getImageSensorDims | ( | short & | w, | |
| short & | h, | |||
| int | i = 0 | |||
| ) |
Get image sersor dims.
Definition at line 310 of file BotControl.C.
| float BotControl::getSpeed | ( | ) |
set the speed -1.0 (reverse) ... 1.0 (forward)
Reimplemented in BotControlServer_i.
Definition at line 200 of file BotControl.C.
| float BotControl::getSteering | ( | ) |
gets steering angle; input from -1.0 (full left) to 1.0 (full right)
Reimplemented in BotControlServer_i.
Definition at line 245 of file BotControl.C.
| int BotControl::getUserInput | ( | Point2D< int > & | loc | ) |
Get user input from window.
Definition at line 347 of file BotControl.C.
References XWinManaged::getLastKeyPress(), and XWinManaged::getLastMouseClick().
| void BotControl::init | ( | ) |
Init process.
Reimplemented in BotControlServer_i.
Definition at line 110 of file BotControl.C.
References bc, BeobotConfig::gearMinVal, BeobotConfig::gearServoNum, BeobotConfig::pwm0MaxVal, BeobotConfig::pwm0MinVal, BeobotConfig::pwm0NeutralVal, BeobotConfig::pwm1MaxVal, BeobotConfig::pwm1MinVal, BeobotConfig::pwm1NeutralVal, Timer::reset(), sc8000, BeobotConfig::speedServoNum, ssc, and BeobotConfig::steerServoNum.
| void BotControl::setDisplay | ( | bool | sd | ) |
Set Display.
Definition at line 93 of file BotControl.C.
Added extra info to the display.
Definition at line 317 of file BotControl.C.
| bool BotControl::setSpeed | ( | const float | speedPos | ) |
get the speed -1.0 ... 1.0
Reimplemented in BotControlServer_i.
Definition at line 221 of file BotControl.C.
| bool BotControl::setSteering | ( | const float | steeringPos | ) |
sets steering angle; input from -1.0 (full left) to 1.0 (full right)
Reimplemented in BotControlServer_i.
Definition at line 267 of file BotControl.C.
nub::soft_ref<BeoChip> BotControl::bc [protected] |
BeoChip controller.
Definition at line 105 of file BotControl.H.
Referenced by getSpeed(), getSteering(), init(), setSpeed(), and setSteering().
nub::soft_ref<SC8000> BotControl::sc8000 [protected] |
sc8000 servo controller
Definition at line 103 of file BotControl.H.
Referenced by getSpeed(), getSteering(), init(), setSpeed(), and setSteering().
nub::soft_ref<SSC> BotControl::ssc [protected] |
ssc servo controller
Definition at line 104 of file BotControl.H.
Referenced by init(), setSpeed(), and setSteering().
1.6.3