| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
HeadPointerMC Class Reference#include <HeadPointerMC.h>
Inheritance diagram for HeadPointerMC: ![]() Detailed DescriptionThis class gives some quick and easy functions to point the head at things.
Definition at line 11 of file HeadPointerMC.h.
Constructor & Destructor Documentation
Constructor, defaults to all joints to current value in state (i.e. calls takeSnapshot() automatically).
Definition at line 11 of file HeadPointerMC.cc.
Member Function Documentation
if x is outside of the range of joint i, it is set to either the min or the max, whichever is closer
Definition at line 139 of file HeadPointerMC.h. Referenced by setJoints(), and setJointValue().
Restores maxSpeed to default settings from Config::Motion_Config.
Definition at line 33 of file HeadPointerMC.cc. Referenced by HeadPointerMC().
marks this as dirty each time it is added
Reimplemented from MotionCommand. Definition at line 123 of file HeadPointerMC.h.
Makes sure i is in the range (0,NumHeadJoints). If it is instead in the range (HeadOffset,HeadOffset+NumHeadJoints), output a warning and reset i to the obviously intended value.
Definition at line 171 of file HeadPointerMC.cc. Referenced by getJointValue(), and setJointValue().
sets the target to last sent commands, and dirty to false; essentially freezes motion in place This is very similar to takeSnapshot(), but will do the "right thing" (retain current position) when motion blending is involved. A status event will be generated if/when the joints reach the currently commanded position. Probably should use freezeMotion() if you want to stop a motion underway, but takeSnapshot() if you want to reset/intialize to the current joint positions. Definition at line 21 of file HeadPointerMC.cc.
Returns the target value of joint i. Use this if you want to know the current commanded joint value; To get the current joint position, look in WorldState::outputs.
Definition at line 83 of file HeadPointerMC.h.
Returns maxSpeed in rad/sec.
Definition at line 56 of file HeadPointerMC.h.
Alive while target is not reached.
Implements MotionCommand. Definition at line 147 of file HeadPointerMC.cc.
true if a change has been made since the last updateJointCmds() and we're active
Implements MotionCommand. Definition at line 121 of file HeadPointerMC.h. Referenced by updateOutputs().
checks if target point or direction is actually reachable
Definition at line 128 of file HeadPointerMC.h. Referenced by lookAtPoint(), and lookInDirection().
Centers the camera on a point in space, attempting to move the camera d millimeters away from the point. Point should be relative to the body reference frame (see BaseFrameOffset). Returns true if the target is reachable.
Definition at line 85 of file HeadPointerMC.cc.
Centers the camera on a point in space, attempting to keep the camera as far away from the point as possible. Point should be relative to the body reference frame (see BaseFrameOffset). Returns true if the target is reachable.
Definition at line 52 of file HeadPointerMC.cc.
Points the camera in a given direction. Vector should be relative to the body reference frame (see BaseFrameOffset). Returns true if the target is reachable.
Definition at line 97 of file HeadPointerMC.cc.
if targetReached, reassigns headCmds from MotionManager::getOutputCmd(), then sets dirty to true and targetReached to false should be called each time a joint value gets modified in case the head isn't where it's supposed to be, it won't jerk around MotionManager::getOutputCmd() is called instead of WorldState::outputs[] because if this is being called rapidly (i.e. after every sensor reading) using the sensor values will cause problems with very slow acceleration due to sensor lag continually resetting the current position. Using the last value sent by the MotionManager fixes this. Definition at line 164 of file HeadPointerMC.cc. Referenced by DoStart(), setJoints(), setJointValue(), and setWeight().
puts x in the range (-pi,pi)
Definition at line 136 of file HeadPointerMC.h. Referenced by clipAngularRange().
Sets hold - if this is set to false, it will allow a persistent motion to behave the same as a pruned motion, without being pruned.
Definition at line 20 of file HeadPointerMC.h.
Directly sets the neck values (all values in radians).
Definition at line 45 of file HeadPointerMC.cc.
Directly set a single neck joint value.
Definition at line 74 of file HeadPointerMC.h. Referenced by lookAtPoint(), and lookInDirection().
Sets maxSpeed in rad/sec.
Definition at line 51 of file HeadPointerMC.h.
Sets the weight values for all the neck joints.
Definition at line 39 of file HeadPointerMC.cc. Referenced by HeadPointerMC().
sets the target joint positions to current sensor values Similar to freezeMotion() when a motion is underway, but only if no other MotionCommands are using neck joints. A status event will not be generated unless a motion was already underway. Probably should use freezeMotion() if you want to stop a motion underway, but takeSnapshot() if you want to reset/intialize to the current joint positions. Definition at line 27 of file HeadPointerMC.cc. Referenced by HeadPointerMC().
Updates where the head is looking.
Implements MotionCommand. Definition at line 110 of file HeadPointerMC.cc.
Member Data Documentation
true if a change has been made since last call to updateJointCmds()
Definition at line 170 of file HeadPointerMC.h. Referenced by freezeMotion(), isAlive(), isDirty(), markDirty(), takeSnapshot(), and updateOutputs().
stores the last values we sent from updateOutputs
Definition at line 177 of file HeadPointerMC.h. Referenced by freezeMotion(), markDirty(), setWeight(), takeSnapshot(), and updateOutputs().
provides kinematics computations, there's a small leak and safety issue here because ROBOOP::Robot contains pointers, and those pointers typically aren't freed because MotionCommand destructor isn't called when detaching shared region
Definition at line 179 of file HeadPointerMC.h. Referenced by isReachable(), lookAtPoint(), and lookInDirection().
stores the target value of each joint
Definition at line 176 of file HeadPointerMC.h. Referenced by freezeMotion(), getJointValue(), isAlive(), setJoints(), setJointValue(), takeSnapshot(), and updateOutputs().
if set to true, the posture will be kept active; otherwise joints will be marked unused after each posture is achieved (as if the posture was pruned); set through setHold()
Definition at line 171 of file HeadPointerMC.h. Referenced by getHold(), isAlive(), setHold(), and updateOutputs().
initialized from Config::motion_config, but can be overridden by setMaxSpeed(); rad per frame
Definition at line 178 of file HeadPointerMC.h. Referenced by defaultMaxSpeed(), getMaxSpeed(), noMaxSpeed(), setMaxSpeed(), and updateOutputs().
false if the head is still moving towards its target
Definition at line 173 of file HeadPointerMC.h. Referenced by isAlive(), isDirty(), markDirty(), and updateOutputs().
time at which the targetReached flag was set
Definition at line 174 of file HeadPointerMC.h. Referenced by isAlive(), and updateOutputs().
number of milliseconds to wait before giving up on a target that should have already been reached, a value of -1U will try forever
Definition at line 175 of file HeadPointerMC.h. Referenced by getTimeout(), isAlive(), and setTimeout().
when autopruning, if the maxdiff() of this posture and the robot's current position is below this value, isAlive() will be false, defaults to 0.01 (5.7 degree error)
Definition at line 172 of file HeadPointerMC.h. Referenced by getTolerance(), isAlive(), and setTolerance().
The documentation for this class was generated from the following files: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tekkotsu v3.0 |
Generated Wed Oct 4 00:05:03 2006 by Doxygen 1.4.7 |