Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GT2004MotionControl Class Reference

The default solution for the module MotionControl. More...

#include <GT2004MotionControl.h>

Inheritance diagram for GT2004MotionControl:

Inheritance graph
[legend]
Collaboration diagram for GT2004MotionControl:

Collaboration graph
[legend]
List of all members.

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

WalkingEnginepWalkingEngine [WalkRequest::numOfWalkType]
 pointer to the WalkingEngine modules one for each walking type

SpecialActionspSpecialActions
 a pointer to the SpecialActions module

GetupEngineSelectorpGetupEngine
 a pointer to the GetupEngine module

InvKinWalkingEnginepInvKinWalkingEngine
 a point to the single instance of the InvKinWalkingEngine this is called by all different walk types using different parameter sets

ModuleHandlermoduleHandler
 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.


Detailed Description

The default solution for the module 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.


Member Enumeration Documentation

anonymous enum [protected]
 

The state of the MotionControl.

Enumeration values:
stand 
walk 
specialAction 
getup 
wakeUp 
playDead 

Definition at line 123 of file GT2004MotionControl.h.


Constructor & Destructor Documentation

GT2004MotionControl::GT2004MotionControl ModuleHandler moduleHandler,
const MotionControlInterfaces interfaces
 

Constructor.

Parameters:
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 lastHeadRoll, pGetupEngine, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, and wakingUp.

GT2004MotionControl::~GT2004MotionControl  ) 
 

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:


Member Function Documentation

void GT2004MotionControl::execute  )  [virtual]
 

Executes the module.

Todo:
: wagTail(sensorDataBuffer.lastFrame(), currentFrame);

Implements Module.

Definition at line 162 of file GT2004MotionControl.cpp.

References changeOfMotionControlStatePossible, PIDData::d, JointData::data, determineMotionControlState(), WakeUpEngine::execute(), MotionInfo::executedMotionRequest, SpecialActions::executeParameterized(), WalkingEngine::executeParameterized(), GetupEngineSelector::executeParameterized(), SensorDataBuffer::frame, JointDataBuffer::frame, MotionRequest::getup, getup, PIDData::i, lastHeadRoll, latestSpecialActionRequest, latestWalkRequest, motionControlState, MotionRequest::motionType, HeadMotionRequest::mouth, PIDData::p, HeadMotionRequest::pan, pGetupEngine, MotionInfo::positionInWalkCycle, pSpecialActions, pWalkingEngine, HeadMotionRequest::roll, specialAction, MotionRequest::specialAction, MotionRequest::specialActionRequest, MotionStabilizer::stabilize(), MotionRequest::stand, stand, HeadMotionRequest::tilt, wakeUp, wakeUpEngine, walk, MotionRequest::walk, WalkRequest::walkParams, MotionRequest::walkRequest, and WalkRequest::walkType.

Here is the call graph for this function:

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.

Parameters:
message The message that can be read.
Returns:
true if the message was read (handled).

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:

void GT2004MotionControl::determineMotionControlState  )  [protected]
 

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:

void GT2004MotionControl::setMotionControlState  )  [protected]
 

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().

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, pi, sgn, tailCount, MotionRequest::tailRequest, TailRequest::tailRequestID, and toMicroRad().

Here is the call graph for this function:


Member Data Documentation

MotionRequest::MotionID GT2004MotionControl::lastMotionType [protected]
 

which module was used before

Definition at line 69 of file GT2004MotionControl.h.

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().

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().

GetupEngineSelector* GT2004MotionControl::pGetupEngine [protected]
 

a pointer to the GetupEngine module

Definition at line 78 of file GT2004MotionControl.h.

Referenced by execute(), GT2004MotionControl(), and ~GT2004MotionControl().

InvKinWalkingEngine* GT2004MotionControl::pInvKinWalkingEngine [protected]
 

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().

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.

int GT2004MotionControl::tailCount [protected]
 

counter used in wagTail

Definition at line 93 of file GT2004MotionControl.h.

Referenced by wagTail().

long GT2004MotionControl::lastHeadTilt [protected]
 

Previous head tilt.

Definition at line 95 of file GT2004MotionControl.h.

long GT2004MotionControl::lastHeadPan [protected]
 

Previous head pan.

Definition at line 95 of file GT2004MotionControl.h.

long GT2004MotionControl::lastHeadRoll [protected]
 

Previous head roll.

Definition at line 95 of file GT2004MotionControl.h.

Referenced by execute(), and GT2004MotionControl().

WakeUpEngine GT2004MotionControl::wakeUpEngine [protected]
 

Definition at line 106 of file GT2004MotionControl.h.

Referenced by execute().

bool GT2004MotionControl::wakingUp [protected]
 

Definition at line 108 of file GT2004MotionControl.h.

Referenced by GT2004MotionControl().

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().

double GT2004MotionControl::positionInWalkCycle [protected]
 

the last cycle we were in

Definition at line 114 of file GT2004MotionControl.h.

WalkRequest GT2004MotionControl::latestWalkRequest [protected]
 

The latest WalkRequest.

Definition at line 117 of file GT2004MotionControl.h.

Referenced by execute().

SpecialActionRequest GT2004MotionControl::latestSpecialActionRequest [protected]
 

The latest SpecialActionRequest.

Definition at line 120 of file GT2004MotionControl.h.

Referenced by execute().

enum { ... } GT2004MotionControl::motionControlState [protected]
 

The state of the MotionControl.

Referenced by determineMotionControlState(), execute(), and setMotionControlState().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:07:42 2004 for GT2004 by doxygen 1.3.6