Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <PostureMC.h>
Inheritance diagram for PostureMC:
Definition at line 10 of file PostureMC.h.
Public Member Functions | |
PostureMC () | |
constructor | |
PostureMC (const char *filename) | |
constructor, loads from filename | |
virtual | ~PostureMC () |
destructor | |
New Stuff | |
PostureMC & | setDirty (bool d=true) |
call this if you call PostureEngine::setOutputCmd(), that doesn't know about dirty flags | |
bool | isDirty () const |
if you want to check the dirty flag | |
virtual PostureMC & | setTolerance (float t) |
sets tolerance, returns *this | |
virtual float | getTolerance () |
returns tolerance | |
MotionCommand Stuff | |
virtual int | updateOutputs () |
is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager | |
virtual int | isDirty () |
not used by MotionManager at the moment, but could be used to reduce recomputation, and you may find it useful | |
virtual int | isAlive () |
returns non-zero (true) if PostureEngine::maxdiff() between this and the current position is over tolerance | |
PostureEngine Stuff | |
Had to override stuff to manage a dirty flag | |
virtual void | takeSnapshot () |
sets the internal cmds to the current state of the outputs | |
virtual void | clear () |
sets all joints to unused | |
virtual PostureMC & | setOverlay (const PostureEngine &pe) |
sets joints of this to all joints of pe which are not equal to unused (layers pe over this) stores into this | |
virtual PostureMC & | setUnderlay (const PostureEngine &pe) |
sets joints of this which are equal to unused to pe, (layers this over pe) stores into this | |
virtual PostureMC & | setAverage (const PostureEngine &pe, float w=0.5) |
computes a weighted average of this vs. pe, w being the weight towards pe (so w==1 just copies pe) | |
virtual PostureMC & | setCombine (const PostureEngine &pe) |
computes a weighted average of this vs. pe, using the weight values of the joints, storing the total weight in the result's weight value | |
PostureMC & | setOutputCmd (unsigned int i, const OutputCmd &c) |
sets output i to OutputCmd c, returns *this so you can chain them | |
virtual unsigned int | LoadBuffer (const char buf[], unsigned int len) |
Load from a saved buffer. | |
Protected Attributes | |
bool | dirty |
true if changes have been made since last updateOutputs() | |
float | tolerance |
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) |
|
constructor
Definition at line 13 of file PostureMC.h. |
|
constructor, loads from filename
Definition at line 15 of file PostureMC.h. |
|
destructor
Definition at line 17 of file PostureMC.h. |
|
sets all joints to unused
Reimplemented from PostureEngine. Definition at line 58 of file PostureMC.h. |
|
returns tolerance
Definition at line 29 of file PostureMC.h. |
|
returns non-zero (true) if PostureEngine::maxdiff() between this and the current position is over tolerance This is handy so you can set to have the robot go to a position and then automatically remove the MotionCommand when it gets there - but beware fighting Postures which average out and neither succeeds Implements MotionCommand. Definition at line 46 of file PostureMC.h. |
|
not used by MotionManager at the moment, but could be used to reduce recomputation, and you may find it useful
Implements MotionCommand. Definition at line 40 of file PostureMC.h. |
|
if you want to check the dirty flag
Definition at line 27 of file PostureMC.h. |
|
Load from a saved buffer.
Reimplemented from PostureEngine. Definition at line 64 of file PostureMC.h. |
|
computes a weighted average of this vs. pe, w being the weight towards pe (so w==1 just copies pe)
joints being averaged with unused joints have their weights averaged, but not their values (so an output can crossfade properly)
Reimplemented from PostureEngine. Definition at line 61 of file PostureMC.h. |
|
computes a weighted average of this vs. pe, using the weight values of the joints, storing the total weight in the result's weight value
Reimplemented from PostureEngine. Definition at line 62 of file PostureMC.h. |
|
call this if you call PostureEngine::setOutputCmd(), that doesn't know about dirty flags
Definition at line 26 of file PostureMC.h. |
|
sets output i to OutputCmd c, returns
Reimplemented from PostureEngine. Definition at line 63 of file PostureMC.h. Referenced by BatteryMonitorBehavior::setFlipper(). |
|
sets joints of this to all joints of pe which are not equal to unused (layers pe over this) stores into this
Reimplemented from PostureEngine. Definition at line 59 of file PostureMC.h. |
|
sets tolerance, returns
Definition at line 28 of file PostureMC.h. |
|
sets joints of this which are equal to unused to pe, (layers this over pe) stores into this
Reimplemented from PostureEngine. Definition at line 60 of file PostureMC.h. |
|
sets the internal cmds to the current state of the outputs
Reimplemented from PostureEngine. Reimplemented in EmergencyStopMC. Definition at line 57 of file PostureMC.h. |
|
is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager
Implements MotionCommand. Reimplemented in EmergencyStopMC. Definition at line 34 of file PostureMC.h. Referenced by EmergencyStopMC::updateOutputs(). |
|
true if changes have been made since last updateOutputs()
Definition at line 68 of file PostureMC.h. Referenced by clear(), isAlive(), isDirty(), LoadBuffer(), PostureMC(), setAverage(), setCombine(), setDirty(), setOutputCmd(), setOverlay(), EmergencyStopMC::setStopped(), setUnderlay(), takeSnapshot(), EmergencyStopMC::takeSnapshot(), and updateOutputs(). |
|
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 69 of file PostureMC.h. Referenced by getTolerance(), isAlive(), PostureMC(), and setTolerance(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:21 2004 by Doxygen 1.3.4 |