robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::DiscreteTimeSwingFootRef Class Reference

Discrete-time reference of the positions of swinging contact frames. More...

#include <discrete_time_swing_foot_ref.hpp>

Inheritance diagram for robotoc::DiscreteTimeSwingFootRef:
Collaboration diagram for robotoc::DiscreteTimeSwingFootRef:

Public Member Functions

 DiscreteTimeSwingFootRef (const int contact_index, const double step_height)
 Constructor. More...
 
 ~DiscreteTimeSwingFootRef ()
 Destructor. More...
 
void setSwingFootRef (const std::shared_ptr< ContactSequence > &contact_sequence)
 Set the reference contact positions from the contact sequence. The first and last contact phases must have active contacts. More...
 
void setSwingFootRef (const std::shared_ptr< ContactSequence > &contact_sequence, const Eigen::Vector3d &first_contact_position, const Eigen::Vector3d &last_contact_position, const double first_rate=0, const double last_rate=0)
 Set the reference contact positions from the contact sequence. The first and last contact phases must have active contacts. Also, the position 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

Discrete-time reference of the positions of swinging contact frames.

Constructor & Destructor Documentation

◆ DiscreteTimeSwingFootRef()

robotoc::DiscreteTimeSwingFootRef::DiscreteTimeSwingFootRef ( const int  contact_index,
const double  step_height 
)

Constructor.

Parameters
[in]contact_indexContact index of interest.
[in]step_heightThe step height of the gait.

◆ ~DiscreteTimeSwingFootRef()

robotoc::DiscreteTimeSwingFootRef::~DiscreteTimeSwingFootRef ( )

Destructor.

Member Function Documentation

◆ isActive()

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

◆ setSwingFootRef() [1/2]

void robotoc::DiscreteTimeSwingFootRef::setSwingFootRef ( const std::shared_ptr< ContactSequence > &  contact_sequence)

Set the reference contact positions from the contact sequence. The first and last contact phases must have active contacts.

Parameters
[in]contact_sequenceContact sequence.

◆ setSwingFootRef() [2/2]

void robotoc::DiscreteTimeSwingFootRef::setSwingFootRef ( const std::shared_ptr< ContactSequence > &  contact_sequence,
const Eigen::Vector3d &  first_contact_position,
const Eigen::Vector3d &  last_contact_position,
const double  first_rate = 0,
const double  last_rate = 0 
)

Set the reference contact positions from the contact sequence. The first and last contact phases must have active contacts. Also, the position refs of the first and last contact phases are defined by user.

Parameters
[in]contact_sequenceContact sequence.
[in]first_contact_positionReference contact position at the first contact phase.
[in]last_contact_positionReference contact position at the last contact phase.
[in]first_rateRate of the first contact position (0 <= rate <= 1). Default is 0.
[in]last_rateRate of the last contact position (0 <= rate <= 1). Default is 0.

◆ updateRef()

void robotoc::DiscreteTimeSwingFootRef::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: