Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <HeadPointerMC.h>
Inheritance diagram for HeadPointerMC:
Definition at line 10 of file HeadPointerMC.h.
Public Types | |
enum | CoordFrame_t { BodyRelative, GravityRelative } |
Various modes the head can be in. In the future may want to add ability to explicitly track an object or point in the world model. More... | |
Public Member Functions | |
HeadPointerMC () | |
constructor, defaults to active, BodyRelative, all joints at 0 | |
virtual | ~HeadPointerMC () |
destructor | |
void | setWeight (double w) |
sets the weight values for all the neck joints | |
void | setWeight (RobotInfo::TPROffset_t i, double weight) |
set a specific head joint weight, pass one of RobotInfo::TPROffset_t, not a full offset! | |
void | setActive (bool a) |
sets active flag, see isDirty() | |
bool | getActive () const |
returns active flag, see isDirty() | |
double | convert (RobotInfo::TPROffset_t i, double v, CoordFrame_t srcmode, CoordFrame_t tgtmode) const |
converts a value v in srcmode to a value in tgtmode that would leave the joint angle for joint i constant (you probably won't need to call this directly) | |
Joint Accessors | |
Note that none of these are virtual , so you don't have to checkout to use them, you should be able to use MotionManager::peekMotion() | |
void | setJoints (double tilt, double pan, double roll) |
Directly sets the neck values, uses current mode. | |
void | setMode (CoordFrame_t m, bool convert=true) |
sets all the joints to the given mode, will convert the values to the new mode if convert is true | |
void | setJointMode (RobotInfo::TPROffset_t i, CoordFrame_t m, bool convert=true) |
set a specific head joint's mode, will convert from previous mode's value to next mode's value if convert is true. Pass one of RobotInfo::TPROffset_t, not a full offset! | |
void | setJointValue (RobotInfo::TPROffset_t i, double value) |
set a specific head joint's value (for whatever mode it's in), pass one of RobotInfo::TPROffset_t, not a full offset! | |
void | setJointValueAndMode (RobotInfo::TPROffset_t i, double value, CoordFrame_t m) |
set a specific head joint, pass one of RobotInfo::TPROffset_t, not a full offset! | |
void | setJointValueFromMode (RobotInfo::TPROffset_t i, double value, CoordFrame_t m) |
set a specific head joint auto converting value from mode m to the current mode, pass one of RobotInfo::TPROffset_t, not a full offset! | |
CoordFrame_t | getJointMode (RobotInfo::TPROffset_t i) const |
returns the current mode for joint i (use RobotInfo::TPROffset_t, not global offset) | |
double | getJointValue (RobotInfo::TPROffset_t i) const |
returns the current value (relative to the current mode) of joint i, use getOutputCmd() if you want to know the actual target joint value (to get the actual current joint position, look in WorldState | |
Inherited: | |
virtual int | updateOutputs () |
Updates where the head is looking. | |
virtual const OutputCmd & | getOutputCmd (unsigned int i) |
returns one of the headJoints entries or ::unusedJoint if not a head joint | |
virtual int | isDirty () |
true if a change has been made since the last updateJointCmds() and we're active | |
virtual int | isAlive () |
Updates where the head is looking. | |
Protected Member Functions | |
double | convToBodyRelative (RobotInfo::TPROffset_t i, double v, CoordFrame_t mode) const |
converts to a body relative measurement for joint i | |
double | convFromBodyRelative (RobotInfo::TPROffset_t i, double v, CoordFrame_t mode) const |
converts from a body relative measurement for joint i | |
Protected Attributes | |
bool | dirty |
true if a change has been made since last call to updateJointCmds() | |
bool | active |
set by accessor functions, defaults to true | |
OutputCmd | headJoints [NumHeadJoints] |
stores the current target head angles | |
double | headValues [NumHeadJoints] |
stores the target value of each joint, relative to headModes | |
CoordFrame_t | headModes [NumHeadJoints] |
stores the current mode of each joint, for instance so tilt can be GravityRelative while pan is static | |
Static Protected Attributes | |
const OutputCmd | unused |
handy when we need a reference to an unused joint |
|
Various modes the head can be in. In the future may want to add ability to explicitly track an object or point in the world model.
Definition at line 18 of file HeadPointerMC.h. |
|
constructor, defaults to active, BodyRelative, all joints at 0
Definition at line 9 of file HeadPointerMC.cc. References BodyRelative, headModes, headValues, ERS210Info::NumHeadJoints, and setWeight(). |
|
destructor
Definition at line 15 of file HeadPointerMC.h. |
|
converts a value v in srcmode to a value in tgtmode that would leave the joint angle for joint i constant (you probably won't need to call this directly)
Definition at line 29 of file HeadPointerMC.h. References convFromBodyRelative(), and convToBodyRelative(). |
|
converts from a body relative measurement for joint i
Definition at line 95 of file HeadPointerMC.cc. References ASSERT, ERS210Info::BAccelOffset, BodyRelative, ERS210Info::DAccelOffset, GravityRelative, ERS210Info::LAccelOffset, ERS210Info::PanOffset, ERS210Info::RollOffset, WorldState::sensors, state, and ERS210Info::TiltOffset. |
|
converts to a body relative measurement for joint i
Definition at line 69 of file HeadPointerMC.cc. References ASSERT, ERS210Info::BAccelOffset, BodyRelative, ERS210Info::DAccelOffset, GravityRelative, ERS210Info::LAccelOffset, ERS210Info::PanOffset, ERS210Info::RollOffset, WorldState::sensors, state, and ERS210Info::TiltOffset. |
|
returns active flag, see isDirty()
Definition at line 26 of file HeadPointerMC.h. References active. |
|
returns the current mode for joint i (use RobotInfo::TPROffset_t, not global offset)
Definition at line 41 of file HeadPointerMC.h. References CoordFrame_t, and headModes. |
|
returns the current value (relative to the current mode) of joint i, use getOutputCmd() if you want to know the actual target joint value (to get the actual current joint position, look in WorldState
Definition at line 42 of file HeadPointerMC.h. References headValues. |
|
returns one of the headJoints entries or ::unusedJoint if not a head joint
Definition at line 60 of file HeadPointerMC.cc. References getActive(), headJoints, ERS210Info::HeadOffset, ERS210Info::NumHeadJoints, and unused. |
|
Updates where the head is looking.
Implements MotionCommand. Definition at line 49 of file HeadPointerMC.h. |
|
true if a change has been made since the last updateJointCmds() and we're active
Implements MotionCommand. Definition at line 48 of file HeadPointerMC.h. |
|
sets active flag, see isDirty()
Definition at line 25 of file HeadPointerMC.h. References active. |
|
set a specific head joint's mode, will convert from previous mode's value to next mode's value if convert is true. Pass one of RobotInfo::TPROffset_t, not a full offset!
Definition at line 36 of file HeadPointerMC.cc. References convert(), dirty, headModes, and headValues. |
|
Directly sets the neck values, uses current mode.
Definition at line 18 of file HeadPointerMC.cc. References dirty, headValues, ERS210Info::PanOffset, ERS210Info::RollOffset, and ERS210Info::TiltOffset. |
|
set a specific head joint's value (for whatever mode it's in), pass one of RobotInfo::TPROffset_t, not a full offset!
Definition at line 38 of file HeadPointerMC.h. References dirty, and headValues. |
|
set a specific head joint, pass one of RobotInfo::TPROffset_t, not a full offset!
Definition at line 39 of file HeadPointerMC.h. References dirty, headModes, and headValues. |
|
set a specific head joint auto converting value from mode m to the current mode, pass one of RobotInfo::TPROffset_t, not a full offset!
Definition at line 40 of file HeadPointerMC.h. References convert(), dirty, headModes, and headValues. |
|
sets all the joints to the given mode, will convert the values to the new mode if convert is true
Definition at line 31 of file HeadPointerMC.cc. References ERS210Info::NumHeadJoints, and setJointMode(). |
|
set a specific head joint weight, pass one of RobotInfo::TPROffset_t, not a full offset!
Definition at line 24 of file HeadPointerMC.h. References dirty, headJoints, and OutputCmd::weight. |
|
sets the weight values for all the neck joints
Definition at line 25 of file HeadPointerMC.cc. References dirty, headJoints, ERS210Info::NumHeadJoints, and OutputCmd::weight. |
|
Updates where the head is looking.
Implements MotionCommand. Definition at line 43 of file HeadPointerMC.cc. References BodyRelative, convToBodyRelative(), dirty, headJoints, headModes, ERS210Info::HeadOffset, headValues, isDirty(), motman, ERS210Info::NumFrames, ERS210Info::NumHeadJoints, MotionManager::setOutput(), and OutputCmd::value. |
|
set by accessor functions, defaults to true
Definition at line 57 of file HeadPointerMC.h. |
|
true if a change has been made since last call to updateJointCmds()
Definition at line 56 of file HeadPointerMC.h. |
|
stores the current target head angles
Definition at line 58 of file HeadPointerMC.h. |
|
stores the current mode of each joint, for instance so tilt can be GravityRelative while pan is static
Definition at line 60 of file HeadPointerMC.h. |
|
stores the target value of each joint, relative to headModes
Definition at line 59 of file HeadPointerMC.h. |
|
handy when we need a reference to an unused joint
Definition at line 7 of file HeadPointerMC.cc. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:08:58 2003 by Doxygen 1.3.2 |