robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::BipedWalkFootStepPlanner Class Referencefinal

Foot step planner for the biped robot walk. More...

#include <biped_walk_foot_step_planner.hpp>

Inheritance diagram for robotoc::BipedWalkFootStepPlanner:
Collaboration diagram for robotoc::BipedWalkFootStepPlanner:

Public Member Functions

 BipedWalkFootStepPlanner (const Robot &biped_robot)
 Constructs the planner. More...
 
 BipedWalkFootStepPlanner ()
 Default constructor. More...
 
 ~BipedWalkFootStepPlanner ()
 Destructor. More...
 
 BipedWalkFootStepPlanner (const BipedWalkFootStepPlanner &)=default
 Default copy constructor. More...
 
BipedWalkFootStepPlanneroperator= (const BipedWalkFootStepPlanner &)=default
 Default copy assign operator. More...
 
 BipedWalkFootStepPlanner (BipedWalkFootStepPlanner &&) noexcept=default
 Default move constructor. More...
 
BipedWalkFootStepPlanneroperator= (BipedWalkFootStepPlanner &&) noexcept=default
 Default move assign operator. More...
 
void setGaitPattern (const Eigen::Vector3d &step_length, const double step_yaw, const bool enable_double_support_phase)
 Sets the gait pattern by step length and yaw step command. More...
 
void setRaibertGaitPattern (const Eigen::Vector3d &vcom_cmd, const double yaw_rate_cmd, const double swing_time, const double double_support_time, const double gain)
 Sets the gait pattern by Raibert heuristic. More...
 
void init (const Eigen::VectorXd &q) override
 Initializes the planner. More...
 
bool plan (const double t, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const ContactStatus &contact_status, const int planning_steps) override
 Plans the foot steps in the MPC (receding-horizon) fashion. More...
 
const aligned_vector< SE3 > & contactPlacements (const int step) const override
 Gets the contact placements of a specified step. More...
 
const std::vector< Eigen::Vector3d > & contactPositions (const int step) const override
 This is invalid in BipedWalkFootStepPlanner. More...
 
const std::vector< Eigen::Matrix3d > & contactSurfaces (const int step) const override
 This is invalid in BipedWalkFootStepPlanner. More...
 
const Eigen::Vector3d & CoM (const int step) const override
 Gets the CoM position of a specified step. More...
 
const Eigen::Matrix3d & R (const int step) const override
 Gets the rotation matrix of the base at a specified step. More...
 
int size () const override
 Gets the size of each planned quantities. More...
 
- Public Member Functions inherited from robotoc::ContactPlannerBase
 ContactPlannerBase ()
 Default constructor. More...
 
virtual ~ContactPlannerBase ()
 Destructor. More...
 
 ContactPlannerBase (const ContactPlannerBase &)=default
 Default copy constructor. More...
 
ContactPlannerBaseoperator= (const ContactPlannerBase &)=default
 Default copy assign operator. More...
 
 ContactPlannerBase (ContactPlannerBase &&) noexcept=default
 Default move constructor. More...
 
ContactPlannerBaseoperator= (ContactPlannerBase &&) noexcept=default
 Default move assign operator. More...
 
virtual void init (const Eigen::VectorXd &q)=0
 Initializes the planner. More...
 
virtual bool plan (const double t, const Eigen::VectorXd &q, const Eigen::VectorXd &v, const ContactStatus &contact_status, const int planning_steps)=0
 Plans the foot steps in the MPC (receding-horizon) fashion. More...
 
virtual const aligned_vector< SE3 > & contactPlacements (const int step) const =0
 Gets the contact placements of a specified step. More...
 
virtual const std::vector< Eigen::Vector3d > & contactPositions (const int step) const =0
 Gets the contact positions of a specified step. More...
 
virtual const std::vector< Eigen::Matrix3d > & contactSurfaces (const int step) const =0
 Gets the contact surfaces of a specified step. More...
 
virtual const Eigen::Vector3d & CoM (const int step) const =0
 Gets the CoM position of a specified step. More...
 
virtual const Eigen::Matrix3d & R (const int step) const =0
 Gets the rotation matrix of the base at a specified step. More...
 
virtual int size () const =0
 Gets the size of each planned quantities. More...
 
void disp (std::ostream &os) const
 

Friends

std::ostream & operator<< (std::ostream &os, const BipedWalkFootStepPlanner &planner)
 
std::ostream & operator<< (std::ostream &os, const std::shared_ptr< BipedWalkFootStepPlanner > &planner)
 

Detailed Description

Foot step planner for the biped robot walk.

Constructor & Destructor Documentation

◆ BipedWalkFootStepPlanner() [1/4]

robotoc::BipedWalkFootStepPlanner::BipedWalkFootStepPlanner ( const Robot biped_robot)

Constructs the planner.

Parameters
[in]biped_robotBiped robot model.

◆ BipedWalkFootStepPlanner() [2/4]

robotoc::BipedWalkFootStepPlanner::BipedWalkFootStepPlanner ( )

Default constructor.

◆ ~BipedWalkFootStepPlanner()

robotoc::BipedWalkFootStepPlanner::~BipedWalkFootStepPlanner ( )

Destructor.

◆ BipedWalkFootStepPlanner() [3/4]

robotoc::BipedWalkFootStepPlanner::BipedWalkFootStepPlanner ( const BipedWalkFootStepPlanner )
default

Default copy constructor.

◆ BipedWalkFootStepPlanner() [4/4]

robotoc::BipedWalkFootStepPlanner::BipedWalkFootStepPlanner ( BipedWalkFootStepPlanner &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ CoM()

const Eigen::Vector3d & robotoc::BipedWalkFootStepPlanner::CoM ( const int  step) const
overridevirtual

Gets the CoM position of a specified step.

Parameters
[in]stepStep of interest.
Returns
const reference to CoM position of a specified step.
Remarks
step=0: previous step, step=1: initial step.

Implements robotoc::ContactPlannerBase.

◆ contactPlacements()

const aligned_vector< SE3 > & robotoc::BipedWalkFootStepPlanner::contactPlacements ( const int  step) const
overridevirtual

Gets the contact placements of a specified step.

Parameters
[in]stepStep of interest.
Returns
const reference to the contact placements of a specified step.
Remarks
step=0: previous step, step=1: initial step.

Implements robotoc::ContactPlannerBase.

◆ contactPositions()

const std::vector< Eigen::Vector3d > & robotoc::BipedWalkFootStepPlanner::contactPositions ( const int  step) const
overridevirtual

This is invalid in BipedWalkFootStepPlanner.

Implements robotoc::ContactPlannerBase.

◆ contactSurfaces()

const std::vector< Eigen::Matrix3d > & robotoc::BipedWalkFootStepPlanner::contactSurfaces ( const int  step) const
overridevirtual

This is invalid in BipedWalkFootStepPlanner.

Implements robotoc::ContactPlannerBase.

◆ init()

void robotoc::BipedWalkFootStepPlanner::init ( const Eigen::VectorXd &  q)
overridevirtual

Initializes the planner.

Parameters
[in]qInitial configuration. Size must be Robot::dimq().

Implements robotoc::ContactPlannerBase.

◆ operator=() [1/2]

BipedWalkFootStepPlanner & robotoc::BipedWalkFootStepPlanner::operator= ( BipedWalkFootStepPlanner &&  )
defaultnoexcept

Default move assign operator.

◆ operator=() [2/2]

BipedWalkFootStepPlanner & robotoc::BipedWalkFootStepPlanner::operator= ( const BipedWalkFootStepPlanner )
default

Default copy assign operator.

◆ plan()

bool robotoc::BipedWalkFootStepPlanner::plan ( const double  t,
const Eigen::VectorXd &  q,
const Eigen::VectorXd &  v,
const ContactStatus contact_status,
const int  planning_steps 
)
overridevirtual

Plans the foot steps in the MPC (receding-horizon) fashion.

Parameters
[in]tInitial time.
[in]qInitial configuration. Size must be Robot::dimq().
[in]vInitial velocity. Size must be Robot::dimv().
[in]contact_statusInitial contact status.
[in]planning_stepsNumber of planning steps. Must be non-negative.
Returns
True if the planning is succeeded. False if not.
Remarks
The linear and angular velocities of the floating base are assumed to be expressed in the body local coordinate.
The implementation must follow: step=0: previous step, step=1: initial step (specified as q and contact_status).

Implements robotoc::ContactPlannerBase.

◆ R()

const Eigen::Matrix3d & robotoc::BipedWalkFootStepPlanner::R ( const int  step) const
overridevirtual

Gets the rotation matrix of the base at a specified step.

Parameters
[in]stepStep of interest.
Returns
const reference to rotation matrix of the base at a specified step.
Remarks
step=0: previous step, step=1: initial step.

Implements robotoc::ContactPlannerBase.

◆ setGaitPattern()

void robotoc::BipedWalkFootStepPlanner::setGaitPattern ( const Eigen::Vector3d &  step_length,
const double  step_yaw,
const bool  enable_double_support_phase 
)

Sets the gait pattern by step length and yaw step command.

Parameters
[in]step_lengthStep length of the gait.
[in]step_yawYaw command at each step of the gait.
[in]enable_double_support_phaseEnables the double-support phase or not.

◆ setRaibertGaitPattern()

void robotoc::BipedWalkFootStepPlanner::setRaibertGaitPattern ( const Eigen::Vector3d &  vcom_cmd,
const double  yaw_rate_cmd,
const double  swing_time,
const double  double_support_time,
const double  gain 
)

Sets the gait pattern by Raibert heuristic.

Parameters
[in]vcom_cmdCommand of the COM velocity.
[in]yaw_rate_cmdCommand of the yaw-rate of the body.
[in]swing_timeSwing time of the gait.
[in]double_support_timeDouble support time of the gait.
[in]gainThe feedback gain of the vcom_cmd.

◆ size()

int robotoc::BipedWalkFootStepPlanner::size ( ) const
inlineoverridevirtual

Gets the size of each planned quantities.

Returns
Size of planning.

Implements robotoc::ContactPlannerBase.

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  os,
const BipedWalkFootStepPlanner planner 
)
friend

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  os,
const std::shared_ptr< BipedWalkFootStepPlanner > &  planner 
)
friend

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