#include <InvKinWalkingEngine.h>
Inheritance diagram for InvKinWalkingEngine:


parameter set interpolation | |
| void | initParametersInterpolation (int changeSteps) |
| Initialize interpolation of WalkingParameterSets. | |
| void | nextParametersInterpolation (bool walk) |
| Calculate next step in parameterset interpolation and increase currentStep if walk is true. | |
| InvKinWalkingParameters | currentParameters |
| Current parameters of this walk. | |
| InvKinWalkingParameters * | requestedParameters |
| Pointer to the parameter set requested in setParameters. | |
| InvKinWalkingParameters | nextParameters |
| Next parameters of this walk, target of current interpolation. | |
| InvKinWalkingParameters | lastParameters |
| Last parameters of this walk, origin of current interpolation. | |
| int | paramInterpolCount |
| Counts parameter set interpolation steps. | |
| int | paramInterpolLength |
| Stores the length of the current parameter set interpolation. | |
| double | positionInWalkCycle |
| Stores precise version of currentStep during interpolation. | |
Public Member Functions | |
| InvKinWalkingEngine (const WalkingEngineInterfaces &interfaces) | |
| Constructor. | |
| ~InvKinWalkingEngine () | |
| Destructor. | |
| virtual bool | executeParameterized (JointData &jointData, const WalkRequest &walkRequest, double positionInWalkingCycle) |
| Executes the engine. | |
| virtual bool | handleMessage (InMessage &message) |
| Called from a MessageQueue to distribute messages. | |
| void | setParameters (InvKinWalkingParameters *p, int changeSteps=32) |
| Sets the engine's parameters. | |
| const InvKinWalkingParameters & | getParameters () const |
| Gets the engine's parameters. | |
Private Member Functions | |
| void | calculateLegSpeeds () |
| calculates new leg speeds according to current motion request | |
| void | calculateRelativeFootPosition (int step, int leg, double &rx, double &ry, double &rz) |
| calculate relative foot position for one leg rx is relative to current step size (range -1.0..1.0) ry is an absolute offset to y foot position rz is relative to step lift parameter (range 0..1.0) | |
| void | calculateData (JointData &j) |
| calculate current joint data values | |
| void | calculateFootPositions () |
| calculate current foot positions | |
| int | calculateLegJoints (Kinematics::LegIndex leg, double &j1, double &j2, double &j3, double bodyTilt=0) |
| calculate angles for one leg in current step | |
| void | smoothMotionRequest (const Pose2D &request, Pose2D ¤tRequest) |
| smooth motion request current request is adjusted according to motion request eliminating quick changes | |
| void | limitToMaxSpeed (double &stepSizeX, double &stepSizeY, double &stepSizeR) |
| limit step to maximum step size corrects odometry accordingly | |
| double | getLegPositionCurve (double &rz, double index) |
| gets (hopefully optimized) relative foot position from a lookup table with interpolation | |
Private Attributes | |
| unsigned long | lastParametersFromPackageTimeStamp |
| Pose2D | currentRequest |
| currently executed motion request speeds in mm/s | |
| Pose2D | odometry |
| odometry resulting from current request speed in mm/tick | |
current walk values | |
| double | legSpeedX [4] |
| speed of leg in x direction (step size in mm) | |
| double | legSpeedY [4] |
| speed of leg in y direction (step size in mm) | |
| bool | footOnGround [4] |
| foot is on ground | |
| double | x [4] |
| foot x positions | |
| double | y [4] |
| foot y positions | |
| double | z [4] |
| foot z positions | |
Definition at line 24 of file InvKinWalkingEngine.h.
|
|
Constructor.
Definition at line 17 of file InvKinWalkingEngine.cpp. References footOnGround, legSpeedX, and legSpeedY. |
|
|
Destructor.
Definition at line 30 of file InvKinWalkingEngine.cpp. |
|
||||||||||||||||
Here is the call graph for this function:

|
|
Called from a MessageQueue to distribute messages.
Reimplemented from Module. Definition at line 552 of file InvKinWalkingEngine.cpp. References InMessage::bin, InMessage::getMessageID(), idInvKinWalkingParameters, and initParametersInterpolation(). Referenced by MSH2004InvKinWalkingEngine::handleMessage(), ParamRearOnlyInvKinWalkingEngine::handleMessage(), ParamInvKinWalkingEngine::handleMessage(), and BB2004InvKinWalkingEngine::handleMessage(). |
Here is the call graph for this function:

|
||||||||||||
|
Sets the engine's parameters.
Definition at line 34 of file InvKinWalkingEngine.cpp. References InvKinWalkingParameters::firstStep, initParametersInterpolation(), requestedParameters, and InvKinWalkingParameters::stepLen. Referenced by MSH2004InvKinWalkingEngine::executeParameterized(), ParamRearOnlyInvKinWalkingEngine::executeParameterized(), ParamInvKinWalkingEngine::executeParameterized(), BB2004InvKinWalkingEngine::executeParameterized(), and BB2004InvKinWalkingEngine::setParameters(). |
Here is the call graph for this function:

|
|
Gets the engine's parameters.
Definition at line 58 of file InvKinWalkingEngine.h. Referenced by BB2004InvKinWalkingEngine::updateOdometry(). |
|
|
Initialize interpolation of WalkingParameterSets.
Definition at line 564 of file InvKinWalkingEngine.cpp. Referenced by executeParameterized(), handleMessage(), and setParameters(). |
|
|
Calculate next step in parameterset interpolation and increase currentStep if walk is true.
Definition at line 575 of file InvKinWalkingEngine.cpp. References calculateLegSpeeds(), InvKinWalkingParameters::init(), InvKinWalkingParameters::interpolate(), and InvKinWalkingParameters::stepLen. Referenced by executeParameterized(). |
Here is the call graph for this function:

|
|
calculates new leg speeds according to current motion request
Definition at line 117 of file InvKinWalkingEngine.cpp. References InvKinWalkingParameters::CorrectionValues::backward, InvKinWalkingParameters::correctionValues, InvKinWalkingParameters::counterRotation, InvKinWalkingParameters::CorrectionValues::forward, InvKinWalkingParameters::legSpeedFactorR, InvKinWalkingParameters::legSpeedFactorX, InvKinWalkingParameters::legSpeedFactorY, legSpeedX, legSpeedY, limitToMaxSpeed(), Pose2D::rotation, InvKinWalkingParameters::CorrectionValues::rotationCenter, InvKinWalkingParameters::CorrectionValues::sideward, Pose2D::translation, InvKinWalkingParameters::CorrectionValues::turning, Vector2< double >::x, and Vector2< double >::y. Referenced by executeParameterized(), and nextParametersInterpolation(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
calculate relative foot position for one leg rx is relative to current step size (range -1.0..1.0) ry is an absolute offset to y foot position rz is relative to step lift parameter (range 0..1.0)
Definition at line 303 of file InvKinWalkingEngine.cpp. References InvKinWalkingParameters::airTime, InvKinWalkingParameters::footMode, FORELEG, InvKinWalkingParameters::freeFormQuadPos, getLegPositionCurve(), InvKinWalkingParameters::groundTime, InvKinWalkingParameters::liftTime, InvKinWalkingParameters::loweringTime, pi, InvKinWalkingParameters::stepAir, InvKinWalkingParameters::stepLen, InvKinWalkingParameters::stepLift, and InvKinWalkingParameters::stepLower. Referenced by calculateFootPositions(). |
Here is the call graph for this function:

|
|
calculate current joint data values
Definition at line 254 of file InvKinWalkingEngine.cpp. References InvKinWalkingParameters::bodyTilt, calculateFootPositions(), JointData::data, InvKinWalkingParameters::headPan, InvKinWalkingParameters::headRoll, InvKinWalkingParameters::headTilt, Kinematics::jointsFromLegPosition(), InvKinWalkingParameters::mouth, and toMicroRad(). Referenced by executeParameterized(). |
Here is the call graph for this function:

|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
calculate angles for one leg in current step
|
|
||||||||||||
|
smooth motion request current request is adjusted according to motion request eliminating quick changes
Definition at line 174 of file InvKinWalkingEngine.cpp. References Pose2D::getAngle(), InvKinWalkingParameters::maxRotationChange, InvKinWalkingParameters::maxSpeedXChange, InvKinWalkingParameters::maxSpeedYChange, Pose2D::rotation, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by executeParameterized(). |
Here is the call graph for this function:

|
||||||||||||||||
|
limit step to maximum step size corrects odometry accordingly
Definition at line 198 of file InvKinWalkingEngine.cpp. References InvKinWalkingParameters::CorrectionValues::backward, InvKinWalkingParameters::correctionValues, InvKinWalkingParameters::CorrectionValues::forward, InvKinWalkingParameters::maxStepSizeR, InvKinWalkingParameters::maxStepSizeX, InvKinWalkingParameters::maxStepSizeY, Pose2D::rotation, InvKinWalkingParameters::CorrectionValues::sideward, Pose2D::translation, InvKinWalkingParameters::CorrectionValues::turning, Vector2< double >::x, and Vector2< double >::y. Referenced by calculateLegSpeeds(). |
|
||||||||||||
|
gets (hopefully optimized) relative foot position from a lookup table with interpolation
Definition at line 288 of file InvKinWalkingEngine.cpp. Referenced by calculateRelativeFootPosition(). |
|
|
Current parameters of this walk.
Definition at line 65 of file InvKinWalkingEngine.h. |
|
|
Pointer to the parameter set requested in setParameters.
Definition at line 68 of file InvKinWalkingEngine.h. Referenced by setParameters(). |
|
|
Next parameters of this walk, target of current interpolation.
Definition at line 71 of file InvKinWalkingEngine.h. |
|
|
Last parameters of this walk, origin of current interpolation.
Definition at line 74 of file InvKinWalkingEngine.h. |
|
|
Counts parameter set interpolation steps.
Definition at line 77 of file InvKinWalkingEngine.h. |
|
|
Stores the length of the current parameter set interpolation.
Definition at line 80 of file InvKinWalkingEngine.h. |
|
|
Stores precise version of currentStep during interpolation.
Definition at line 83 of file InvKinWalkingEngine.h. |
|
|
Definition at line 92 of file InvKinWalkingEngine.h. |
|
|
speed of leg in x direction (step size in mm)
Definition at line 96 of file InvKinWalkingEngine.h. Referenced by calculateFootPositions(), calculateLegSpeeds(), and InvKinWalkingEngine(). |
|
|
speed of leg in y direction (step size in mm)
Definition at line 97 of file InvKinWalkingEngine.h. Referenced by calculateFootPositions(), calculateLegSpeeds(), and InvKinWalkingEngine(). |
|
|
foot is on ground
Definition at line 99 of file InvKinWalkingEngine.h. Referenced by calculateFootPositions(), and InvKinWalkingEngine(). |
|
|
foot x positions
Definition at line 100 of file InvKinWalkingEngine.h. |
|
|
foot y positions
Definition at line 101 of file InvKinWalkingEngine.h. |
|
|
foot z positions
Definition at line 102 of file InvKinWalkingEngine.h. |
|
|
currently executed motion request speeds in mm/s
Definition at line 108 of file InvKinWalkingEngine.h. |
|
|
odometry resulting from current request speed in mm/tick
Definition at line 113 of file InvKinWalkingEngine.h. |
1.3.6