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

Discrete-time reference of the center of mass. More...

#include <discrete_time_com_ref.hpp>

Inheritance diagram for robotoc::DiscreteTimeCoMRef:
Collaboration diagram for robotoc::DiscreteTimeCoMRef:

Public Member Functions

 DiscreteTimeCoMRef (const std::vector< Eigen::Vector3d > &com_to_contact_position)
 Constructor. More...
 
 ~DiscreteTimeCoMRef ()
 Destructor. More...
 
void setCoMRef (const std::shared_ptr< ContactSequence > &contact_sequence)
 Set the reference positions of CoM from the contact positions of the contact sequence. The first and last contact phases must have active contacts. More...
 
void setCoMRef (const std::shared_ptr< ContactSequence > &contact_sequence, const Eigen::Vector3d &first_com_ref, const Eigen::Vector3d &last_com_ref, const double first_rate=0, const double last_rate=0)
 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

Discrete-time reference of the center of mass.

Constructor & Destructor Documentation

◆ DiscreteTimeCoMRef()

robotoc::DiscreteTimeCoMRef::DiscreteTimeCoMRef ( const std::vector< Eigen::Vector3d > &  com_to_contact_position)

Constructor.

Parameters
[in]com_to_contact_positionRelative contact positions from the CoM position position.

◆ ~DiscreteTimeCoMRef()

robotoc::DiscreteTimeCoMRef::~DiscreteTimeCoMRef ( )

Destructor.

Member Function Documentation

◆ isActive()

bool robotoc::DiscreteTimeCoMRef::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() [1/2]

void robotoc::DiscreteTimeCoMRef::setCoMRef ( const std::shared_ptr< ContactSequence > &  contact_sequence)

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

Parameters
[in]contact_sequenceContact sequence.

◆ setCoMRef() [2/2]

void robotoc::DiscreteTimeCoMRef::setCoMRef ( const std::shared_ptr< ContactSequence > &  contact_sequence,
const Eigen::Vector3d &  first_com_ref,
const Eigen::Vector3d &  last_com_ref,
const double  first_rate = 0,
const double  last_rate = 0 
)

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]first_com_refCoM reference at the first contact phase.
[in]last_com_refCoM reference 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::DiscreteTimeCoMRef::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: