#include <GT2004MotionControl.h>
Inheritance diagram for GT2004MotionControl:
Public Member Functions | |
GT2004MotionControl (ModuleHandler &moduleHandler, const MotionControlInterfaces &interfaces) | |
Constructor. | |
~GT2004MotionControl () | |
Destructor. | |
virtual void | execute () |
Executes the module. | |
virtual bool | handleMessage (InMessage &message) |
Called from a MessageQueue to distribute messages. | |
Protected Types | |
enum | { stand, walk, specialAction, getup, wakeUp, playDead } |
The state of the MotionControl. More... | |
Protected Member Functions | |
void | determineMotionControlState () |
determines the state of the MotionControl | |
void | setMotionControlState () |
sets the MotionControlState accordingly | |
void | wagTail (const MotionRequest &motionRequest, const SensorData &sensorData, JointData &jointData) |
executes the tail wag requested by motion request | |
Protected Attributes | |
MotionRequest::MotionID | lastMotionType |
which module was used before | |
WalkingEngine * | pWalkingEngine [WalkRequest::numOfWalkType] |
pointer to the WalkingEngine modules one for each walking type | |
SpecialActions * | pSpecialActions |
a pointer to the SpecialActions module | |
GetupEngineSelector * | pGetupEngine |
a pointer to the GetupEngine module | |
InvKinWalkingEngine * | pInvKinWalkingEngine |
a point to the single instance of the InvKinWalkingEngine this is called by all different walk types using different parameter sets | |
ModuleHandler & | moduleHandler |
A reference to the ModuleHandler of the Process. | |
int | tailCount |
counter used in wagTail | |
long | lastHeadTilt |
Previous head tilt. | |
long | lastHeadPan |
Previous head pan. | |
long | lastHeadRoll |
Previous head roll. | |
WakeUpEngine | wakeUpEngine |
bool | wakingUp |
bool | changeOfMotionControlStatePossible |
the last executed Motion indicated, that itīs possible to execute the motionRequest from Cognition | |
double | positionInWalkCycle |
the last cycle we were in | |
WalkRequest | latestWalkRequest |
The latest WalkRequest. | |
SpecialActionRequest | latestSpecialActionRequest |
The latest SpecialActionRequest. | |
enum GT2004MotionControl:: { ... } | motionControlState |
The state of the MotionControl. |
Integrates head joint values from the head control, joint values from walking or special action engines and LED values from the LED control.
Definition at line 31 of file GT2004MotionControl.h.
|
The state of the MotionControl.
Definition at line 123 of file GT2004MotionControl.h. |
|
Constructor.
Definition at line 22 of file GT2004MotionControl.cpp. References lastHeadRoll, pGetupEngine, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, and wakingUp. |
|
Destructor.
Definition at line 74 of file GT2004MotionControl.cpp. References pGetupEngine, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, and ModuleHandler::setModuleSelector(). |
Here is the call graph for this function:
|
Here is the call graph for this function:
|
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.
Reimplemented from Module. Definition at line 613 of file GT2004MotionControl.cpp. References InMessage::bin, GenericDebugData::data, InMessage::getMessageID(), Module::handleMessage(), GenericDebugData::id, idGenericDebugData, idInvKinWalkingParameters, idMotionNet, idOdometryScale, idText, OUTPUT, pSpecialActions, pWalkingEngine, and PIDsmoothedValue::setWeightP(). |
Here is the call graph for this function:
|
determines the state of the MotionControl
Definition at line 90 of file GT2004MotionControl.cpp. References changeOfMotionControlStatePossible, getup, motionControlState, MotionRequest::motionType, pSpecialActions, setMotionControlState(), MotionRequest::specialAction, specialAction, SpecialActions::specialActionIsExecutableInWalkingCycle(), MotionRequest::specialActionRequest, SpecialActionRequest::specialActionType, stand, wakeUp, and walk. Referenced by execute(). |
Here is the call graph for this function:
|
sets the MotionControlState accordingly
Definition at line 141 of file GT2004MotionControl.cpp. References getup, MotionRequest::getup, motionControlState, MotionRequest::motionType, specialAction, MotionRequest::specialAction, stand, MotionRequest::stand, walk, and MotionRequest::walk. Referenced by determineMotionControlState(). |
|
executes the tail wag requested by motion request
Definition at line 319 of file GT2004MotionControl.cpp. References SensorData::data, JointData::data, pi, sgn, tailCount, MotionRequest::tailRequest, TailRequest::tailRequestID, and toMicroRad(). |
Here is the call graph for this function:
|
which module was used before
Definition at line 69 of file GT2004MotionControl.h. |
|
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(). |
|
a pointer to the SpecialActions module
Definition at line 75 of file GT2004MotionControl.h. Referenced by determineMotionControlState(), execute(), GT2004MotionControl(), handleMessage(), and ~GT2004MotionControl(). |
|
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(). |
|
A reference to the ModuleHandler of the Process. Needed to create new solutions. Definition at line 90 of file GT2004MotionControl.h. |
|
counter used in wagTail
Definition at line 93 of file GT2004MotionControl.h. Referenced by wagTail(). |
|
Previous head tilt.
Definition at line 95 of file GT2004MotionControl.h. |
|
Previous head pan.
Definition at line 95 of file GT2004MotionControl.h. |
|
Previous head roll.
Definition at line 95 of file GT2004MotionControl.h. Referenced by execute(), and GT2004MotionControl(). |
|
Definition at line 106 of file GT2004MotionControl.h. Referenced by execute(). |
|
Definition at line 108 of file GT2004MotionControl.h. Referenced by GT2004MotionControl(). |
|
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(). |
|
the last cycle we were in
Definition at line 114 of file GT2004MotionControl.h. |
|
The latest WalkRequest.
Definition at line 117 of file GT2004MotionControl.h. Referenced by execute(). |
|
The latest SpecialActionRequest.
Definition at line 120 of file GT2004MotionControl.h. Referenced by execute(). |
|
The state of the MotionControl.
Referenced by determineMotionControlState(), execute(), and setMotionControlState(). |