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

Periodic reference positions of the center of mass. More...

#include <mpc_periodic_com_ref.hpp>

Inheritance diagram for robotoc::MPCPeriodicCoMRef:
Collaboration diagram for robotoc::MPCPeriodicCoMRef:

Public Member Functions

 MPCPeriodicCoMRef (const double swing_start_time, const double period_active, const double period_inactive, const int num_phases_in_period=1)
 Constructor. More...
 
 ~MPCPeriodicCoMRef ()
 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 setCoMRef (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 GridInfo &grid_info, Eigen::VectorXd &com_ref) const override
 Computes the reference CoM position. More...
 
bool isActive (const GridInfo &grid_info) const override
 Checks wheather the cost is active or not for the given grid info. More...
 
- Public Member Functions inherited from robotoc::CoMRefBase
 CoMRefBase ()
 Default constructor. More...
 
virtual ~CoMRefBase ()
 Destructor. More...
 
 CoMRefBase (const CoMRefBase &)=default
 Default copy constructor. More...
 
CoMRefBaseoperator= (const CoMRefBase &)=default
 Default copy operator. More...
 
 CoMRefBase (CoMRefBase &&) noexcept=default
 Default move constructor. More...
 
CoMRefBaseoperator= (CoMRefBase &&) noexcept=default
 Default move assign operator. More...
 
virtual void updateRef (const GridInfo &grid_info, Eigen::VectorXd &com_ref) const =0
 Computes the reference CoM position. More...
 
virtual bool isActive (const GridInfo &grid_info) const =0
 Checks wheather the cost is active or not for the given grid info. More...
 

Detailed Description

Periodic reference positions of the center of mass.

Constructor & Destructor Documentation

◆ MPCPeriodicCoMRef()

robotoc::MPCPeriodicCoMRef::MPCPeriodicCoMRef ( const double  swing_start_time,
const double  period_active,
const double  period_inactive,
const int  num_phases_in_period = 1 
)

Constructor.

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.

◆ ~MPCPeriodicCoMRef()

robotoc::MPCPeriodicCoMRef::~MPCPeriodicCoMRef ( )

Destructor.

Member Function Documentation

◆ isActive()

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

Checks wheather the cost is active or not for the given grid info.

Parameters
[in]grid_infoGrid info.
Returns
true if the cost is active for the given grid_info. false if not.

Implements robotoc::CoMRefBase.

◆ setCoMRef()

void robotoc::MPCPeriodicCoMRef::setCoMRef ( 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::MPCPeriodicCoMRef::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::MPCPeriodicCoMRef::updateRef ( const GridInfo grid_info,
Eigen::VectorXd &  com_ref 
) const
overridevirtual

Computes the reference CoM position.

Parameters
[in]grid_infoGrid info.
[in]com_refReference CoM position Size is 3.

Implements robotoc::CoMRefBase.


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