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

GT2005MotionControl Class Reference

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

#include <GT2005MotionControl.h>

Inheritance diagram for GT2005MotionControl:

Inheritance graph
[legend]
Collaboration diagram for GT2005MotionControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2005MotionControl (ModuleHandler &moduleHandler, const MotionControlInterfaces &interfaces)
 Constructor.

 ~GT2005MotionControl ()
 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 GT2005MotionControl:: { ... }  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 GT2005MotionControl.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 GT2005MotionControl.h.


Constructor & Destructor Documentation

GT2005MotionControl::GT2005MotionControl 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 GT2005MotionControl.cpp.

References lastHeadRoll, pGetupEngine, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, and wakingUp.

GT2005MotionControl::~GT2005MotionControl  ) 
 

Destructor.

Definition at line 78 of file GT2005MotionControl.cpp.

References pGetupEngine, pInvKinWalkingEngine, pSpecialActions, pWalkingEngine, and ModuleHandler::setModuleSelector().

Here is the call graph for this function:


Member Function Documentation

void GT2005MotionControl::execute  )  [virtual]
 

Executes the module.

Todo:
:

Reimplemented from Module.

Definition at line 166 of file GT2005MotionControl.cpp.

References changeOfMotionControlStatePossible, PIDData::d, JointData::data, DEBUG_RESPONSE, determineMotionControlState(), WakeUpEngine::execute(), MotionInfo::executedMotionRequest, SpecialActions::executeParameterized(), WalkingEngine::executeParameterized(), GetupEngineSelector::executeParameterized(), SensorDataBuffer::frame, JointDataBuffer::frame, MotionRequest::getup, getup, PIDData::i, SensorDataBuffer::lastFrame(), 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, wagTail(), wakeUp, wakeUpEngine, walk, MotionRequest::walk, WalkRequest::walkParams, MotionRequest::walkRequest, and WalkRequest::walkType.

Here is the call graph for this function:

bool GT2005MotionControl::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 619 of file GT2005MotionControl.cpp.

References InMessage::bin, GenericDebugData::data, InMessage::getMessageID(), Module::handleMessage(), GenericDebugData::id, idGenericDebugData, idGT2005Request, idInvKinWalkingParameters, idMotionNet, idOdometryScale, idText, OUTPUT, pSpecialActions, pWalkingEngine, and PIDsmoothedValue::setWeightP().

Here is the call graph for this function:

void GT2005MotionControl::determineMotionControlState  )  [protected]
 

determines the state of the MotionControl

Definition at line 94 of file GT2005MotionControl.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 GT2005MotionControl::setMotionControlState  )  [protected]
 

sets the MotionControlState accordingly

Definition at line 145 of file GT2005MotionControl.cpp.

References getup, MotionRequest::getup, motionControlState, MotionRequest::motionType, specialAction, MotionRequest::specialAction, stand, MotionRequest::stand, walk, and MotionRequest::walk.

Referenced by determineMotionControlState().

void GT2005MotionControl::wagTail const MotionRequest motionRequest,
const SensorData sensorData,
JointData jointData
[protected]
 

executes the tail wag requested by motion request

Definition at line 325 of file GT2005MotionControl.cpp.

References SensorData::data, JointData::data, pi, sgn, tailCount, MotionRequest::tailRequest, TailRequest::tailRequestID, and toMicroRad().

Referenced by execute().

Here is the call graph for this function:


Member Data Documentation

MotionRequest::MotionID GT2005MotionControl::lastMotionType [protected]
 

which module was used before

Definition at line 69 of file GT2005MotionControl.h.

WalkingEngine* GT2005MotionControl::pWalkingEngine[WalkRequest::numOfWalkType] [protected]
 

pointer to the WalkingEngine modules one for each walking type

Definition at line 72 of file GT2005MotionControl.h.

Referenced by execute(), GT2005MotionControl(), handleMessage(), and ~GT2005MotionControl().

SpecialActions* GT2005MotionControl::pSpecialActions [protected]
 

a pointer to the SpecialActions module

Definition at line 75 of file GT2005MotionControl.h.

Referenced by determineMotionControlState(), execute(), GT2005MotionControl(), handleMessage(), and ~GT2005MotionControl().

GetupEngineSelector* GT2005MotionControl::pGetupEngine [protected]
 

a pointer to the GetupEngine module

Definition at line 78 of file GT2005MotionControl.h.

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

InvKinWalkingEngine* GT2005MotionControl::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 GT2005MotionControl.h.

Referenced by GT2005MotionControl(), and ~GT2005MotionControl().

ModuleHandler& GT2005MotionControl::moduleHandler [protected]
 

A reference to the ModuleHandler of the Process.

Needed to create new solutions.

Definition at line 90 of file GT2005MotionControl.h.

int GT2005MotionControl::tailCount [protected]
 

counter used in wagTail

Definition at line 93 of file GT2005MotionControl.h.

Referenced by wagTail().

long GT2005MotionControl::lastHeadTilt [protected]
 

Previous head tilt.

Definition at line 95 of file GT2005MotionControl.h.

long GT2005MotionControl::lastHeadPan [protected]
 

Previous head pan.

Definition at line 95 of file GT2005MotionControl.h.

long GT2005MotionControl::lastHeadRoll [protected]
 

Previous head roll.

Definition at line 95 of file GT2005MotionControl.h.

Referenced by execute(), and GT2005MotionControl().

WakeUpEngine GT2005MotionControl::wakeUpEngine [protected]
 

Definition at line 106 of file GT2005MotionControl.h.

Referenced by execute().

bool GT2005MotionControl::wakingUp [protected]
 

Definition at line 108 of file GT2005MotionControl.h.

Referenced by GT2005MotionControl().

bool GT2005MotionControl::changeOfMotionControlStatePossible [protected]
 

the last executed Motion indicated, that itīs possible to execute the motionRequest from Cognition

Definition at line 111 of file GT2005MotionControl.h.

Referenced by determineMotionControlState(), and execute().

double GT2005MotionControl::positionInWalkCycle [protected]
 

the last cycle we were in

Definition at line 114 of file GT2005MotionControl.h.

WalkRequest GT2005MotionControl::latestWalkRequest [protected]
 

The latest WalkRequest.

Definition at line 117 of file GT2005MotionControl.h.

Referenced by execute().

SpecialActionRequest GT2005MotionControl::latestSpecialActionRequest [protected]
 

The latest SpecialActionRequest.

Definition at line 120 of file GT2005MotionControl.h.

Referenced by execute().

enum { ... } GT2005MotionControl::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 Mon Mar 20 22:14:31 2006 for GT2005 by doxygen 1.3.6