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

Periodic reference configuration for MPC of legged robots. More...

#include <mpc_periodic_configuration_ref.hpp>

Inheritance diagram for robotoc::MPCPeriodicConfigurationRef:
Collaboration diagram for robotoc::MPCPeriodicConfigurationRef:

Public Member Functions

 MPCPeriodicConfigurationRef (const Eigen::VectorXd &q, const double swing_start_time, const double period_active, const double period_inactive, const int num_phases_in_period=1)
 Constructor. More...
 
 ~MPCPeriodicConfigurationRef ()
 Destructor. More...
 
void setPeriod (const double swing_start_time, const double period_active, const double period_inactive, const int num_phases_in_period=1)
 Set period. More...
 
void setConfigurationRef (const std::shared_ptr< ContactSequence > &contact_sequence, const std::shared_ptr< ContactPlannerBase > &foot_step_planner)
 Set the reference positions of CoM from the contact positions of the contact sequence. Also, the CoM refs of the first and last contact phases are defined by user. More...
 
void updateRef (const Robot &robot, const GridInfo &grid_info, Eigen::VectorXd &q_ref) const override
 Computes the reference configuration. More...
 
bool isActive (const GridInfo &grid_info) const override
 Checks wheather the cost is active or not at the specified time. More...
 
- Public Member Functions inherited from robotoc::ConfigurationSpaceRefBase
 ConfigurationSpaceRefBase ()
 Default constructor. More...
 
virtual ~ConfigurationSpaceRefBase ()
 Destructor. More...
 
 ConfigurationSpaceRefBase (const ConfigurationSpaceRefBase &)=default
 Default copy constructor. More...
 
ConfigurationSpaceRefBaseoperator= (const ConfigurationSpaceRefBase &)=default
 Default copy operator. More...
 
 ConfigurationSpaceRefBase (ConfigurationSpaceRefBase &&) noexcept=default
 Default move constructor. More...
 
ConfigurationSpaceRefBaseoperator= (ConfigurationSpaceRefBase &&) noexcept=default
 Default move assign operator. More...
 
virtual void updateRef (const Robot &robot, const GridInfo &grid_info, Eigen::VectorXd &q_ref) const =0
 Computes the reference configuration. More...
 
virtual bool isActive (const GridInfo &grid_info) const =0
 Checks wheather the cost is active or not at the specified time. More...
 

Detailed Description

Periodic reference configuration for MPC of legged robots.

Constructor & Destructor Documentation

◆ MPCPeriodicConfigurationRef()

robotoc::MPCPeriodicConfigurationRef::MPCPeriodicConfigurationRef ( const Eigen::VectorXd &  q,
const double  swing_start_time,
const double  period_active,
const double  period_inactive,
const int  num_phases_in_period = 1 
)

Constructor.

Parameters
[in]qReference configuration.
[in]swing_start_timeStart time of the reference tracking.
[in]period_activePeriod where the tracking is active.
[in]period_inactivePeriod where the tracking is inactive.
[in]num_phases_in_periodNumber of phases in a period. Must be positive. Default is 1.

◆ ~MPCPeriodicConfigurationRef()

robotoc::MPCPeriodicConfigurationRef::~MPCPeriodicConfigurationRef ( )

Destructor.

Member Function Documentation

◆ isActive()

bool robotoc::MPCPeriodicConfigurationRef::isActive ( const GridInfo grid_info) const
overridevirtual

Checks wheather the cost is active or not at the specified time.

Parameters
[in]grid_infoGrid info.
Returns
true if the cost is active at time t. false if not.

Implements robotoc::ConfigurationSpaceRefBase.

◆ setConfigurationRef()

void robotoc::MPCPeriodicConfigurationRef::setConfigurationRef ( const std::shared_ptr< ContactSequence > &  contact_sequence,
const std::shared_ptr< ContactPlannerBase > &  foot_step_planner 
)

Set the reference positions of CoM from the contact positions of the contact sequence. Also, the CoM refs of the first and last contact phases are defined by user.

Parameters
[in]contact_sequenceContact sequence.
[in]foot_step_plannerFoot step planner.

◆ setPeriod()

void robotoc::MPCPeriodicConfigurationRef::setPeriod ( const double  swing_start_time,
const double  period_active,
const double  period_inactive,
const int  num_phases_in_period = 1 
)

Set period.

Parameters
[in]swing_start_timeStart time of the reference tracking.
[in]period_activePeriod where the tracking is active.
[in]period_inactivePeriod where the tracking is inactive.
[in]num_phases_in_periodNumber of phases in a period. Must be positive. Default is 1.

◆ updateRef()

void robotoc::MPCPeriodicConfigurationRef::updateRef ( const Robot robot,
const GridInfo grid_info,
Eigen::VectorXd &  q_ref 
) const
overridevirtual

Computes the reference configuration.

Parameters
[in]robotRobot model.
[in]grid_infoGrid info.
[in]q_refReference position. Size is Robot::dimq().

Implements robotoc::ConfigurationSpaceRefBase.


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