PatternGeneratorJRL::PatternGeneratorInterface Class Referenceabstract

#include <jrl/walkgen/patterngeneratorinterface.hh>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW PatternGeneratorInterface (PinocchioRobot *)
 
virtual ~PatternGeneratorInterface ()
 
virtual void AddStepInStack (double dx, double dy, double theta)=0
 Function to specify steps in the stack of the walking pattern generator. This method is different AddOnLineStep which is the default step add when there is no policy, or no step available. More...
 
virtual void CommonInitializationOfWalking (COMState &lStartingCOMState, Eigen::Vector3d &lStartingZMPPosition, Eigen::VectorXd &BodyAnglesIni, FootAbsolutePosition &InitLeftFootAbsPos, FootAbsolutePosition &InitRightFootAbsPos, std::deque< RelativeFootPosition > &lRelativeFootPositions, std::vector< double > &lCurrentJointValues, bool ClearStepStackHandler)=0
 
virtual void SetCurrentJointValues (Eigen::VectorXd &lCurrentJointValues)=0
 
virtual int GetWalkMode () const =0
 Returns the walking mode. More...
 
virtual void GetLegJointVelocity (Eigen::VectorXd &dqr, Eigen::VectorXd &dql) const =0
 Get the leg joint velocity. More...
 
virtual void ReadSequenceOfSteps (std::istringstream &strm)=0
 Read a sequence of steps. More...
 
virtual void setZMPInitialPoint (Eigen::Vector3d &lZMPInitialPoint)=0
 Set the initial ZMP reference point. More...
 
virtual void getZMPInitialPoint (Eigen::Vector3d &lZMPInitialPoint) const =0
 Get the initial ZMP reference point. More...
 
virtual void EvaluateStartingState (COMState &lStartingCOMState, Eigen::Vector3d &lStartingZMPPosition, Eigen::Matrix< double, 6, 1 > &lStartingWaistPose, FootAbsolutePosition &InitLeftFootAbsPos, FootAbsolutePosition &InitRightFootAbsPos)=0
 Returns the ZMP, CoM, left foot absolute position, and right foot absolute position for the initiale pose. More...
 
virtual void setVelocityReference (double x, double y, double yaw)=0
 Set velocity reference This method is only supported by Herdt's algorithm. Currently only a 3D speed is supported: More...
 
virtual void setCoMPerturbationForce (double x, double y)=0
 Set velocity reference. More...
 
Methods for the control part.
virtual bool RunOneStepOfTheControlLoop (Eigen::VectorXd &CurrentConfiguration, Eigen::VectorXd &CurrentVelocity, Eigen::VectorXd &CurrentAcceleration, Eigen::VectorXd &ZMPTarget)=0
 Run One Step of the global control loop aka The Main Method To Be Used. More...
 
virtual bool RunOneStepOfTheControlLoop (Eigen::VectorXd &CurrentConfiguration, Eigen::VectorXd &CurrentVelocity, Eigen::VectorXd &CurrentAcceleration, Eigen::VectorXd &ZMPTarget, COMPosition &COMPosition, FootAbsolutePosition &LeftFootPosition, FootAbsolutePosition &RightFootPosition)=0
 Run One Step of the global control loop aka The Main Method To Be Used. More...
 
virtual bool RunOneStepOfTheControlLoop (Eigen::VectorXd &CurrentConfiguration, Eigen::VectorXd &CurrentVelocity, Eigen::VectorXd &CurrentAcceleration, Eigen::VectorXd &ZMPTarget, COMState &COMState, FootAbsolutePosition &LeftFootPosition, FootAbsolutePosition &RightFootPosition)=0
 Run One Step of the global control loop aka The Main Method To Be Used. More...
 
virtual bool RunOneStepOfTheControlLoop (FootAbsolutePosition &LeftFootPosition, FootAbsolutePosition &RightFootPosition, ZMPPosition &ZMPRefPos, COMPosition &COMRefPos)=0
 Run One Step of the global control loop aka The Main Method To Be Used. More...
 
virtual bool RunOneStepOfTheControlLoop (ControlLoopOneStepArgs &aControlLoopOneStepArgs)=0
 Rune One Step of the global control loop. More...
 
On-line steps related methods
virtual void StartOnLineStepSequencing ()=0
 Start the creation of steps on line. More...
 
virtual void StopOnLineStepSequencing ()=0
 Stop the creation of steps on line. More...
 
virtual void AddOnLineStep (double X, double Y, double Theta)=0
 Add an online step. More...
 
virtual int ChangeOnLineStep (double Time, FootAbsolutePosition &aFootAbsolutePosition, double &newtime)=0
 Change online step. The strategy is the following: the step in single support phase at time t has its landing position changed to \( (X,Y,\theta) \) in absolute coordinates (i.e. in the world reference frame of the free flyer of the robot). For stability reason there is no guarantee that this method can realized the operation. Please see the documentation of the walking pattern generator algorithm used. More...
 
virtual void ChangeOnLineStep (std::istringstream &strm, double &newtime)=0
 Change online step. See the above method for the specifications. This method uses a different format with stream of strings. More...
 
For internal odometry.
virtual void UpdateAbsolutePosition (bool UpdateAbsMotionOrNot)=0
 Update the current waist absolute position. More...
 
virtual void getWaistPositionAndOrientation (double TQ[7], double &Orientation) const =0
 Get the waist position and orientation as a quaternion, and the planar X-Y orientation in Orientation. More...
 
virtual void setWaistPositionAndOrientation (double TQ[7])=0
 Set Waist position and Orientation
More...
 
virtual void getWaistVelocity (double &dx, double &dy, double &omega) const =0
 Get Waist velocity. More...
 
virtual void getWaistPositionMatrix (Eigen::Matrix4d &lWaistAbsPos) const =0
 An other method to get the waist position using a matrix. More...
 
System to call a given method based on registration of a method.
virtual int ParseCmd (std::istringstream &strm)=0
 Parse a command (to be used out of a plugin) and call all objects which registered the method. More...
 

Detailed Description

This class is the interface between the Pattern Generator and the external world. In addition to the classical setter and getter for various parameters there is the possibility to pass commands a string of stream to the method ParseCmd().

There is a set of functionnalities directly supported by the API:

Constructor & Destructor Documentation

◆ PatternGeneratorInterface()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW PatternGeneratorJRL::PatternGeneratorInterface::PatternGeneratorInterface ( PinocchioRobot )
inline

Constructor

Parameters
strmShould provide the file to initialize the preview control, the path to the VRML model, and the name of the file containing the VRML model.

◆ ~PatternGeneratorInterface()

virtual PatternGeneratorJRL::PatternGeneratorInterface::~PatternGeneratorInterface ( )
inlinevirtual

Destructor

Member Function Documentation

◆ AddOnLineStep()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::AddOnLineStep ( double  X,
double  Y,
double  Theta 
)
pure virtual

Add an online step.

◆ AddStepInStack()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::AddStepInStack ( double  dx,
double  dy,
double  theta 
)
pure virtual

Function to specify steps in the stack of the walking pattern generator. This method is different AddOnLineStep which is the default step add when there is no policy, or no step available.

◆ ChangeOnLineStep() [1/2]

virtual int PatternGeneratorJRL::PatternGeneratorInterface::ChangeOnLineStep ( double  Time,
FootAbsolutePosition aFootAbsolutePosition,
double &  newtime 
)
pure virtual

Change online step. The strategy is the following: the step in single support phase at time t has its landing position changed to \( (X,Y,\theta) \) in absolute coordinates (i.e. in the world reference frame of the free flyer of the robot). For stability reason there is no guarantee that this method can realized the operation. Please see the documentation of the walking pattern generator algorithm used.

If the time falls during a double support phase, the next single support phase is chosen.

Parameters
[in]TimeTime information of the step.
[in]aFootAbsolutePositionAbsolute position of the foot.
Returns
If the operation failed the method returns a negative number related to an error, 0 otherwise.

◆ ChangeOnLineStep() [2/2]

virtual void PatternGeneratorJRL::PatternGeneratorInterface::ChangeOnLineStep ( std::istringstream &  strm,
double &  newtime 
)
pure virtual

Change online step. See the above method for the specifications. This method uses a different format with stream of strings.

Parameters
[in]TimeTime information of the step.
Returns
nothing

◆ CommonInitializationOfWalking()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::CommonInitializationOfWalking ( COMState lStartingCOMState,
Eigen::Vector3d &  lStartingZMPPosition,
Eigen::VectorXd &  BodyAnglesIni,
FootAbsolutePosition InitLeftFootAbsPos,
FootAbsolutePosition InitRightFootAbsPos,
std::deque< RelativeFootPosition > &  lRelativeFootPositions,
std::vector< double > &  lCurrentJointValues,
bool  ClearStepStackHandler 
)
pure virtual

Common Initialization of walking.

Parameters
[out]lStartingCOMPositionFor the starting position on the articular space, returns the COM position.
[out]lStartingZMPPositionFor the starting position on the articular space, returns the ZMP position.
[out]BodyAnglesIniBasically it is a copy of CurrentJointValues but as a vector.
[out]InitLeftFootAbsPosReturns the current absolute position of the left foot for the given posture of the robot.
[out]InitRightFootAbsPosReturns the current absolute position of the right foot for the given posture of the robot.
[out]lRelativeFootPositionsList of relative positions for the support foot still in the stack of steps.
[in]lCurrentJointValuesThe vector of articular values in classical C++ style.
[in]ClearStepStackHandlerClean the stack of steps after copy.

◆ EvaluateStartingState()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::EvaluateStartingState ( COMState lStartingCOMState,
Eigen::Vector3d &  lStartingZMPPosition,
Eigen::Matrix< double, 6, 1 > &  lStartingWaistPose,
FootAbsolutePosition InitLeftFootAbsPos,
FootAbsolutePosition InitRightFootAbsPos 
)
pure virtual

Returns the ZMP, CoM, left foot absolute position, and right foot absolute position for the initiale pose.

◆ GetLegJointVelocity()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::GetLegJointVelocity ( Eigen::VectorXd &  dqr,
Eigen::VectorXd &  dql 
) const
pure virtual

Get the leg joint velocity.

◆ getWaistPositionAndOrientation()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::getWaistPositionAndOrientation ( double  TQ[7],
double &  Orientation 
) const
pure virtual

Get the waist position and orientation as a quaternion, and the planar X-Y orientation in Orientation.

◆ getWaistPositionMatrix()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::getWaistPositionMatrix ( Eigen::Matrix4d &  lWaistAbsPos) const
pure virtual

An other method to get the waist position using a matrix.

◆ getWaistVelocity()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::getWaistVelocity ( double &  dx,
double &  dy,
double &  omega 
) const
pure virtual

Get Waist velocity.

◆ GetWalkMode()

virtual int PatternGeneratorJRL::PatternGeneratorInterface::GetWalkMode ( ) const
pure virtual

Returns the walking mode.

◆ getZMPInitialPoint()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::getZMPInitialPoint ( Eigen::Vector3d &  lZMPInitialPoint) const
pure virtual

Get the initial ZMP reference point.

◆ ParseCmd()

virtual int PatternGeneratorJRL::PatternGeneratorInterface::ParseCmd ( std::istringstream &  strm)
pure virtual

Parse a command (to be used out of a plugin) and call all objects which registered the method.

◆ ReadSequenceOfSteps()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::ReadSequenceOfSteps ( std::istringstream &  strm)
pure virtual

Read a sequence of steps.

◆ RunOneStepOfTheControlLoop() [1/5]

virtual bool PatternGeneratorJRL::PatternGeneratorInterface::RunOneStepOfTheControlLoop ( ControlLoopOneStepArgs aControlLoopOneStepArgs)
pure virtual

Rune One Step of the global control loop.

◆ RunOneStepOfTheControlLoop() [2/5]

virtual bool PatternGeneratorJRL::PatternGeneratorInterface::RunOneStepOfTheControlLoop ( Eigen::VectorXd &  CurrentConfiguration,
Eigen::VectorXd &  CurrentVelocity,
Eigen::VectorXd &  CurrentAcceleration,
Eigen::VectorXd &  ZMPTarget 
)
pure virtual

Run One Step of the global control loop aka The Main Method To Be Used.

Parameters
[out]CurrentConfigurationThe current configuration of the robot according to the implementation of dynamic-JRLJapan. This should be first position and orientation of the waist, and then all the DOFs of your robot.
[out]CurrentVelocityThe current velocity of the robot according to the the implementation of dynamic-JRLJapan.
[out]CurrentAccelerationThe current acceleration of the robot according to the the implementation of dynamic-JRLJapan.
[out]ZMPTargetThe target ZMP in the waist reference frame.
Returns
True is there is still some data to send, false otherwise.

◆ RunOneStepOfTheControlLoop() [3/5]

virtual bool PatternGeneratorJRL::PatternGeneratorInterface::RunOneStepOfTheControlLoop ( Eigen::VectorXd &  CurrentConfiguration,
Eigen::VectorXd &  CurrentVelocity,
Eigen::VectorXd &  CurrentAcceleration,
Eigen::VectorXd &  ZMPTarget,
COMPosition COMPosition,
FootAbsolutePosition LeftFootPosition,
FootAbsolutePosition RightFootPosition 
)
pure virtual

Run One Step of the global control loop aka The Main Method To Be Used.

Parameters
[out]CurrentConfigurationThe current configuration of the robot according to the implementation of dynamic-JRLJapan. This should be first position and orientation of the waist, and then all the DOFs of your robot.
[out]CurrentVelocityThe current velocity of the robot according to the the implementation of dynamic-JRLJapan.
[out]CurrentAccelerationThe current acceleration of the robot according to the the implementation of dynamic-JRLJapan.
[out]ZMPTargetThe target ZMP in the waist reference frame.
[out]COMPositionThe CoM position for this motion.
[out]LeftFootPositionAbsolute position of the left foot.
[out]RightFootPositionAbsolute position of the right foot.
Returns
True is there is still some data to send, false otherwise.

◆ RunOneStepOfTheControlLoop() [4/5]

virtual bool PatternGeneratorJRL::PatternGeneratorInterface::RunOneStepOfTheControlLoop ( Eigen::VectorXd &  CurrentConfiguration,
Eigen::VectorXd &  CurrentVelocity,
Eigen::VectorXd &  CurrentAcceleration,
Eigen::VectorXd &  ZMPTarget,
COMState COMState,
FootAbsolutePosition LeftFootPosition,
FootAbsolutePosition RightFootPosition 
)
pure virtual

Run One Step of the global control loop aka The Main Method To Be Used.

Parameters
[out]CurrentConfigurationThe current configuration of the robot according to the implementation of dynamic-JRLJapan. This should be first position and orientation of the waist, and then all the DOFs of your robot.
[out]CurrentVelocityThe current velocity of the robot according to the the implementation of dynamic-JRLJapan.
[out]CurrentAccelerationThe current acceleration of the robot according to the the implementation of dynamic-JRLJapan.
[out]ZMPTargetThe target ZMP in the waist reference frame.
[out]COMStateThe CoM state (up to the acceleration) for this motion.
[out]LeftFootPositionAbsolute position of the left foot.
[out]RightFootPositionAbsolute position of the right foot.
Returns
True is there is still some data to send, false otherwise.

◆ RunOneStepOfTheControlLoop() [5/5]

virtual bool PatternGeneratorJRL::PatternGeneratorInterface::RunOneStepOfTheControlLoop ( FootAbsolutePosition LeftFootPosition,
FootAbsolutePosition RightFootPosition,
ZMPPosition ZMPRefPos,
COMPosition COMRefPos 
)
pure virtual

Run One Step of the global control loop aka The Main Method To Be Used.

Parameters
[out]LeftFootPositionAbsolute position of the left foot.
[out]RightFootPositionAbsolute position of the right foot.
[out]ZMPRefPosZMP position new reference
[out]COMRefPosCOM position new reference.
Returns
True is there is still some data to send, false otherwise.

◆ setCoMPerturbationForce()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::setCoMPerturbationForce ( double  x,
double  y 
)
pure virtual

Set velocity reference.

Parameters
xAdditive acceleration along the saggital plane.
yAdditive acceleration along the lateral plane.

◆ SetCurrentJointValues()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::SetCurrentJointValues ( Eigen::VectorXd &  lCurrentJointValues)
pure virtual

Set the current joint values of the robot. This method is used to properly initialize the pattern generator. It also updates the state of the robot if other control mechanisms modifies the upper body part and if this should be taken into account into the pattern generator in the second loop of control.

◆ setVelocityReference()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::setVelocityReference ( double  x,
double  y,
double  yaw 
)
pure virtual

Set velocity reference This method is only supported by Herdt's algorithm. Currently only a 3D speed is supported:

Parameters
xVelocity along the saggital plane.
yVelocity along the perpendicular plane.
yawAngular velocity in the x-y plane.

◆ setWaistPositionAndOrientation()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::setWaistPositionAndOrientation ( double  TQ[7])
pure virtual

Set Waist position and Orientation

◆ setZMPInitialPoint()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::setZMPInitialPoint ( Eigen::Vector3d &  lZMPInitialPoint)
pure virtual

Set the initial ZMP reference point.

◆ StartOnLineStepSequencing()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::StartOnLineStepSequencing ( )
pure virtual

Start the creation of steps on line.

◆ StopOnLineStepSequencing()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::StopOnLineStepSequencing ( )
pure virtual

Stop the creation of steps on line.

◆ UpdateAbsolutePosition()

virtual void PatternGeneratorJRL::PatternGeneratorInterface::UpdateAbsolutePosition ( bool  UpdateAbsMotionOrNot)
pure virtual

Update the current waist absolute position.


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