CRobot Class Reference

Robot (kinematic, geometric, dynamic model). More...

#include <robot.h>

List of all members.

Public Member Functions

 CRobot ()
 ~CRobot ()
void init (char *filename)
 Initializes the robot.
void cleanUp ()
void initDhParameters (char *filename)
 Reads kinematic model data from xml file.
void updateDhParameters (bool current=true)
 Reads current angles from the robot wrapper and updates the denavit hartenberg parameters.
void getAnglesFromDh (float *angles)
 Extracts angles from denavit hartenberg parameters.
void setDhFromAngles (float *angles)
 Updates denavit hartenberg parameters with array of angles.
void calcForwardKinematics (bool draw=true)
 Calculates forward kinematics based on denavit hartenberg parameters.
void calcInverseKinematics (int kinematicChain, CMatrix &pose)
 Calculates inverse kinematics.
void calcDynamics (float *angles, float *angles_v, float *angles_a, int view, float *result)
 Calculates dynamic behaviour of robot.
void estimateInverseKinematics (int kinematicChain, CMatrix &pose)
 Numerical estimation of the inverse kinematics.
void getTCPs (CVec *positionAndOrientation)
 Generates an array of Position and Orientation vectors.
void calcKinematicChain (int len, CBox *geometry[], CDh *dhValues[])
int checkCollisions (bool msg=true, bool useOld=false)
 Starts collision test.
int checkCollisions (int &first, int &second)
 Starts collision test.
bool xmlToFrame (CFrame *frame, TiXmlElement *frameNode)
 Transforms a <FRAME> (xml object) into a frame.
int getFrameByName (char *name, bool create=false)
 Returns index of frame with the stated name.

Public Attributes

CKinematicChainContainer kinematicChains
 Kinematic model.
CFrameframes [FRAMES_COUNT]
 All frames associated with the kinematic and geometric model.
int framesCount
 Number of frames.
int id
 Robot type.
CGeometry geometry
 Geometric model.


Detailed Description

Robot (kinematic, geometric, dynamic model).


Constructor & Destructor Documentation

CRobot::CRobot (  ) 

CRobot::~CRobot (  ) 


Member Function Documentation

void CRobot::init ( char *  filename  ) 

Initializes the robot.

void CRobot::cleanUp (  ) 

void CRobot::initDhParameters ( char *  filename  ) 

Reads kinematic model data from xml file.

Loads frames and kinematic chains.

void CRobot::updateDhParameters ( bool  current = true  ) 

Reads current angles from the robot wrapper and updates the denavit hartenberg parameters.

Parameters:
current True, if current angles of the servo motors should be used. False, if target angles should be used

void CRobot::getAnglesFromDh ( float *  angles  ) 

Extracts angles from denavit hartenberg parameters.

void CRobot::setDhFromAngles ( float *  angles  ) 

Updates denavit hartenberg parameters with array of angles.

void CRobot::calcForwardKinematics ( bool  draw = true  ) 

Calculates forward kinematics based on denavit hartenberg parameters.

Parameters:
draw True, if the new robot pose should be visualized in the opengl-viewer

void CRobot::calcInverseKinematics ( int  kinematicChain,
CMatrix pose 
)

Calculates inverse kinematics.

The result of the inverse kinematics calculation is stored in the denavit hartenberg structures of the links in the kinematic chain. Use getAnglesFromDh to extract the angle values.

Parameters:
kinematicChain Index of kinematic chain
pose Pose the last link in the kinematic chain should take on

void CRobot::calcDynamics ( float *  angles,
float *  angles_v,
float *  angles_a,
int  view,
float *  result 
)

Calculates dynamic behaviour of robot.

TODO: implement

Parameters:
angles Current angles
angles_v Current angle speed
angles_a Current angle acceleration

void CRobot::estimateInverseKinematics ( int  kinematicChain,
CMatrix pose 
)

Numerical estimation of the inverse kinematics.

DOES NOT WORK PROPERLY!

void CRobot::getTCPs ( CVec positionAndOrientation  ) 

Generates an array of Position and Orientation vectors.

The position (xzy) and orientation (euler angles) of every limb will be stored in the array. Used to display the limb information on the screen.

See also:
CConsole::printInfo
Parameters:
positionAndOrientation Has to be allocated of size kinematicChains::length * 2

void CRobot::calcKinematicChain ( int  len,
CBox geometry[],
CDh dhValues[] 
)

int CRobot::checkCollisions ( bool  msg = true,
bool  useOld = false 
)

Starts collision test.

Parameters:
msg Show collision messages
useOld Only show collision message if the robot pose changed (a bit)

int CRobot::checkCollisions ( int &  first,
int &  second 
)

Starts collision test.

See also:
CGeometry::checkCollisions

bool CRobot::xmlToFrame ( CFrame frame,
TiXmlElement *  frameNode 
)

Transforms a <FRAME> (xml object) into a frame.

int CRobot::getFrameByName ( char *  name,
bool  create = false 
)

Returns index of frame with the stated name.


Member Data Documentation

CKinematicChainContainer CRobot::kinematicChains

Kinematic model.

CFrame* CRobot::frames[FRAMES_COUNT]

All frames associated with the kinematic and geometric model.

int CRobot::framesCount

Number of frames.

int CRobot::id

Robot type.

See also:
ROBOT_TYPES

CGeometry CRobot::geometry

Geometric model.


The documentation for this class was generated from the following files:
Generated on Mon Apr 21 23:27:45 2008 for BioloidControl by  doxygen 1.5.2