Periodic reference positions of the center of mass.
More...
#include <mpc_periodic_com_ref.hpp>
|
| 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...
|
|
| CoMRefBase () |
| Default constructor. More...
|
|
virtual | ~CoMRefBase () |
| Destructor. More...
|
|
| CoMRefBase (const CoMRefBase &)=default |
| Default copy constructor. More...
|
|
CoMRefBase & | operator= (const CoMRefBase &)=default |
| Default copy operator. More...
|
|
| CoMRefBase (CoMRefBase &&) noexcept=default |
| Default move constructor. More...
|
|
CoMRefBase & | operator= (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...
|
|
Periodic reference positions of the center of mass.
◆ 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_time | Start time of the reference tracking. |
[in] | period_active | Period where the tracking is active. |
[in] | period_inactive | Period where the tracking is inactive. |
[in] | num_phases_in_period | Number of phases in a period. Must be positive. Default is 1. |
◆ ~MPCPeriodicCoMRef()
robotoc::MPCPeriodicCoMRef::~MPCPeriodicCoMRef |
( |
| ) |
|
◆ 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
-
- 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_sequence | Contact sequence. |
[in] | foot_step_planner | Foot 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_time | Start time of the reference tracking. |
[in] | period_active | Period where the tracking is active. |
[in] | period_inactive | Period where the tracking is inactive. |
[in] | num_phases_in_period | Number 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_info | Grid info. |
[in] | com_ref | Reference CoM position Size is 3. |
Implements robotoc::CoMRefBase.
The documentation for this class was generated from the following file: