Definition and access functions for the BeoSub. More...
#include <BeoSub/BeoSubTwoBal.H>
Public Member Functions | |
Constructors and Destructors | |
BeoSubTwoBal (OptionManager &mgr) | |
Constructor. | |
~BeoSubTwoBal () | |
Destructor. | |
Low-level access functions | |
void | thrust (const float leftval, const float rightval, const bool blocking=false) |
Activate the thrusters. | |
void | getThrusters (float &leftval, float &rightval) |
Get the current thruster settings. | |
void | setLFballast (const float val, const bool blocking=false) |
Set the left-front ballast. Value is between 0.0 (empty) and 1.0 (full). | |
void | setLRballast (const float val, const bool blocking=false) |
Set the left-rear ballast. Value is between 0.0 (empty) and 1.0 (full). | |
void | setRFballast (const float val, const bool blocking=false) |
Set the right-front ballast. Value is between 0.0 (empty) and 1.0 (full). | |
void | setRRballast (const float val, const bool blocking=false) |
Set the right-rear ballast. Value is between 0.0 (empty) and 1.0 (full). | |
void | setBallasts (const float lf, const float lr, const float rf, const float rr, const bool blocking=false) |
Set all ballasts. | |
float | getLFballast () |
Get the left-front ballast. Value is between 0.0 (empty) and 1.0 (full). | |
float | getLRballast () |
Get the left-rear ballast. Value is between 0.0 (empty) and 1.0 (full). | |
float | getRFballast () |
Get the right-front ballast. Value is between 0.0 (empty) and 1.0 (full). | |
float | getRRballast () |
Get the right-rear ballast. Value is between 0.0 (empty) and 1.0 (full). | |
void | getBallasts (float &lf, float &lr, float &rf, float &rr) |
Get all ballasts. | |
void | dropMarker (const bool blocking=false) |
Drop a marker. | |
Image< PixRGB< byte > > | grabImage (const enum BeoSubCamera cam) |
Grab a an image from one of the cameras. | |
Protected Member Functions | |
void | start1 () |
get started, before our subcomponents start | |
void | start2 () |
get started, after our subcomponents have started | |
Protected Attributes | |
NModelParam< int > | itsLeftThrusterServoNum |
servo num for left thruster | |
NModelParam< int > | itsRightThrusterServoNum |
servo num for right thruster | |
nub::soft_ref< HMR3300 > | itsHMR3300 |
compass for heading | |
nub::soft_ref< BeoChip > | itsBeoLeft |
nub::soft_ref< BeoChip > | itsBeoRight |
our left and rt beochips | |
rutz::shared_ptr< BeoSubListener > | itsBeoLisLeft |
rutz::shared_ptr< BeoSubListener > | itsBeoLisRight |
listeners | |
BeoSubSensor< float > | itsDepthSensor |
our depth sensor data | |
nub::soft_ref< BeoSubBallast > | itsLFballast |
nub::soft_ref< BeoSubBallast > | itsLRballast |
nub::soft_ref< BeoSubBallast > | itsRFballast |
nub::soft_ref< BeoSubBallast > | itsRRballast |
our 4 ballasts | |
nub::soft_ref< BeoSubIMU > | itsIMU |
our IMU | |
nub::soft_ref< IEEE1394grabber > | itsCameraFront |
nub::soft_ref< IEEE1394grabber > | itsCameraDown |
nub::soft_ref< IEEE1394grabber > | itsCameraUp |
our three cameras | |
float | itsThrustLeft |
float | itsThrustRight |
our current thruster settings | |
Friends | |
class | BeoSubListener |
Definition and access functions for the BeoSub.
BeoSub is an autonomous visually-guided submarine. This class impoements the highl-evel functionality, relying on low-level drivers to handle motor activation, compass reading, etc
Definition at line 60 of file BeoSubTwoBal.H.
BeoSubTwoBal::BeoSubTwoBal | ( | OptionManager & | mgr | ) |
Constructor.
Definition at line 80 of file BeoSubTwoBal.C.
References ModelComponent::addSubComponent(), itsBeoLisRight, itsBeoRight, itsCameraUp, itsHMR3300, itsIMU, itsRRballast, and MC_RECURSE.
BeoSubTwoBal::~BeoSubTwoBal | ( | ) |
Destructor.
Definition at line 156 of file BeoSubTwoBal.C.
void BeoSubTwoBal::dropMarker | ( | const bool | blocking = false |
) | [virtual] |
Drop a marker.
Implements BeoSub.
void BeoSubTwoBal::getBallasts | ( | float & | lf, | |
float & | lr, | |||
float & | rf, | |||
float & | rr | |||
) |
Get all ballasts.
float BeoSubTwoBal::getLFballast | ( | ) |
Get the left-front ballast. Value is between 0.0 (empty) and 1.0 (full).
float BeoSubTwoBal::getLRballast | ( | ) |
Get the left-rear ballast. Value is between 0.0 (empty) and 1.0 (full).
float BeoSubTwoBal::getRFballast | ( | ) |
Get the right-front ballast. Value is between 0.0 (empty) and 1.0 (full).
float BeoSubTwoBal::getRRballast | ( | ) |
Get the right-rear ballast. Value is between 0.0 (empty) and 1.0 (full).
void BeoSubTwoBal::getThrusters | ( | float & | leftval, | |
float & | rightval | |||
) |
Get the current thruster settings.
Definition at line 200 of file BeoSubTwoBal.C.
References itsThrustRight.
Image< PixRGB<byte> > BeoSubTwoBal::grabImage | ( | const enum BeoSubCamera | cam | ) |
Grab a an image from one of the cameras.
void BeoSubTwoBal::setBallasts | ( | const float | lf, | |
const float | lr, | |||
const float | rf, | |||
const float | rr, | |||
const bool | blocking = false | |||
) |
Set all ballasts.
Definition at line 220 of file BeoSubTwoBal.C.
References itsRRballast.
Referenced by start2().
void BeoSubTwoBal::setLFballast | ( | const float | val, | |
const bool | blocking = false | |||
) |
Set the left-front ballast. Value is between 0.0 (empty) and 1.0 (full).
Definition at line 204 of file BeoSubTwoBal.C.
void BeoSubTwoBal::setLRballast | ( | const float | val, | |
const bool | blocking = false | |||
) |
Set the left-rear ballast. Value is between 0.0 (empty) and 1.0 (full).
Definition at line 208 of file BeoSubTwoBal.C.
void BeoSubTwoBal::setRFballast | ( | const float | val, | |
const bool | blocking = false | |||
) |
Set the right-front ballast. Value is between 0.0 (empty) and 1.0 (full).
Definition at line 212 of file BeoSubTwoBal.C.
void BeoSubTwoBal::setRRballast | ( | const float | val, | |
const bool | blocking = false | |||
) |
Set the right-rear ballast. Value is between 0.0 (empty) and 1.0 (full).
Definition at line 216 of file BeoSubTwoBal.C.
References itsRRballast.
void BeoSubTwoBal::start1 | ( | ) | [protected, virtual] |
get started, before our subcomponents start
Reimplemented from BeoSub.
Definition at line 160 of file BeoSubTwoBal.C.
References itsCameraUp.
void BeoSubTwoBal::start2 | ( | ) | [protected, virtual] |
get started, after our subcomponents have started
Reimplemented from ModelComponent.
Definition at line 169 of file BeoSubTwoBal.C.
References itsBeoRight, and setBallasts().
void BeoSubTwoBal::thrust | ( | const float | leftval, | |
const float | rightval, | |||
const bool | blocking = false | |||
) |
Activate the thrusters.
Values should be between -1.0 (full reverse) and 1.0 (full forward), 0.0 being no motion
Definition at line 186 of file BeoSubTwoBal.C.
References NModelParam< T >::getVal(), itsBeoRight, itsLeftThrusterServoNum, itsRightThrusterServoNum, and itsThrustRight.
rutz::shared_ptr<BeoSubListener> BeoSubTwoBal::itsBeoLisRight [protected] |
nub::soft_ref<BeoChip> BeoSubTwoBal::itsBeoRight [protected] |
our left and rt beochips
Definition at line 152 of file BeoSubTwoBal.H.
Referenced by BeoSubTwoBal(), start2(), and thrust().
nub::soft_ref<IEEE1394grabber> BeoSubTwoBal::itsCameraUp [protected] |
our three cameras
Definition at line 163 of file BeoSubTwoBal.H.
Referenced by BeoSubTwoBal(), and start1().
BeoSubSensor<float> BeoSubTwoBal::itsDepthSensor [protected] |
our depth sensor data
Definition at line 156 of file BeoSubTwoBal.H.
nub::soft_ref<HMR3300> BeoSubTwoBal::itsHMR3300 [protected] |
nub::soft_ref<BeoSubIMU> BeoSubTwoBal::itsIMU [protected] |
NModelParam<int> BeoSubTwoBal::itsLeftThrusterServoNum [protected] |
NModelParam<int> BeoSubTwoBal::itsRightThrusterServoNum [protected] |
nub::soft_ref<BeoSubBallast> BeoSubTwoBal::itsRRballast [protected] |
our 4 ballasts
Definition at line 158 of file BeoSubTwoBal.H.
Referenced by BeoSubTwoBal(), setBallasts(), and setRRballast().
float BeoSubTwoBal::itsThrustRight [protected] |
our current thruster settings
Definition at line 166 of file BeoSubTwoBal.H.
Referenced by getThrusters(), and thrust().