Discrete-time reference of the center of mass.
More...
#include <discrete_time_com_ref.hpp>
Discrete-time reference of the center of mass.
◆ DiscreteTimeCoMRef()
robotoc::DiscreteTimeCoMRef::DiscreteTimeCoMRef |
( |
const std::vector< Eigen::Vector3d > & |
com_to_contact_position | ) |
|
Constructor.
- Parameters
-
[in] | com_to_contact_position | Relative contact positions from the CoM position position. |
◆ ~DiscreteTimeCoMRef()
robotoc::DiscreteTimeCoMRef::~DiscreteTimeCoMRef |
( |
| ) |
|
◆ 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
-
- 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_sequence | Contact 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_sequence | Contact sequence. |
[in] | first_com_ref | CoM reference at the first contact phase. |
[in] | last_com_ref | CoM reference at the last contact phase. |
[in] | first_rate | Rate of the first contact position (0 <= rate <= 1). Default is 0. |
[in] | last_rate | Rate 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_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: