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

Periodic reference of the foot position. More...

#include <mpc_periodic_swing_foot_ref.hpp>

Inheritance diagram for robotoc::MPCPeriodicSwingFootRef:
Collaboration diagram for robotoc::MPCPeriodicSwingFootRef:

Public Member Functions

 MPCPeriodicSwingFootRef (const int contact_index, const double swing_height, const double swing_start_time, const double period_swing, const double period_stance, const int num_phases_in_period=1)
 Constructor. More...
 
 ~MPCPeriodicSwingFootRef ()
 Destructor. More...
 
void setPeriod (const double swing_start_time, const double period_swing, const double period_stance, const int num_phases_in_period=1)
 Set period. More...
 
void setSwingFootRef (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 &x3d_ref) const override
 Computes the reference task-space position. 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::TaskSpace3DRefBase
 TaskSpace3DRefBase ()
 Default constructor. More...
 
virtual ~TaskSpace3DRefBase ()
 Destructor. More...
 
 TaskSpace3DRefBase (const TaskSpace3DRefBase &)=default
 Default copy constructor. More...
 
TaskSpace3DRefBaseoperator= (const TaskSpace3DRefBase &)=default
 Default copy operator. More...
 
 TaskSpace3DRefBase (TaskSpace3DRefBase &&) noexcept=default
 Default move constructor. More...
 
TaskSpace3DRefBaseoperator= (TaskSpace3DRefBase &&) noexcept=default
 Default move assign operator. More...
 
virtual void updateRef (const GridInfo &grid_info, Eigen::VectorXd &ref_3d) const =0
 Computes the reference task-space position. 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 of the foot position.

Constructor & Destructor Documentation

◆ MPCPeriodicSwingFootRef()

robotoc::MPCPeriodicSwingFootRef::MPCPeriodicSwingFootRef ( const int  contact_index,
const double  swing_height,
const double  swing_start_time,
const double  period_swing,
const double  period_stance,
const int  num_phases_in_period = 1 
)

Constructor.

Parameters
[in]contact_indexContact index of the foot.
[in]swing_heightThe swing height of the gait.
[in]swing_start_timeStart time of the reference tracking.
[in]period_swingPeriod where the foot is swinging.
[in]period_stancePeriod where the foot is stancing.
[in]num_phases_in_periodNumber of phases in a period. Must be positive. Default is 1.

◆ ~MPCPeriodicSwingFootRef()

robotoc::MPCPeriodicSwingFootRef::~MPCPeriodicSwingFootRef ( )

Destructor.

Member Function Documentation

◆ isActive()

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

◆ setPeriod()

void robotoc::MPCPeriodicSwingFootRef::setPeriod ( const double  swing_start_time,
const double  period_swing,
const double  period_stance,
const int  num_phases_in_period = 1 
)

Set period.

Parameters
[in]swing_start_timeStart time of the reference tracking.
[in]period_swingPeriod where the leg is swinging.
[in]period_stancePeriod where the leg is in stance.
[in]num_phases_in_periodNumber of phases in a period. Must be positive. Default is 1.

◆ setSwingFootRef()

void robotoc::MPCPeriodicSwingFootRef::setSwingFootRef ( 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.

◆ updateRef()

void robotoc::MPCPeriodicSwingFootRef::updateRef ( const GridInfo grid_info,
Eigen::VectorXd &  ref_3d 
) const
overridevirtual

Computes the reference task-space position.

Parameters
[in]grid_infoGrid info.
[in]ref_3dReference position. Size is 3.

Implements robotoc::TaskSpace3DRefBase.


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