Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PostureEngine Class ReferenceA class for storing a set of positions and weights for all the outputs. More...
Inheritance diagram for PostureEngine:
Detailed DescriptionA class for storing a set of positions and weights for all the outputs. File Format: ([..] indicates an optional parameter)
Note that '=' can be used to separate tokens as well as any whitespace character. All angle values should be specified in radians. Valid section names are:
Additionally 'weights' can be used as a condensed section name (but not a verbose tag-style section, since weights are specified on each line). The 'weights' specification must follow the 'outputs' specification to be effective. Data following '#' is ignored as comments. Be aware if you load the file and then save it again, these comments will be lost. Example 1: Specifies only neck joints, looks forward and up a little
All other, unspecified, joints will be set to weight=0. Example 2: Logged sensor data from an ERS-7 robot
Condensed posture files can still be loaded on other models. For each entry, RobotInfo::Capabilities will be used to map from the model specified by the
Definition at line 80 of file PostureEngine.h.
Member Enumeration Documentation
enumeration of the different section types that may be used as section tags in verbose mode
Definition at line 286 of file PostureEngine.h. Constructor & Destructor Documentation
constructor Definition at line 86 of file PostureEngine.h.
constructor, loads a position from a file
Definition at line 89 of file PostureEngine.h.
constructor, initializes joint positions to the current state of the outputs as defined by state Definition at line 91 of file PostureEngine.h.
copy constructor Definition at line 94 of file PostureEngine.h.
destructor Definition at line 14 of file PostureEngine.cc. Member Function Documentation
returns the average sum squared error between this and pe's output values for outputs which are both not unused
Definition at line 113 of file PostureEngine.cc.
sets all joints to unused Reimplemented in PostureMC. Definition at line 30 of file PostureEngine.cc. Referenced by 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 weight<=0 have their weights averaged, but not their values (so an output can crossfade properly)
Definition at line 87 of file PostureEngine.cc.
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 Definition at line 98 of file PostureEngine.cc.
sets joints of this to all joints of pe which are not equal to unused (layers pe over this) returns new PostureEngine Definition at line 41 of file PostureEngine.cc.
sets joints of this which are equal to unused to pe, (layers this over pe) returns new PostureEngine Definition at line 51 of file PostureEngine.cc.
returns the sum squared error between this and pe's output values, but only between outputs which are both not unused
Definition at line 103 of file PostureEngine.cc.
sets saveFormatCondensed and loadSaveSensors (pass state for ws if you want to use current sensor values) Implements LoadSave. Definition at line 141 of file PostureEngine.cc. Referenced by CameraStreamBehavior::sendSensors().
returns value previously stored by setLoadSensors() Definition at line 153 of file PostureEngine.h.
returns output i Definition at line 129 of file PostureEngine.h.
returns output i, returns a reference so you can also set through an assignment Definition at line 128 of file PostureEngine.h. Referenced by Grasper::PlanArmDeliver::doStart(), Grasper::ArmRaise::doStart(), Grasper::ArmNudge::doStart(), Grasper::PlanArmApproach::doStart(), MotionSequenceEngine::setExplicitPose(), MotionSequenceEngine::setPose(), and update().
sets saveFormatCondensed and loadSaveSensors (pass state for ws if you want to use current sensor values) Implements LoadSave. Reimplemented in PostureMC. Definition at line 214 of file PostureEngine.cc. Referenced by MotionSequenceEngine::loadBuffer().
sets saveFormatCondensed and loadSaveSensors (pass state for ws if you want to use current sensor values) Definition at line 721 of file PostureEngine.cc. Referenced by MotionSequenceEngine::loadBuffer(), PostureNode::loadFile(), PostureEngine(), PostureMC::PostureMC(), PostureNode::PostureNode(), and PostureEditor::refresh().
helper function for loadBuffer, called for each individual line Definition at line 303 of file PostureEngine.cc. Referenced by loadBuffer().
returns the max error between this and pe's output values for outputs which are both not unused
Definition at line 125 of file PostureEngine.cc.
returns output i Definition at line 127 of file PostureEngine.h.
returns output i, returns a reference so you can also set through an assignment to this call, e.g. pose(MouthOffset)=.1; (remember that OutputCmd support implicit conversion from floats) Definition at line 126 of file PostureEngine.h.
assignment operator Definition at line 102 of file PostureEngine.h.
sets saveFormatCondensed and loadSaveSensors (pass state for ws if you want to use current sensor values) Implements LoadSave. Definition at line 620 of file PostureEngine.cc. Referenced by CameraStreamBehavior::sendSensors().
sets saveFormatCondensed and loadSaveSensors (pass state for ws if you want to use current sensor values) Definition at line 724 of file PostureEngine.cc. Referenced by Kinematics::calculateGroundPlane(), PostureEditor::refresh(), and SavePostureControl::takeInput().
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 in PostureMC. Definition at line 63 of file PostureEngine.cc. Referenced by createAverage().
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 in PostureMC. Definition at line 91 of file PostureEngine.cc. Referenced by createCombine().
if ws is non-NULL, any sensor values in loaded postures will be stored there (otherwise they are ignored) Definition at line 152 of file PostureEngine.h.
sets output i to OutputCmd c, returns Reimplemented in PostureMC. Definition at line 125 of file PostureEngine.h. Referenced by PostureEditor::activate(), Grasper::PlanBodyApproach::doStart(), MotionSequenceEngine::getPose(), ArmMC::setFingerGap(), solveLink(), solveLinkOrientation(), and solveLinkPosition().
sets joints of this to all joints of pe which are not equal to unused (layers pe over this) stores into this Reimplemented in PostureMC. Definition at line 35 of file PostureEngine.cc. Referenced by createOverlay().
sets saveFormatCondensed and loadSaveSensors (pass state for ws if you want to use current sensor values) Definition at line 136 of file PostureEngine.cc. Referenced by Kinematics::calculateGroundPlane(), CameraStreamBehavior::sendSensors(), and LogNode::writeSensor().
sets joints of this which are equal to unused to pe, (layers this over pe) stores into this Reimplemented in PostureMC. Definition at line 45 of file PostureEngine.cc. Referenced by createUnderlay().
the the weights of a range of cmds Reimplemented in PostureMC. Definition at line 25 of file PostureEngine.cc.
set the weights of all cmds Reimplemented in PostureMC. Definition at line 122 of file PostureEngine.h. Referenced by PostureEditor::activate(), Kinematics::calculateGroundPlane(), CameraStreamBehavior::sendSensors(), setWeights(), and SavePostureControl::takeInput().
Performs inverse kinematics to solve for both a position and orientation, bringing posOffset on link to posTgt, in the orientation specified.
The quaternion functions of fmat are helpful for creating axis-aligned rotations: fmat::quatX(r), fmat::quatY(r), fmat::quatZ(r), and fmat::QUAT_IDENTITY Definition at line 778 of file PostureEngine.cc.
Performs inverse kinematics to solve for positioning Peff on link j as close as possible to Ptgt (base coordinates in homogenous form); if solution found, stores result in this posture and returns true.
The quaternion functions of fmat are helpful for creating axis-aligned rotations: fmat::quatX(r), fmat::quatY(r), fmat::quatZ(r), and fmat::QUAT_IDENTITY Definition at line 762 of file PostureEngine.cc.
Performs inverse kinematics to solve for positioning Peff on link j as close as possible to Ptgt (base coordinates); if solution found, stores result in this posture and returns true.
The difference between solveLinkPosition() and solveLinkVector() is typically small, but critical when you're trying to look at something -- the solution obtained by simplying trying to solve for the position may not align the vector with the target -- solveLinkVector() tries to ensure the vector is aligned with the target, even if that isn't the closest solution position-wise. Reimplemented in PostureMC. Definition at line 188 of file PostureEngine.h. Referenced by solveLinkPosition().
Performs inverse kinematics to solve for positioning Peff on link j as close as possible to Ptgt (base coordinates in homogenous form); if solution found, stores result in this posture and returns true.
The difference between solveLinkPosition() and solveLinkVector() is typically small, but critical when you're trying to look at something -- the solution obtained by simplying trying to solve for the position may not align the vector with the target -- solveLinkVector() tries to ensure the vector is aligned with the target, even if that isn't the closest solution position-wise. Reimplemented in PostureMC. Definition at line 729 of file PostureEngine.cc. Referenced by Grasper::PlanArmDeliver::doStart(), Grasper::ArmRaise::doStart(), Grasper::ArmNudge::doStart(), Grasper::PlanArmApproach::doStart(), and solveLinkVector().
Performs inverse kinematics to solve for aligning the vector through Peff on link j and the link's origin to point at Ptgt (base coordinates); if solution found, stores result in this posture and returns true.
The difference between solveLinkPosition() and solveLinkVector() is typically small, but critical when you're trying to look at something -- the solution obtained by simplying trying to solve for the position may not align the vector with the target -- solveLinkVector() tries to ensure the vector is aligned with the target, even if that isn't the closest solution position-wise. Reimplemented in PostureMC. Definition at line 221 of file PostureEngine.h. Referenced by solveLinkVector().
Performs inverse kinematics to solve for aligning the vector through Peff on link j and the link's origin to point at Ptgt (base coordinates in homogenous form); if solution found, stores result in this posture and returns true.
The difference between solveLinkPosition() and solveLinkVector() is typically small, but critical when you're trying to look at something -- the solution obtained by simplying trying to solve for the position may not align the vector with the target -- solveLinkVector() tries to ensure the vector is aligned with the target, even if that isn't the closest solution position-wise. Reimplemented in PostureMC. Definition at line 745 of file PostureEngine.cc.
helper function for loadLine, strips trailing '~'s from output names to provide backward compatability (note pass by reference, operates 'in-place' on word) (originally, all output names were uniform length and used '~'s as padding... ugh.) Definition at line 297 of file PostureEngine.h. Referenced by loadLine().
sets the values of cmds to the current state of the outputs as defined by state (doesn't change the weights) Reimplemented in PostureMC. Definition at line 20 of file PostureEngine.cc.
sets the values of cmds to the current state of the outputs (doesn't change the weights) Reimplemented in PostureMC. Definition at line 16 of file PostureEngine.cc. Referenced by PostureEditor::activate(), Kinematics::calculateGroundPlane(), PostureEngine(), PostureEditor::processEvent(), CameraStreamBehavior::sendSensors(), and SavePostureControl::takeInput().
overriding Kinematics::update, make all updates come from this posture engine's own state, not WorldState Reimplemented from Kinematics. Definition at line 795 of file PostureEngine.cc. Referenced by solveLink(), solveLinkOrientation(), and solveLinkPosition(). Member Data Documentation
the table of outputs' values and weights, can be accessed through setOutputCmd() and getOutputCmd() Definition at line 305 of file PostureEngine.h. Referenced by avgdiff(), clear(), diff(), EmergencyStopMC::freezeJoints(), getBinSize(), getOutputCmd(), PostureMC::isAlive(), loadLine(), maxdiff(), operator()(), operator=(), PostureEngine(), saveBuffer(), setAverage(), setCombine(), setOutputCmd(), setOverlay(), setUnderlay(), setWeights(), takeSnapshot(), PostureMC::updateOutputs(), and EmergencyStopMC::updateOutputs().
if non-null, loads will store any included sensor information here Definition at line 309 of file PostureEngine.h. Referenced by getLoadedSensors(), loadLine(), and setLoadedSensors().
requests a condensed file format, smaller but less readable Definition at line 307 of file PostureEngine.h. Referenced by getBinSize(), loadBuffer(), loadLine(), operator=(), saveBuffer(), and setSaveFormat().
If non-null, saves will include sensor readings from here. Definition at line 308 of file PostureEngine.h. Referenced by getBinSize(), operator=(), saveBuffer(), and setSaveFormat(). The documentation for this class was generated from the following files: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:14 2016 by Doxygen 1.6.3 |