DebugMotionControl Class Reference

#include <DebugMotionControl.h>

Inheritance diagram for DebugMotionControl:

MotionControl MotionStabilizer Module MotionControlInterfaces RobotDimensions MessageHandler List of all members.

Public Member Functions

 DebugMotionControl (const MotionControlInterfaces &interfaces)
virtual void execute ()
virtual bool handleMessage (InMessage &message)

Protected Member Functions

void executeStayAsForced (const SensorData &sensorData, JointData &jointData)
void setStayAsForcedValue (const SensorData &sensorData, JointData &jointData, SensorData::sensors sensor, JointData::JointID joint, long tolerance)
void clip ()

Protected Attributes

JointDataSequencer sequencer
JointData stayAsForcedOldValue

Detailed Description

A MotionControl module for debugging purposes.

It ignores MotionRequest but processes and executes JointDataSequence debug messages.

Author:
Max Risler

Definition at line 26 of file DebugMotionControl.h.


Constructor & Destructor Documentation

DebugMotionControl::DebugMotionControl ( const MotionControlInterfaces interfaces  )  [inline]

Constructor

Parameters:
interfaces The paramters of the MotionControl module.

Definition at line 33 of file DebugMotionControl.h.


Member Function Documentation

void DebugMotionControl::clip (  )  [protected]

Clips the set joint values to allowed values

Definition at line 63 of file DebugMotionControl.cpp.

References CLIP, JointData::data, JointDataBuffer::frame, JointData::headPan, JointData::headTilt, MotionControlInterfaces::jointDataBuffer, jointDataBufferNumOfFrames, RobotDimensions::jointLimitHeadPanN, RobotDimensions::jointLimitHeadPanP, RobotDimensions::jointLimitHeadTiltN, RobotDimensions::jointLimitHeadTiltP, RobotDimensions::jointLimitLeg1FN, RobotDimensions::jointLimitLeg1FP, RobotDimensions::jointLimitLeg1HN, RobotDimensions::jointLimitLeg1HP, RobotDimensions::jointLimitLeg2N, RobotDimensions::jointLimitLeg2P, RobotDimensions::jointLimitLeg3N, RobotDimensions::jointLimitLeg3P, RobotDimensions::jointLimitNeckTiltN, RobotDimensions::jointLimitNeckTiltP, JointData::legFL1, JointData::legFL2, JointData::legFL3, JointData::legFR1, JointData::legFR2, JointData::legFR3, JointData::legHL1, JointData::legHL2, JointData::legHL3, JointData::legHR1, JointData::legHR2, JointData::legHR3, JointData::neckTilt, and toMicroRad().

Referenced by execute().

void DebugMotionControl::execute (  )  [virtual]

Executes the module

Implements Module.

Definition at line 11 of file DebugMotionControl.cpp.

References clip(), executeStayAsForced(), JointDataBuffer::frame, JointDataSequencer::isRunning(), MotionControlInterfaces::jointDataBuffer, jointDataBufferNumOfFrames, jointDataInvalidValue, SensorDataBuffer::lastFrame(), JointDataSequencer::nextSequenceData(), MotionControlInterfaces::sensorDataBuffer, sequencer, JointData::tailPan, and JointData::tailTilt.

void DebugMotionControl::executeStayAsForced ( const SensorData sensorData,
JointData jointData 
) [protected]

write sensorData back to jointData for joints with invalidValue to disable any motion (=stay as forced)

Definition at line 89 of file DebugMotionControl.cpp.

References SET_STAYASFORCED.

Referenced by execute().

bool DebugMotionControl::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 46 of file DebugMotionControl.cpp.

References InMessage::bin, InMessage::getMessageID(), idJointDataSequence, sequencer, and JointDataSequencer::start().

void DebugMotionControl::setStayAsForcedValue ( const SensorData sensorData,
JointData jointData,
SensorData::sensors  sensor,
JointData::JointID  joint,
long  tolerance 
) [protected]

Definition at line 112 of file DebugMotionControl.cpp.

References SensorData::data, JointData::data, jointDataInvalidValue, and stayAsForcedOldValue.


Member Data Documentation

JointDataSequencer DebugMotionControl::sequencer [protected]

the JointDataSequencer

Definition at line 53 of file DebugMotionControl.h.

Referenced by execute(), and handleMessage().

JointData DebugMotionControl::stayAsForcedOldValue [protected]

old values for stay as forced mode

Definition at line 72 of file DebugMotionControl.h.

Referenced by setStayAsForcedValue().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:28:07 2006 for DT2005.panorama by  doxygen 1.4.7