#include <GT2004MotionControl.h>
Inheritance diagram for GT2004MotionControl:
Definition at line 31 of file GT2004MotionControl.h.
anonymous enum [protected] |
The state of the MotionControl
Definition at line 123 of file GT2004MotionControl.h.
GT2004MotionControl::GT2004MotionControl | ( | ModuleHandler & | moduleHandler, | |
const MotionControlInterfaces & | interfaces | |||
) |
Constructor
interfaces | The paramters of the MotionControl module. | |
moduleHandler | A reference to the ModuleHandler of the Process. |
Definition at line 22 of file GT2004MotionControl.cpp.
References MotionControlInterfaces::bodyPosture, WalkRequest::dash, WalkRequest::debug, MotionControlInterfaces::gt2004Parameters, MotionControlInterfaces::invKinWalkingParameters, lastHeadPan, lastHeadRoll, lastHeadTilt, lastMotionType, moduleHandler, MotionControlInterfaces::motionInfo, MotionControlInterfaces::motionRequest, WalkRequest::normal, MotionControlInterfaces::odometryData, pGetupEngine, MotionControlInterfaces::pidData, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, MotionControlInterfaces::receivedNewSensorData, MotionControlInterfaces::sensorDataBuffer, WalkRequest::turnKick, WalkRequest::turnWithBall, WalkRequest::upsideDown, wakingUp, SolutionRequest::walkingEngineNormal, and MotionControlInterfaces::walkParameterTimeStamp.
GT2004MotionControl::~GT2004MotionControl | ( | ) |
Destructor
Definition at line 74 of file GT2004MotionControl.cpp.
References WalkRequest::dash, WalkRequest::debug, SolutionRequest::getupEngine, moduleHandler, WalkRequest::normal, pGetupEngine, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, ModuleHandler::setModuleSelector(), WalkRequest::turnKick, WalkRequest::turnWithBall, WalkRequest::upsideDown, and SolutionRequest::walkingEngineNormal.
void GT2004MotionControl::determineMotionControlState | ( | ) | [protected] |
determines the state of the MotionControl
Definition at line 90 of file GT2004MotionControl.cpp.
References changeOfMotionControlStatePossible, getup, motionControlState, MotionControlInterfaces::motionRequest, MotionRequest::motionType, MotionRequest::playDead, playDead, positionInWalkCycle, pSpecialActions, setMotionControlState(), MotionRequest::specialAction, specialAction, SpecialActions::specialActionIsExecutableInWalkingCycle(), MotionRequest::specialActionRequest, SpecialActionRequest::specialActionType, stand, wakeUp, and walk.
Referenced by execute().
void GT2004MotionControl::execute | ( | ) | [virtual] |
Executes the module
Implements Module.
Definition at line 162 of file GT2004MotionControl.cpp.
References changeOfMotionControlStatePossible, PIDData::d, determineMotionControlState(), WakeUpEngine::execute(), MotionInfo::executedMotionRequest, SpecialActions::executeParameterized(), WalkingEngine::executeParameterized(), GetupEngineSelector::executeParameterized(), SensorDataBuffer::frame, JointDataBuffer::frame, MotionControlInterfaces::frameNumber, MotionRequest::getup, getup, MotionControlInterfaces::headIsBlockedBySpecialActionOrWalk, MotionControlInterfaces::headMotionRequest, JointData::headPan, JointData::headTilt, PIDData::i, MotionControlInterfaces::jointDataBuffer, jointDataBufferNumOfFrames, jointDataInvalidValue, lastHeadPan, lastHeadRoll, lastHeadTilt, lastMotionType, latestSpecialActionRequest, latestWalkRequest, motionControlState, MotionControlInterfaces::motionInfo, MotionControlInterfaces::motionRequest, MotionRequest::motionType, HeadMotionRequest::mouth, JointData::mouth, JointData::neckTilt, WalkRequest::normal, JointData::numOfJoint, MotionControlInterfaces::odometryData, PIDData::p, HeadMotionRequest::pan, pGetupEngine, MotionControlInterfaces::pidData, MotionRequest::playDead, playDead, MotionInfo::positionInWalkCycle, positionInWalkCycle, pSpecialActions, pWalkingEngine, HeadMotionRequest::roll, MotionControlInterfaces::sensorDataBuffer, specialAction, MotionRequest::specialAction, MotionRequest::specialActionRequest, MotionStabilizer::stabilize(), MotionRequest::stand, stand, HeadMotionRequest::tilt, wakeUp, wakeUpEngine, walk, MotionRequest::walk, WalkRequest::walkParams, MotionRequest::walkRequest, and WalkRequest::walkType.
bool GT2004MotionControl::handleMessage | ( | InMessage & | message | ) | [virtual] |
Called from a MessageQueue to distribute messages. Use message.getMessageID to decide if the message is relavant for the MesssageHandler derivate. Use message.bin, message.text or message.config as In streams to get the data from.
message | The message that can be read. |
Reimplemented from Module.
Definition at line 613 of file GT2004MotionControl.cpp.
References InMessage::bin, d, WalkRequest::debug, InMessage::getMessageID(), Module::handleMessage(), idGenericDebugData, idInvKinWalkingParameters, idMotionNet, idOdometryScale, idText, GenericDebugData::motionStabilizer, WalkRequest::normal, OUTPUT, pSpecialActions, pWalkingEngine, PIDsmoothedValue::setWeightP(), MotionStabilizer::stabilizerScale, text, MotionStabilizer::xFore, MotionStabilizer::xHind, MotionStabilizer::yLeft, and MotionStabilizer::yRight.
void GT2004MotionControl::setMotionControlState | ( | ) | [protected] |
sets the MotionControlState accordingly
Definition at line 141 of file GT2004MotionControl.cpp.
References getup, MotionRequest::getup, motionControlState, MotionControlInterfaces::motionRequest, MotionRequest::motionType, playDead, MotionRequest::playDead, specialAction, MotionRequest::specialAction, stand, MotionRequest::stand, walk, and MotionRequest::walk.
Referenced by determineMotionControlState().
void GT2004MotionControl::wagTail | ( | const MotionRequest & | motionRequest, | |
const SensorData & | sensorData, | |||
JointData & | jointData | |||
) | [protected] |
executes the tail wag requested by motion request
Definition at line 319 of file GT2004MotionControl.cpp.
References SensorData::data, JointData::data, TailRequest::eightPositionSwitch, TailRequest::fivePositionSwitch, TailRequest::fourPositionSwitchCorners, TailRequest::fourPositionSwitchUpDownLeftRight, SensorData::headPan, jointDataInvalidValue, RobotDimensions::jointLimitTailPanN, RobotDimensions::jointLimitTailPanP, RobotDimensions::jointLimitTailTiltN, RobotDimensions::jointLimitTailTiltP, MotionControlInterfaces::motionRequest, SensorData::neckTilt, TailRequest::noTailWag, pi, sgn, TailRequest::stayAsForced, TailRequest::stayAsForcedPan, TailRequest::stayAsForcedTilt, TailRequest::tailCenterBottom, TailRequest::tailCenterCenter, TailRequest::tailCenterTop, tailCount, TailRequest::tailFollowsHead, TailRequest::tailLeftBottom, TailRequest::tailLeftCenter, TailRequest::tailLeftTop, SensorData::tailPan, JointData::tailPan, TailRequest::tailParallelToGround, MotionRequest::tailRequest, TailRequest::tailRequestID, TailRequest::tailRightBottom, TailRequest::tailRightCenter, TailRequest::tailRightTop, SensorData::tailTilt, JointData::tailTilt, TailRequest::threePositionSwitchHorizontal, TailRequest::threePositionSwitchVertical, toMicroRad(), TailRequest::twoPositionSwitchHorizontal, TailRequest::twoPositionSwitchVertical, TailRequest::wagHorizontal, TailRequest::wagHorizontalFast, TailRequest::wagLeftRightHorizontal, TailRequest::wagLeftRightVertical, TailRequest::wagUpDownLeft, TailRequest::wagUpDownRight, TailRequest::wagVertical, and TailRequest::wagVerticalFast.
bool GT2004MotionControl::changeOfMotionControlStatePossible [protected] |
the last executed Motion indicated, that itīs possible to execute the motionRequest from Cognition
Definition at line 111 of file GT2004MotionControl.h.
Referenced by determineMotionControlState(), and execute().
long GT2004MotionControl::lastHeadPan [protected] |
Previous head pan.
Definition at line 95 of file GT2004MotionControl.h.
Referenced by execute(), and GT2004MotionControl().
long GT2004MotionControl::lastHeadRoll [protected] |
Previous head roll.
Definition at line 95 of file GT2004MotionControl.h.
Referenced by execute(), and GT2004MotionControl().
long GT2004MotionControl::lastHeadTilt [protected] |
Previous head tilt.
Definition at line 95 of file GT2004MotionControl.h.
Referenced by execute(), and GT2004MotionControl().
which module was used before
Definition at line 69 of file GT2004MotionControl.h.
Referenced by execute(), and GT2004MotionControl().
The latest SpecialActionRequest
Definition at line 120 of file GT2004MotionControl.h.
Referenced by execute().
WalkRequest GT2004MotionControl::latestWalkRequest [protected] |
The latest WalkRequest
Definition at line 117 of file GT2004MotionControl.h.
Referenced by execute().
ModuleHandler& GT2004MotionControl::moduleHandler [protected] |
A reference to the ModuleHandler of the Process. Needed to create new solutions.
Definition at line 90 of file GT2004MotionControl.h.
Referenced by GT2004MotionControl(), and ~GT2004MotionControl().
enum { ... } GT2004MotionControl::motionControlState [protected] |
The state of the MotionControl
Referenced by determineMotionControlState(), execute(), and setMotionControlState().
GetupEngineSelector* GT2004MotionControl::pGetupEngine [protected] |
a pointer to the GetupEngine module
Definition at line 78 of file GT2004MotionControl.h.
Referenced by execute(), GT2004MotionControl(), and ~GT2004MotionControl().
a point to the single instance of the InvKinWalkingEngine this is called by all different walk types using different parameter sets
Definition at line 84 of file GT2004MotionControl.h.
Referenced by GT2004MotionControl(), and ~GT2004MotionControl().
double GT2004MotionControl::positionInWalkCycle [protected] |
the last cycle we were in
Definition at line 114 of file GT2004MotionControl.h.
Referenced by determineMotionControlState(), and execute().
SpecialActions* GT2004MotionControl::pSpecialActions [protected] |
a pointer to the SpecialActions module
Definition at line 75 of file GT2004MotionControl.h.
Referenced by determineMotionControlState(), execute(), GT2004MotionControl(), handleMessage(), and ~GT2004MotionControl().
WalkingEngine* GT2004MotionControl::pWalkingEngine[WalkRequest::numOfWalkType] [protected] |
pointer to the WalkingEngine modules one for each walking type
Definition at line 72 of file GT2004MotionControl.h.
Referenced by execute(), GT2004MotionControl(), handleMessage(), and ~GT2004MotionControl().
int GT2004MotionControl::tailCount [protected] |
counter used in wagTail
Definition at line 93 of file GT2004MotionControl.h.
Referenced by wagTail().
WakeUpEngine GT2004MotionControl::wakeUpEngine [protected] |
bool GT2004MotionControl::wakingUp [protected] |