#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... | |
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:
|
inline |
Constructor
strm | Should provide the file to initialize the preview control, the path to the VRML model, and the name of the file containing the VRML model. |
|
inlinevirtual |
Destructor
|
pure virtual |
Add an online step.
|
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.
|
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.
[in] | Time | Time information of the step. |
[in] | aFootAbsolutePosition | Absolute position of the foot. |
|
pure virtual |
Change online step. See the above method for the specifications. This method uses a different format with stream of strings.
[in] | Time | Time information of the step. |
|
pure virtual |
Common Initialization of walking.
[out] | lStartingCOMPosition | For the starting position on the articular space, returns the COM position. |
[out] | lStartingZMPPosition | For the starting position on the articular space, returns the ZMP position. |
[out] | BodyAnglesIni | Basically it is a copy of CurrentJointValues but as a vector. |
[out] | InitLeftFootAbsPos | Returns the current absolute position of the left foot for the given posture of the robot. |
[out] | InitRightFootAbsPos | Returns the current absolute position of the right foot for the given posture of the robot. |
[out] | lRelativeFootPositions | List of relative positions for the support foot still in the stack of steps. |
[in] | lCurrentJointValues | The vector of articular values in classical C++ style. |
[in] | ClearStepStackHandler | Clean the stack of steps after copy. |
|
pure virtual |
Returns the ZMP, CoM, left foot absolute position, and right foot absolute position for the initiale pose.
|
pure virtual |
Get the leg joint velocity.
|
pure virtual |
Get the waist position and orientation as a quaternion, and the planar X-Y orientation in Orientation.
|
pure virtual |
An other method to get the waist position using a matrix.
|
pure virtual |
Get Waist velocity.
|
pure virtual |
Returns the walking mode.
|
pure virtual |
Get the initial ZMP reference point.
|
pure virtual |
Parse a command (to be used out of a plugin) and call all objects which registered the method.
|
pure virtual |
Read a sequence of steps.
|
pure virtual |
Rune One Step of the global control loop.
|
pure virtual |
Run One Step of the global control loop aka The Main Method To Be Used.
[out] | CurrentConfiguration | The 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] | CurrentVelocity | The current velocity of the robot according to the the implementation of dynamic-JRLJapan. |
[out] | CurrentAcceleration | The current acceleration of the robot according to the the implementation of dynamic-JRLJapan. |
[out] | ZMPTarget | The target ZMP in the waist reference frame. |
|
pure virtual |
Run One Step of the global control loop aka The Main Method To Be Used.
[out] | CurrentConfiguration | The 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] | CurrentVelocity | The current velocity of the robot according to the the implementation of dynamic-JRLJapan. |
[out] | CurrentAcceleration | The current acceleration of the robot according to the the implementation of dynamic-JRLJapan. |
[out] | ZMPTarget | The target ZMP in the waist reference frame. |
[out] | COMPosition | The CoM position for this motion. |
[out] | LeftFootPosition | Absolute position of the left foot. |
[out] | RightFootPosition | Absolute position of the right foot. |
|
pure virtual |
Run One Step of the global control loop aka The Main Method To Be Used.
[out] | CurrentConfiguration | The 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] | CurrentVelocity | The current velocity of the robot according to the the implementation of dynamic-JRLJapan. |
[out] | CurrentAcceleration | The current acceleration of the robot according to the the implementation of dynamic-JRLJapan. |
[out] | ZMPTarget | The target ZMP in the waist reference frame. |
[out] | COMState | The CoM state (up to the acceleration) for this motion. |
[out] | LeftFootPosition | Absolute position of the left foot. |
[out] | RightFootPosition | Absolute position of the right foot. |
|
pure virtual |
Run One Step of the global control loop aka The Main Method To Be Used.
[out] | LeftFootPosition | Absolute position of the left foot. |
[out] | RightFootPosition | Absolute position of the right foot. |
[out] | ZMPRefPos | ZMP position new reference |
[out] | COMRefPos | COM position new reference. |
|
pure virtual |
Set velocity reference.
x | Additive acceleration along the saggital plane. |
y | Additive acceleration along the lateral plane. |
|
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.
|
pure virtual |
Set velocity reference This method is only supported by Herdt's algorithm. Currently only a 3D speed is supported:
x | Velocity along the saggital plane. |
y | Velocity along the perpendicular plane. |
yaw | Angular velocity in the x-y plane. |
|
pure virtual |
Set Waist position and Orientation
|
pure virtual |
Set the initial ZMP reference point.
|
pure virtual |
Start the creation of steps on line.
|
pure virtual |
Stop the creation of steps on line.
|
pure virtual |
Update the current waist absolute position.