#include <Kinematics.h>
Public Types | |
enum | LegIndex { fr, fl, hr, hl, basefront, basehind } |
enum | GroundMode { constantMode, dynamicMode, staticMode, superMode, flyMode } |
Static Public Member Functions | |
void | legPositionFromJoints (LegIndex leg, double j1, double j2, double j3, double &x, double &y, double &z, bool correctCalculation=true) |
Calculates leg positon relative to the legs shoulder from given leg joint angles. | |
void | kneePositionFromJoints (LegIndex leg, double j1, double j2, double &x, double &y, double &z, bool correctCalculation=true) |
Calculates knee positon relative to the legs shoulder from given leg joint angles. | |
bool | jointsFromLegPosition (LegIndex leg, double x, double y, double z, double &j1, double &j2, double &j3, double bodyTilt=0, bool correctCalculation=true) |
Calculates joint angles from given leg position. | |
void | getRelativeRobotVertices (RobotVertices &robotVertices, const JointData &jointData) |
Calculates all robot vertices relative to the neck from given leg joint angles. | |
void | getRobotTransformation (double &tilt, double &roll, const RobotVertices &relativeRobotVertices, const GroundMode mode, double expectedBodyTilt=0, double expectedBodyRoll=0) |
Calculates the transformation of relativeRobotVertices needed to make the robot stand on the grond. | |
void | getAbsoluteRobotVertices (RobotVertices &robotVertices, const GroundMode mode, const JointData &jointData, double expectedBodyTilt=0, double expectedBodyRoll=0) |
Calculates all robot vertices to ground from given leg joint angles. | |
void | calcRelativeRobotVertices (RobotVertices &rob, const SensorData &sensorData) |
The function calculates the relative positions of possible floor contact points. | |
void | calcNeckAndLegPositions (const SensorData &sensorData, RobotVertices &rob) |
The function calculates the body tilt and the position of the feet and the neck of the robot. | |
void | calculateCameraMatrix (const double tilt, const double pan, const double roll, const double bodyTilt, const double neckHeight, CameraMatrix &cameraMatrix) |
The function calculates the camera matrix based on sensor data and the position of the neck. | |
void | calcHeadHeight (double &headHeight, const double bodyTilt, const double neckHeight, const SensorData &sensorData) |
The function calculates the height of the Tilt2Center based on the sensor data. | |
void | calcNoseHeight (double &noseHeight, const double absHeadTilt, const double headHeight, const double bodyTilt, const double headRoll) |
The function calculates the height of the nose based on the sensor data. | |
void | calcAbsRoll (double &absRoll, const double bodyTilt, const SensorData &sensorData) |
The function calculates the absolute roll (Tilt in the head) based on the sensor data. | |
double | calcHighestPossibleTilt (const double absRoll, const double bodyTilt) |
The function calculates the highest possible necktilt to reach the absolute headtilt. | |
double | calcLowestPossibleTilt (const double absRoll, const double bodyTilt) |
The function calculates the lowest possible necktilt to reach the absolute headtilt. | |
void | calcAbsRollJoints (double &neckTilt, double &absRoll, const double bodyTilt) |
The function calculates joints so that the head has a. | |
Static Private Member Functions | |
char * | stringFromLeg (LegIndex leg) |
void | transformToLegBase (LegIndex leg, double &x, double &y, double &z, double &lowerleg) |
void | calcLegPosition (Vector3< double > &kneePosition, Vector3< double > &footPosition, long joint1, long joint2, long joint3, const Vector3< double > shoulder, const Vector3< double > &upper, const Vector3< double > &lower) |
Definition at line 27 of file Kinematics.h.
|
Definition at line 30 of file Kinematics.h. |
|
Definition at line 35 of file Kinematics.h. |
|
Calculates leg positon relative to the legs shoulder from given leg joint angles.
Definition at line 205 of file Kinematics.cpp. References FORELEG, getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), LEFTLEG, LEGBASE, RobotDimensions::lowerForeLegLength, RobotDimensions::lowerHindLegLength, RobotDimensions::upperLegLength, RobotDimensions::zeroFrontKneeArc, RobotDimensions::zeroHindKneeArc, and RobotDimensions::zeroShoulderArc. Referenced by getRelativeRobotVertices(). |
Here is the call graph for this function:
|
Calculates knee positon relative to the legs shoulder from given leg joint angles.
Definition at line 246 of file Kinematics.cpp. References FORELEG, getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), LEFTLEG, LEGBASE, RobotDimensions::upperLegLength, and RobotDimensions::zeroShoulderArc. Referenced by getRelativeRobotVertices(). |
Here is the call graph for this function:
|
Here is the call graph for this function:
|
Calculates all robot vertices relative to the neck from given leg joint angles.
Definition at line 17 of file Kinematics.cpp. References JointData::data, fl, RobotVertices::footPosition, fr, fromMicroRad(), getRobotConfiguration(), hl, hr, RobotVertices::kneePosition, kneePositionFromJoints(), legPositionFromJoints(), RobotVertices::shoulderPosition, Vector3< double >::x, Vector3< double >::y, and Vector3< double >::z. Referenced by getAbsoluteRobotVertices(). |
Here is the call graph for this function:
|
Calculates the transformation of relativeRobotVertices needed to make the robot stand on the grond.
Definition at line 74 of file Kinematics.cpp. References Vector2< V >::angle(), constantMode, dynamicMode, flyMode, RobotVertices::footPosition, RobotVertices::kneePosition, staticMode, superMode, Vector3< double >::x, and Vector3< double >::z. Referenced by calcNeckAndLegPositions(), and getAbsoluteRobotVertices(). |
Here is the call graph for this function:
|
Calculates all robot vertices to ground from given leg joint angles.
Definition at line 146 of file Kinematics.cpp. References Vector2< V >::abs(), Vector2< V >::angle(), RobotVertices::bodyRoll, RobotVertices::bodyTilt, flyMode, RobotVertices::footPosition, getRelativeRobotVertices(), getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), getRobotTransformation(), RobotVertices::kneePosition, RobotVertices::neck, RobotVertices::shoulderPosition, Vector3< double >::x, Vector3< double >::y, Vector3< double >::z, and RobotDimensions::zeroBodyTilt. |
Here is the call graph for this function:
|
The function calculates the relative positions of possible floor contact points. In contrast to getRelativeRobotVertices(), it works correctly. All coordinates are relative to the neck joint.
Definition at line 442 of file Kinematics.cpp. References calcLegPosition(), SensorData::data, fl, RobotVertices::footPosition, RobotDimensions::footRadius, fr, SensorData::frameNumber, RobotVertices::frameNumber, getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), hl, hr, RobotVertices::kneePosition, RobotDimensions::kneeRadius, RobotDimensions::lengthBetweenLegs, RobotDimensions::lowerForeLegLength, RobotDimensions::lowerForeLegLengthX, RobotDimensions::lowerForeLegLengthZ, RobotDimensions::lowerHindLegLength, RobotDimensions::lowerHindLegLengthX, RobotDimensions::lowerHindLegLengthZ, RobotDimensions::neckToLegsLengthX, RobotDimensions::neckToLegsLengthZ, RobotVertices::shoulderPosition, RobotDimensions::shoulderWidth, RobotDimensions::specsKneeArc, RobotDimensions::upperLegLengthX, RobotDimensions::upperLegLengthY, RobotDimensions::upperLegLengthZ, and Vector3< double >::z. Referenced by calcNeckAndLegPositions(). |
Here is the call graph for this function:
|
The function calculates the body tilt and the position of the feet and the neck of the robot. bodyRoll == 0 is assumed.
Definition at line 487 of file Kinematics.cpp. References RobotVertices::bodyRoll, RobotVertices::bodyTilt, calcRelativeRobotVertices(), dynamicMode, RobotVertices::footPosition, getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), getRobotTransformation(), RobotVertices::kneePosition, RobotVertices::neckHeight, Pose3D::rotateY(), RobotVertices::shoulderPosition, RobotDimensions::shoulderRadius, and Vector3< double >::z. Referenced by GT2004SensorDataProcessor::calculateBodyPostureFromLegSensors(), BB2004Calibrator::evolve(), and BB2004InvKinWalkingEngine::updateOdometry(). |
Here is the call graph for this function:
|
The function calculates the camera matrix based on sensor data and the position of the neck.
Definition at line 529 of file Kinematics.cpp. References RobotCalibration::bodyRollOffset, RobotCalibration::bodyTiltOffset, RobotDimensions::distanceNeckToPanCenter, RobotDimensions::distancePanCenterToCameraX, RobotDimensions::distancePanCenterToCameraZ, RobotConfiguration::getRobotCalibration(), getRobotConfiguration(), RobotConfiguration::getRobotDesign(), RobotConfiguration::getRobotDimensions(), RobotCalibration::headRollOffset, RobotCalibration::headTiltOffset, RobotCalibration::panFactor, RobotCalibration::tilt2Factor, and RobotCalibration::tiltFactor. Referenced by GT2004SensorDataProcessor::buildCameraMatrix(), and BB2004Calibrator::evolve(). |
Here is the call graph for this function:
|
The function calculates the height of the Tilt2Center based on the sensor data.
Definition at line 561 of file Kinematics.cpp. References SensorData::data, RobotDimensions::distanceNeckToPanCenter, fromMicroRad(), getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), and pi. |
Here is the call graph for this function:
|
The function calculates the height of the nose based on the sensor data.
Definition at line 574 of file Kinematics.cpp. References RobotDimensions::distancePanCenterToCameraX, getRobotConfiguration(), and RobotConfiguration::getRobotDimensions(). |
Here is the call graph for this function:
|
The function calculates the absolute roll (Tilt in the head) based on the sensor data.
Definition at line 584 of file Kinematics.cpp. References SensorData::data, and fromMicroRad(). |
Here is the call graph for this function:
|
The function calculates the highest possible necktilt to reach the absolute headtilt.
Definition at line 589 of file Kinematics.cpp. References getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), RobotDimensions::jointLimitHeadTiltN, and RobotDimensions::jointLimitNeckTiltP. Referenced by calcAbsRollJoints(). |
Here is the call graph for this function:
|
The function calculates the lowest possible necktilt to reach the absolute headtilt.
Definition at line 603 of file Kinematics.cpp. References getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), RobotDimensions::jointLimitHeadTiltP, and RobotDimensions::jointLimitNeckTiltN. Referenced by calcAbsRollJoints(). |
Here is the call graph for this function:
|
The function calculates joints so that the head has a.
Definition at line 618 of file Kinematics.cpp. References calcHighestPossibleTilt(), calcLowestPossibleTilt(), getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), RobotDimensions::jointLimitHeadTiltN, and RobotDimensions::jointLimitHeadTiltP. |
Here is the call graph for this function:
|
Definition at line 423 of file Kinematics.cpp. |
|
Definition at line 273 of file Kinematics.cpp. References RobotDimensions::bodyWidth, FORELEG, getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), LEFTLEG, LEGBASE, RobotDimensions::lowerForeLegLength, and RobotDimensions::lowerHindLegLength. Referenced by jointsFromLegPosition(). |
Here is the call graph for this function:
|
Definition at line 519 of file Kinematics.cpp. References e, Pose3D::rotateY(), Pose3D::translate(), and Pose3D::translation. Referenced by calcRelativeRobotVertices(). |
Here is the call graph for this function: