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

Foot step planner for the flying trot gait of quadrupeds. More...

#include <flying_trot_foot_step_planner.hpp>

Inheritance diagram for robotoc::FlyingTrotFootStepPlanner:
Collaboration diagram for robotoc::FlyingTrotFootStepPlanner:

Public Member Functions

 FlyingTrotFootStepPlanner (const Robot &quadruped_robot)
 Constructs the planner. More...
 
 FlyingTrotFootStepPlanner ()
 Default constructor. More...
 
 ~FlyingTrotFootStepPlanner ()
 Destructor. More...
 
 FlyingTrotFootStepPlanner (const FlyingTrotFootStepPlanner &)=default
 Default copy constructor. More...
 
FlyingTrotFootStepPlanneroperator= (const FlyingTrotFootStepPlanner &)=default
 Default copy assign operator. More...
 
 FlyingTrotFootStepPlanner (FlyingTrotFootStepPlanner &&) noexcept=default
 Default move constructor. More...
 
FlyingTrotFootStepPlanneroperator= (FlyingTrotFootStepPlanner &&) noexcept=default
 Default move assign operator. More...
 
void setGaitPattern (const Eigen::Vector3d &step_length, const double step_yaw)
 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 flying_time, const double stance_time, const double gain)
 Sets the gait pattern by Raibert heuristic. More...
 
void setContactSurfaces (const std::vector< Eigen::Matrix3d > &contact_surfaces)
 Sets the rotation of the contact surfaces. More...
 
void setContactSurfaces (const std::vector< std::vector< Eigen::Matrix3d > > &contact_surfaces)
 Sets the rotation of the contact surfaces over the mutiple steps. 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
 This is invalid in FlyingTrotFootStepPlanner. More...
 
const std::vector< Eigen::Vector3d > & contactPositions (const int step) const override
 Gets the contact positions of a specified step. More...
 
const std::vector< Eigen::Matrix3d > & contactSurfaces (const int step) const override
 Gets the contact surfaces of a specified step. 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 FlyingTrotFootStepPlanner &planner)
 
std::ostream & operator<< (std::ostream &os, const std::shared_ptr< FlyingTrotFootStepPlanner > &planner)
 

Detailed Description

Foot step planner for the flying trot gait of quadrupeds.

Constructor & Destructor Documentation

◆ FlyingTrotFootStepPlanner() [1/4]

robotoc::FlyingTrotFootStepPlanner::FlyingTrotFootStepPlanner ( const Robot quadruped_robot)

Constructs the planner.

Parameters
[in]quadruped_robotQuadruped robot model.

◆ FlyingTrotFootStepPlanner() [2/4]

robotoc::FlyingTrotFootStepPlanner::FlyingTrotFootStepPlanner ( )

Default constructor.

◆ ~FlyingTrotFootStepPlanner()

robotoc::FlyingTrotFootStepPlanner::~FlyingTrotFootStepPlanner ( )

Destructor.

◆ FlyingTrotFootStepPlanner() [3/4]

robotoc::FlyingTrotFootStepPlanner::FlyingTrotFootStepPlanner ( const FlyingTrotFootStepPlanner )
default

Default copy constructor.

◆ FlyingTrotFootStepPlanner() [4/4]

robotoc::FlyingTrotFootStepPlanner::FlyingTrotFootStepPlanner ( FlyingTrotFootStepPlanner &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ CoM()

const Eigen::Vector3d & robotoc::FlyingTrotFootStepPlanner::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::FlyingTrotFootStepPlanner::contactPlacements ( const int  step) const
overridevirtual

This is invalid in FlyingTrotFootStepPlanner.

Implements robotoc::ContactPlannerBase.

◆ contactPositions()

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

Gets the contact positions of a specified step.

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

Implements robotoc::ContactPlannerBase.

◆ contactSurfaces()

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

Gets the contact surfaces of a specified step.

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

Implements robotoc::ContactPlannerBase.

◆ init()

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

Initializes the planner.

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

Implements robotoc::ContactPlannerBase.

◆ operator=() [1/2]

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

Default copy assign operator.

◆ operator=() [2/2]

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

Default move assign operator.

◆ plan()

bool robotoc::FlyingTrotFootStepPlanner::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::FlyingTrotFootStepPlanner::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.

◆ setContactSurfaces() [1/2]

void robotoc::FlyingTrotFootStepPlanner::setContactSurfaces ( const std::vector< Eigen::Matrix3d > &  contact_surfaces)

Sets the rotation of the contact surfaces.

Parameters
[in]contact_surfacesRotation of the contact surfaces.

◆ setContactSurfaces() [2/2]

void robotoc::FlyingTrotFootStepPlanner::setContactSurfaces ( const std::vector< std::vector< Eigen::Matrix3d > > &  contact_surfaces)

Sets the rotation of the contact surfaces over the mutiple steps.

Parameters
[in]contact_surfacesRotation of the contact surfaces.

◆ setGaitPattern()

void robotoc::FlyingTrotFootStepPlanner::setGaitPattern ( const Eigen::Vector3d &  step_length,
const double  step_yaw 
)

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.

◆ setRaibertGaitPattern()

void robotoc::FlyingTrotFootStepPlanner::setRaibertGaitPattern ( const Eigen::Vector3d &  vcom_cmd,
const double  yaw_rate_cmd,
const double  flying_time,
const double  stance_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]flying_timeFlying time of the gait.
[in]stance_timeStance time of the gait.
[in]gainThe feedback gain of the vcom_cmd.

◆ size()

int robotoc::FlyingTrotFootStepPlanner::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 FlyingTrotFootStepPlanner planner 
)
friend

◆ operator<< [2/2]

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

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