Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <PostureMC.h>
Inheritance diagram for PostureMC:
Definition at line 11 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 14 of file PostureMC.h. References dirty, MotionCommand::setAutoPrune(), and tolerance. |
|
constructor, loads from filename
Definition at line 16 of file PostureMC.h. References dirty, MotionCommand::setAutoPrune(), and tolerance. |
|
destructor
Definition at line 18 of file PostureMC.h. |
|
sets all joints to unused
Reimplemented from PostureEngine. Definition at line 59 of file PostureMC.h. References PostureEngine::clear(), and dirty. |
|
returns tolerance
Definition at line 30 of file PostureMC.h. References tolerance. |
|
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 47 of file PostureMC.h. References dirty, MotionCommand::getAutoPrune(), PostureEngine::maxdiff(), PostureEngine::takeSnapshot(), and tolerance. |
|
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 41 of file PostureMC.h. References dirty. |
|
if you want to check the dirty flag
Definition at line 28 of file PostureMC.h. References dirty. |
|
Load from a saved buffer.
Reimplemented from PostureEngine. Definition at line 65 of file PostureMC.h. References dirty, and PostureEngine::LoadBuffer(). |
|
computes a weighted average of this vs. pe, w being the weight towards pe (so w==1 just copies pe)
joints being averaged with ::unusedJoint have their weights averaged, but not their values (so an output can crossfade properly)
Reimplemented from PostureEngine. Definition at line 62 of file PostureMC.h. References dirty, and PostureEngine::setAverage(). |
|
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 63 of file PostureMC.h. References dirty, and PostureEngine::setCombine(). |
|
call this if you call PostureEngine::setOutputCmd(), that doesn't know about dirty flags
Definition at line 27 of file PostureMC.h. References dirty. |
|
sets output i to OutputCmd c, returns
Reimplemented from PostureEngine. Definition at line 64 of file PostureMC.h. References dirty, and PostureEngine::setOutputCmd(). |
|
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 60 of file PostureMC.h. References dirty, and PostureEngine::setOverlay(). |
|
sets tolerance, returns
Definition at line 29 of file PostureMC.h. References tolerance. |
|
sets joints of this which are equal to unused to pe, (layers this over pe) stores into this
Reimplemented from PostureEngine. Definition at line 61 of file PostureMC.h. References dirty, and PostureEngine::setUnderlay(). |
|
sets the internal cmds to the current state of the outputs
Reimplemented from PostureEngine. Reimplemented in EmergencyStopMC. Definition at line 58 of file PostureMC.h. References dirty, and PostureEngine::takeSnapshot(). |
|
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 35 of file PostureMC.h. References PostureEngine::cmds, dirty, motman, ERS210Info::NumOutputs, MotionManager::setOutput(), and OutputCmd::weight. |
|
true if changes have been made since last updateOutputs()
Definition at line 69 of file PostureMC.h. |
|
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 70 of file PostureMC.h. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:09:06 2003 by Doxygen 1.3.2 |