ChppGikStandingRobot Class Reference

Wrapper for a jrlHumanoidDynamicRobot, support polygon and related information. More...

#include <hpp/gik/robot/standing-robot.hh>

List of all members.

Public Member Functions

 ChppGikStandingRobot (CjrlHumanoidDynamicRobot &inRobot)
 The robot should be in half-sitting configuration.
CjrlHumanoidDynamicRobot * robot () const
 Get the jrl robot.
ChppGikSupportPolygonsupportPolygon ()
 Get the current support polygon.
bool rightFootAhead ()
 Test position of right foot against left.
bool leftFootAhead ()
 Test position of left foot against right.
const vector3dleftFootLocalForwardVector ()
 return the root's unitary X vector expressed in the local left ankle frame
const vector3drightFootLocalForwardVector ()
 return the root's unitary X vector expressed in the local right ankle frame
const vector3dleftFootLocalSideVector ()
 return the root's unitary Y vector expressed in the local left ankle frame
const vector3drightFootLocalSideVector ()
 return the root's unitary Y vector expressed in the local right ankle frame
const vector3dleftFootLocalUpVector ()
 return the root's unitary Z vector expressed in the local left ankle frame
const vector3drightFootLocalUpVector ()
 return the root's unitary Z vector expressed in the local right ankle frame
const ChppGik2DShapeleftFootShape () const
 get the 2DShape representing the robot's left foot seen from above.
const ChppGik2DShaperightFootShape () const
 get the 2DShape representing the robot's right foot seen from above.
ChppGikMaskFactorymaskFactory ()
 Get the associated mask factory.
vectorN computeConfigurationWrtFreeFlyer (CjrlJoint *inJoint, matrix4d &inFreeFlyerInWorld)
 compute the transformation of the root body based on the desired transformation of a body in the world and return the corresponding robot configuration.
const ChppGik2DShapesupportPolygonShape ()
bool isPointInsideSupportPolygon (double inX, double inY, double safetyMargin=0.01)
void computeFeet2DConvexHull (std::vector< const ChppGikLinkedVertex * > &outVertices)
 ~ChppGikStandingRobot ()
 Destructor.
HalfSitting configuration related

{@

vector3dhalfsittingRelativeCOM ()
 Get (dx, dy, dz) defined by (dy = YCOM - Yrfoot) and (dx = RfootR'(XCOM - Xrfoot)) in right foot frame when the robot is in half sitting stance.
vectorNhalfsittingConfiguration ()
 Get the halfsitting configuration.
const vector3dhalfsittingLocalWaistVertical ()
 return a unitary vector expressed in the waist joint's local frame, coinciding with the reference frame (world) Z axis
double halfsittingFeetDistance ()
 Get the distance separating the feet in halfsitting stance.
double halfsittingWaistHeight ()
 Get the haight of the waist in halfsitting stance.
void staticHalfsitting ()
 apply the static half sitting configuration to the robot
Robot State Update
bool staticState (const vectorN &inConfig)
 Apply a static configuration on the robot.
void updateRobot (const matrix4d &inRootPose, const vectorN &inJoints, double inTimeStep)
 Update robot kinematics.

Detailed Description

Wrapper for a jrlHumanoidDynamicRobot, support polygon and related information.


Constructor & Destructor Documentation

ChppGikStandingRobot::ChppGikStandingRobot ( CjrlHumanoidDynamicRobot &  inRobot)

The robot should be in half-sitting configuration.

ChppGikStandingRobot::~ChppGikStandingRobot ( )

Destructor.


Member Function Documentation

vectorN ChppGikStandingRobot::computeConfigurationWrtFreeFlyer ( CjrlJoint *  inJoint,
matrix4d inFreeFlyerInWorld 
)

compute the transformation of the root body based on the desired transformation of a body in the world and return the corresponding robot configuration.

void ChppGikStandingRobot::computeFeet2DConvexHull ( std::vector< const ChppGikLinkedVertex * > &  outVertices)
vectorN& ChppGikStandingRobot::halfsittingConfiguration ( )

Get the halfsitting configuration.

double ChppGikStandingRobot::halfsittingFeetDistance ( )

Get the distance separating the feet in halfsitting stance.

const vector3d& ChppGikStandingRobot::halfsittingLocalWaistVertical ( )

return a unitary vector expressed in the waist joint's local frame, coinciding with the reference frame (world) Z axis

vector3d& ChppGikStandingRobot::halfsittingRelativeCOM ( )

Get (dx, dy, dz) defined by (dy = YCOM - Yrfoot) and (dx = RfootR'(XCOM - Xrfoot)) in right foot frame when the robot is in half sitting stance.

double ChppGikStandingRobot::halfsittingWaistHeight ( )

Get the haight of the waist in halfsitting stance.

bool ChppGikStandingRobot::isPointInsideSupportPolygon ( double  inX,
double  inY,
double  safetyMargin = 0.01 
)
bool ChppGikStandingRobot::leftFootAhead ( )

Test position of left foot against right.

const vector3d& ChppGikStandingRobot::leftFootLocalForwardVector ( )

return the root's unitary X vector expressed in the local left ankle frame

const vector3d& ChppGikStandingRobot::leftFootLocalSideVector ( )

return the root's unitary Y vector expressed in the local left ankle frame

const vector3d& ChppGikStandingRobot::leftFootLocalUpVector ( )

return the root's unitary Z vector expressed in the local left ankle frame

const ChppGik2DShape& ChppGikStandingRobot::leftFootShape ( ) const

get the 2DShape representing the robot's left foot seen from above.

HRP2 feet dimensions hard coded

ChppGikMaskFactory* ChppGikStandingRobot::maskFactory ( )

Get the associated mask factory.

bool ChppGikStandingRobot::rightFootAhead ( )

Test position of right foot against left.

const vector3d& ChppGikStandingRobot::rightFootLocalForwardVector ( )

return the root's unitary X vector expressed in the local right ankle frame

const vector3d& ChppGikStandingRobot::rightFootLocalSideVector ( )

return the root's unitary Y vector expressed in the local right ankle frame

const vector3d& ChppGikStandingRobot::rightFootLocalUpVector ( )

return the root's unitary Z vector expressed in the local right ankle frame

const ChppGik2DShape& ChppGikStandingRobot::rightFootShape ( ) const

get the 2DShape representing the robot's right foot seen from above.

HRP2 feet dimensions hard coded

CjrlHumanoidDynamicRobot* ChppGikStandingRobot::robot ( ) const

Get the jrl robot.

Referenced by ChppGikLocomotionElement::ChppGikLocomotionElement().

void ChppGikStandingRobot::staticHalfsitting ( )

apply the static half sitting configuration to the robot

bool ChppGikStandingRobot::staticState ( const vectorN inConfig)

Apply a static configuration on the robot.

ChppGikSupportPolygon* ChppGikStandingRobot::supportPolygon ( )

Get the current support polygon.

Return NULL if the feet are not on the ground at elevation 0.

Note:
The configuration of the robot when this method is called is stored in cache in order to avoid recomputing if the configuration has not changed.
const ChppGik2DShape& ChppGikStandingRobot::supportPolygonShape ( )
void ChppGikStandingRobot::updateRobot ( const matrix4d inRootPose,
const vectorN inJoints,
double  inTimeStep 
)

Update robot kinematics.

Compute

  • cartesian positions,
  • velocities and accelerations using finite-difference
  • call CjrlDynamicRobot::computeForwardKinematics.