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

# GT2005WalkingEngine Class Reference

`#include <GT2005WalkingEngine.h>`

Inheritance diagram for GT2005WalkingEngine:

[legend]
Collaboration diagram for GT2005WalkingEngine:

[legend]
List of all members.

## Public Member Functions
| GT2005WalkingEngine (const WalkingEngineInterfaces &interfaces)
| ~GT2005WalkingEngine ()
virtual bool | executeParameterized (JointData &jointData, const WalkRequest &walkRequest, double positionInWalkingCycle)
| Calculates the next joint data set.
virtual bool | handleMessage (InMessage &message)
| Called from a MessageQueue to distribute messages.
## Public Attributes
bool | initWithOldStyleShape
int | activePoints
double | footPhase [4]
Vector3< double > | footZeroPosition [4]
GT2005Polygon * | currentPoly [4]
GT2005Parameters * | currentFIPSParameters
int | currentStep
bool | standing
bool | loadingFailed
## Static Public Attributes
const int | Leg_FR = 0
const int | Leg_FL = 1
const int | Leg_HR = 2
const int | Leg_HL = 3
## Private Member Functions
void | calculateData (JointData &j)
void | smoothMotionRequest (const Pose2D &request, Pose2D &currentRequest)
void | readDebugData (double ssf[4], double a[4], double c_offset[4], JointData &j)
void | streamDebugData ()
void | readResampleData (double c_scale[4], double c_angle[4], double c_offset[4], JointData &j, Vector3< double > fp[4])
void | loadPolys (int polyID, InMessage &message)
void | sendPolys (int polyID)
void | readOdometryCalibrationData ()
Pose2D | calculateOdometryCalibrationData (Pose2D request, WalkRequest::WalkType walkType)
void | loadOdometryPlane (int planeNum, char *filename, int alternateDir)
void | loadOdometryRotation (int rotNum, char *filename, int alternateDir)
## Private Attributes
double | neckHeight
double | bodyTilt
Pose2D | odometry
Pose2D | currentRequest
double | currentStepPercentage
GT2004Parameters * | currentParameters
GT2004ParametersSet | paramSet
bool | debugging
bool | debugRequest
bool | debugLoop
Vector3< double > | debugDataReal [4][128]
Vector3< double > | debugDataIdeal [4][128]
long | debugDataBuffer [4][12]
bool | resampleRequest
bool | resampling
int | polygonsRecieved
odometryPoint | odometryCalibrationData [15][13][7]
odometryPoint | odometryCalibrationData2 [2][21]

## Constructor & Destructor Documentation

GT2005WalkingEngine::GT2005WalkingEngine | ( | const WalkingEngineInterfaces & | interfaces | ) |

| Definition at line 21 of file GT2005WalkingEngine.cpp. References currentFIPSParameters, currentPoly, currentStep, debugging, debugLoop, debugRequest, GT2005DebugData::gt2005Status, idText, Leg_FL, Leg_FR, Leg_HL, Leg_HR, GT2005Parameters::loadingFailed, GT2004ParametersSet::mergedParameters, OUTPUT, polygonsRecieved, readOdometryCalibrationData(), resampleRequest, and resampling.

Here is the call graph for this function:

GT2005WalkingEngine::~GT2005WalkingEngine | ( |  | ) |

| Definition at line 75 of file GT2005WalkingEngine.cpp. References currentFIPSParameters, and currentPoly.

## Member Function Documentation

bool GT2005WalkingEngine::executeParameterized | ( | JointData & | jointData,
|  | const WalkRequest & | walkRequest,
|  | double | positionInWalkingCycle
| ) | `[virtual]`

  | Calculates the next joint data set. Parameters:
  jointData | stores calculated frame
  walkRequest | The current motion request
  positionInWalkingCycle | A request position for the walkcycle.
Returns: true if next set should be calculated by WalkingEngine false if change to other module can occur Implements WalkingEngine. Definition at line 346 of file GT2005WalkingEngine.cpp. References Vector2< double >::abs(), GTWalkParametersIndividual::bMessage, MotionInfo::bodyTilt, RobotCalibration::bodyTiltOffset, GT2005Parameters::calculateCurrentPoly(), calculateData(), calculateOdometryCalibrationData(), Pose2D::conc(), GT2005Polygon::copy(), currentFIPSParameters, currentPoly, currentStep, debugging, debugRequest, GT2005Parameters::evoPoly, MotionInfo::executedMotionRequest, GT2005Parameters::footPhase, GT2005Parameters::footZeroPosition, RobotConfiguration::getRobotCalibration(), getRobotConfiguration(), GT2005DebugData::gt2005Status, idText, Leg_FL, Leg_FR, Leg_HL, Leg_HR, MotionInfo::motionIsStable, MotionRequest::motionType, MotionInfo::neckHeight, OUTPUT, polygonsRecieved, MotionInfo::positionInWalkCycle, resampleRequest, resampling, Pose2D::rotation, PIDData::setLegFJ1Values(), PIDData::setLegFJ2Values(), PIDData::setLegFJ3Values(), PIDData::setLegHJ1Values(), PIDData::setLegHJ2Values(), PIDData::setLegHJ3Values(), smoothMotionRequest(), GT2005Parameters::specialMode, GT2005Polygon::stepLength, GT2005Parameters::stepLength, streamDebugData(), Pose2D::translation, GTWalkParametersIndividual::walkingParameters, WalkRequest::walkParams, MotionRequest::walkRequest, WalkRequest::walkType, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

bool GT2005WalkingEngine::handleMessage | ( | InMessage & | message | ) | `[virtual]`

  | Called from a MessageQueue to distribute messages. Parameters:
  message | The message that can be read.
Returns: true if the message was read (handled). Reimplemented from Module. Definition at line 671 of file GT2005WalkingEngine.cpp. References InMessage::bin, debugRequest, InMessage::getMessageID(), idGT2005Request, idText, loadPolys(), OUTPUT, resampleRequest, and sendPolys().

Here is the call graph for this function:

void GT2005WalkingEngine::calculateData | ( | JointData & | j | ) | `[private]`

| Definition at line 537 of file GT2005WalkingEngine.cpp. References currentFIPSParameters, currentPoly, JointData::data, debugging, GT2005Parameters::footZeroPosition, GT2004Parameters::headPan, GT2004Parameters::headRoll, GT2004Parameters::headTilt, Kinematics::jointsFromLegPosition(), Leg_FL, Leg_FR, Leg_HL, Leg_HR, GT2004Parameters::mouth, GT2005Polygon::polyLengthX, readDebugData(), readResampleData(), resampling, Pose2D::rotation, GT2005Parameters::stepLength, toMicroRad(), Pose2D::translation, Vector2< double >::x, Vector3< V >::x, Vector2< double >::y, Vector3< V >::y, and Vector3< V >::z. Referenced by executeParameterized().

Here is the call graph for this function:

void GT2005WalkingEngine::smoothMotionRequest | ( | const Pose2D & | request,
|  | Pose2D & | currentRequest
| ) | `[private]`

| Definition at line 951 of file GT2005WalkingEngine.cpp. References Pose2D::rotation, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by executeParameterized().

void GT2005WalkingEngine::readDebugData | ( | double | ssf[4],
|  | double | a[4],
|  | double | c_offset[4],
|  | JointData & | j
| ) | `[private]`

| Definition at line 995 of file GT2005WalkingEngine.cpp. References currentFIPSParameters, currentStep, SensorData::data, JointData::data, debugDataBuffer, debugDataIdeal, debugDataReal, debugRequest, GT2005Parameters::footZeroPosition, SensorDataBuffer::frame, fromMicroRad(), Leg_FL, Leg_FR, Leg_HL, Leg_HR, Kinematics::legPositionFromJoints(), Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z. Referenced by calculateData().

Here is the call graph for this function:

void GT2005WalkingEngine::streamDebugData | ( |  | ) | `[private]`

| Definition at line 1443 of file GT2005WalkingEngine.cpp. References OutMessage::bin, currentFIPSParameters, debugDataIdeal, debugDataReal, OutMessage::finishMessage(), getDebugOut(), idGT2005DebugData, Leg_FL, Leg_FR, Leg_HL, Leg_HR, GT2005Polygon::numPoints, out, GT2005Polygon::setSegment(), and GT2005Parameters::stepLength. Referenced by executeParameterized().

Here is the call graph for this function:

void GT2005WalkingEngine::readResampleData | ( | double | c_scale[4],
|  | double | c_angle[4],
|  | double | c_offset[4],
|  | JointData & | j,
|  | Vector3< double > | fp[4]
| ) | `[private]`

| Definition at line 1232 of file GT2005WalkingEngine.cpp. References currentFIPSParameters, currentStep, SensorData::data, JointData::data, debugDataBuffer, debugDataIdeal, debugDataReal, GT2005Parameters::footZeroPosition, SensorDataBuffer::frame, fromMicroRad(), Leg_FL, Leg_FR, Leg_HL, Leg_HR, Kinematics::legPositionFromJoints(), resampleRequest, Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z. Referenced by calculateData().

Here is the call graph for this function:

void GT2005WalkingEngine::loadPolys | ( | int | polyID,
|  | InMessage & | message
| ) | `[private]`

| Definition at line 718 of file GT2005WalkingEngine.cpp. References GT2005Parameters::backwardPoly, InMessage::bin, GT2005Parameters::boostPoly, currentFIPSParameters, GT2005Parameters::dbackwardPoly, GT2005Parameters::dforwardPoly, GT2005Parameters::evoPoly, GT2005Parameters::forwardPoly, GT2005Parameters::grabPoly, Leg_FL, Leg_FR, Leg_HL, Leg_HR, GT2005Parameters::omniPoly, GT2005Parameters::rgrabPoly, GT2005Parameters::rotPoly, GT2005Parameters::sbackwardPoly, GT2005Parameters::sforwardPoly, and GT2005Parameters::sidewardsPoly. Referenced by handleMessage().

void GT2005WalkingEngine::sendPolys | ( | int | polyID | ) | `[private]`

| Definition at line 829 of file GT2005WalkingEngine.cpp. References GT2005Parameters::backwardPoly, OutMessage::bin, GT2005Parameters::boostPoly, currentFIPSParameters, GT2005Parameters::dbackwardPoly, GT2005Parameters::dforwardPoly, GT2005Parameters::evoPoly, OutMessage::finishMessage(), GT2005Parameters::forwardPoly, getDebugOut(), GT2005Parameters::grabPoly, idGT2005DebugData, Leg_FL, Leg_FR, Leg_HL, Leg_HR, GT2005Parameters::omniPoly, out, GT2005Parameters::rgrabPoly, GT2005Parameters::rotPoly, GT2005Parameters::sbackwardPoly, GT2005Parameters::sforwardPoly, and GT2005Parameters::sidewardsPoly. Referenced by handleMessage().

Here is the call graph for this function:

void GT2005WalkingEngine::readOdometryCalibrationData | ( |  | ) | `[private]`

| Definition at line 184 of file GT2005WalkingEngine.cpp. References InStream< InFile, InConfig >::eof(), InFile::exists(), SystemCall::getMacAddress(), idText, loadOdometryPlane(), loadOdometryRotation(), and OUTPUT. Referenced by GT2005WalkingEngine().

Here is the call graph for this function:

Pose2D GT2005WalkingEngine::calculateOdometryCalibrationData | ( | Pose2D | request,
|  | WalkRequest::WalkType | walkType
| ) | `[private]`

| Definition at line 211 of file GT2005WalkingEngine.cpp. References GT2005WalkingEngine::odometryPoint::controlled, GT2005WalkingEngine::odometryPoint::measured, odometryCalibrationData, odometryCalibrationData2, Pose2D::rotation, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y. Referenced by executeParameterized().

void GT2005WalkingEngine::loadOdometryPlane | ( | int | planeNum,
|  | char * | filename,
|  | int | alternateDir
| ) | `[private]`

| Definition at line 84 of file GT2005WalkingEngine.cpp. References GT2005WalkingEngine::odometryPoint::controlled, InFile::exists(), idText, odometryCalibrationData, and OUTPUT. Referenced by readOdometryCalibrationData().

Here is the call graph for this function:

void GT2005WalkingEngine::loadOdometryRotation | ( | int | rotNum,
|  | char * | filename,
|  | int | alternateDir
| ) | `[private]`

| Definition at line 138 of file GT2005WalkingEngine.cpp. References GT2005WalkingEngine::odometryPoint::controlled, InFile::exists(), idText, odometryCalibrationData2, and OUTPUT. Referenced by readOdometryCalibrationData().

Here is the call graph for this function:

## Member Data Documentation

bool GT2005WalkingEngine::initWithOldStyleShape

| Definition at line 47 of file GT2005WalkingEngine.h.

const int GT2005WalkingEngine::Leg_FR = 0`[static]`

| Definition at line 16 of file GT2005WalkingEngine.cpp. Referenced by calculateData(), executeParameterized(), GT2005WalkingEngine(), loadPolys(), readDebugData(), readResampleData(), sendPolys(), and streamDebugData().

const int GT2005WalkingEngine::Leg_FL = 1`[static]`

| Definition at line 17 of file GT2005WalkingEngine.cpp. Referenced by calculateData(), executeParameterized(), GT2005WalkingEngine(), loadPolys(), readDebugData(), readResampleData(), sendPolys(), and streamDebugData().

const int GT2005WalkingEngine::Leg_HR = 2`[static]`

| Definition at line 18 of file GT2005WalkingEngine.cpp. Referenced by calculateData(), executeParameterized(), GT2005WalkingEngine(), loadPolys(), readDebugData(), readResampleData(), sendPolys(), and streamDebugData().

const int GT2005WalkingEngine::Leg_HL = 3`[static]`

| Definition at line 19 of file GT2005WalkingEngine.cpp. Referenced by calculateData(), executeParameterized(), GT2005WalkingEngine(), loadPolys(), readDebugData(), readResampleData(), sendPolys(), and streamDebugData().

int GT2005WalkingEngine::activePoints

| Definition at line 55 of file GT2005WalkingEngine.h.

double GT2005WalkingEngine::footPhase[4]

| Definition at line 57 of file GT2005WalkingEngine.h.

Vector3<double> GT2005WalkingEngine::footZeroPosition[4]

| Definition at line 58 of file GT2005WalkingEngine.h.

GT2005Polygon* GT2005WalkingEngine::currentPoly[4]

| Definition at line 59 of file GT2005WalkingEngine.h. Referenced by calculateData(), executeParameterized(), GT2005WalkingEngine(), and ~GT2005WalkingEngine().

GT2005Parameters* GT2005WalkingEngine::currentFIPSParameters

| Definition at line 61 of file GT2005WalkingEngine.h. Referenced by calculateData(), executeParameterized(), GT2005WalkingEngine(), loadPolys(), readDebugData(), readResampleData(), sendPolys(), streamDebugData(), and ~GT2005WalkingEngine().

int GT2005WalkingEngine::currentStep

| Definition at line 63 of file GT2005WalkingEngine.h. Referenced by executeParameterized(), GT2005WalkingEngine(), readDebugData(), and readResampleData().

bool GT2005WalkingEngine::standing

| Definition at line 65 of file GT2005WalkingEngine.h.

bool GT2005WalkingEngine::loadingFailed

| Definition at line 67 of file GT2005WalkingEngine.h.

double GT2005WalkingEngine::neckHeight`[private]`

| Definition at line 71 of file GT2005WalkingEngine.h.

double GT2005WalkingEngine::bodyTilt`[private]`

| Definition at line 72 of file GT2005WalkingEngine.h.

Pose2D GT2005WalkingEngine::odometry`[private]`

| Definition at line 74 of file GT2005WalkingEngine.h.

Pose2D GT2005WalkingEngine::currentRequest`[private]`

| Definition at line 75 of file GT2005WalkingEngine.h.

double GT2005WalkingEngine::currentStepPercentage`[private]`

| Definition at line 76 of file GT2005WalkingEngine.h.

GT2004Parameters* GT2005WalkingEngine::currentParameters`[private]`

| Definition at line 77 of file GT2005WalkingEngine.h.

GT2004ParametersSet GT2005WalkingEngine::paramSet`[private]`

| Definition at line 78 of file GT2005WalkingEngine.h.

bool GT2005WalkingEngine::debugging`[private]`

| Definition at line 83 of file GT2005WalkingEngine.h. Referenced by calculateData(), executeParameterized(), and GT2005WalkingEngine().

bool GT2005WalkingEngine::debugRequest`[private]`

| Definition at line 84 of file GT2005WalkingEngine.h. Referenced by executeParameterized(), GT2005WalkingEngine(), handleMessage(), and readDebugData().

bool GT2005WalkingEngine::debugLoop`[private]`

| Definition at line 85 of file GT2005WalkingEngine.h. Referenced by GT2005WalkingEngine().

Vector3<double> GT2005WalkingEngine::debugDataReal[4][128]`[private]`

| Definition at line 87 of file GT2005WalkingEngine.h. Referenced by readDebugData(), readResampleData(), and streamDebugData().

Vector3<double> GT2005WalkingEngine::debugDataIdeal[4][128]`[private]`

| Definition at line 88 of file GT2005WalkingEngine.h. Referenced by readDebugData(), readResampleData(), and streamDebugData().

long GT2005WalkingEngine::debugDataBuffer[4][12]`[private]`

| Definition at line 89 of file GT2005WalkingEngine.h. Referenced by readDebugData(), and readResampleData().

bool GT2005WalkingEngine::resampleRequest`[private]`

| Definition at line 92 of file GT2005WalkingEngine.h. Referenced by executeParameterized(), GT2005WalkingEngine(), handleMessage(), and readResampleData().

bool GT2005WalkingEngine::resampling`[private]`

| Definition at line 93 of file GT2005WalkingEngine.h. Referenced by calculateData(), executeParameterized(), and GT2005WalkingEngine().

int GT2005WalkingEngine::polygonsRecieved`[private]`

| Definition at line 99 of file GT2005WalkingEngine.h. Referenced by executeParameterized(), and GT2005WalkingEngine().

odometryPoint GT2005WalkingEngine::odometryCalibrationData[15][13][7]`[private]`

| Definition at line 108 of file GT2005WalkingEngine.h. Referenced by calculateOdometryCalibrationData(), and loadOdometryPlane().

odometryPoint GT2005WalkingEngine::odometryCalibrationData2[2][21]`[private]`

| Definition at line 109 of file GT2005WalkingEngine.h. Referenced by calculateOdometryCalibrationData(), and loadOdometryRotation().

The documentation for this class was generated from the following files:

- Modules/WalkingEngine/GT2005WalkingEngine.h
- Modules/WalkingEngine/GT2005WalkingEngine.cpp