Crocoddyl
Loading...
Searching...
No Matches
TaskModelCoMPositionTpl< _Scalar > Class Template Reference

CoM position task model. More...

#include <com-position.hpp>

Inheritance diagram for TaskModelCoMPositionTpl< _Scalar >:
TaskModelAbstractTpl< _Scalar >TaskModelBase

Public Types

typedef TaskModelAbstractTpl< Scalar > Base
typedef TaskDataCoMPositionTpl< Scalar > Data
typedef DataCollectorAbstractTpl< Scalar > DataCollectorAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::Matrix3xs Matrix3xs
typedef StateMultibodyTpl< Scalar > StateMultibody
typedef TaskDataAbstractTpl< Scalar > TaskDataAbstract
typedef MathBase::Vector3s Vector3s
typedef MathBase::VectorXs VectorXs
Public Types inherited from TaskModelAbstractTpl< _Scalar >
typedef DataCollectorAbstractTpl< Scalar > DataCollectorAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::MatrixXs MatrixXs
typedef StateAbstractTpl< Scalar > StateAbstract
typedef TaskDataAbstractTpl< Scalar > TaskDataAbstract
typedef MathBase::VectorXs VectorXs

Public Member Functions

 TaskModelCoMPositionTpl (std::shared_ptr< StateMultibody > state, const Vector3s &cref)
 Construct a CoM position task using the default control dimension.
 TaskModelCoMPositionTpl (std::shared_ptr< StateMultibody > state, const Vector3s &cref, const std::size_t nu)
 Construct a CoM position task.
virtual void calc (const std::shared_ptr< TaskDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) override
 Compute the task value and task rate.
virtual void calcDiff (const std::shared_ptr< TaskDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) override
 Compute the task Jacobians.
template<typename NewScalar>
TaskModelCoMPositionTpl< NewScalar > cast () const
 Cast the task model to a different scalar type.
virtual std::shared_ptr< TaskDataAbstract > createData (DataCollectorAbstract *const data) override
 Allocate task data.
const Vector3s & get_reference () const
 Return the reference CoM position.
virtual void print (std::ostream &os) const override
 Print relevant information.
void set_reference (const Vector3s &cref)
 Update the reference CoM position.
Public Member Functions inherited from TaskModelAbstractTpl< _Scalar >
 TaskModelAbstractTpl (std::shared_ptr< StateAbstract > state, const std::size_t nr, const std::size_t nu, const bool q_dependent=true, const bool v_dependent=true, const bool u_dependent=true, const bool has_acceleration=true)
 Initialize the task model.
bool get_has_acceleration () const
 Return whether the task defines an acceleration component.
std::size_t get_nr () const
std::size_t get_nu () const
bool get_q_dependent () const
const std::shared_ptr< StateAbstract > & get_state () const
bool get_u_dependent () const
bool get_v_dependent () const

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
Public Attributes inherited from TaskModelAbstractTpl< _Scalar >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Protected Attributes

std::size_t nr_
std::size_t nu_
bool q_dependent_
std::shared_ptr< StateAbstract > state_
bool u_dependent_
bool v_dependent_
Protected Attributes inherited from TaskModelAbstractTpl< _Scalar >
bool has_acceleration_
std::size_t nr_
std::size_t nu_
bool q_dependent_
std::shared_ptr< StateAbstract > state_
bool u_dependent_
bool v_dependent_

Detailed Description

template<typename _Scalar>
class crocoddyl::TaskModelCoMPositionTpl< _Scalar >

CoM position task model.

The task quantity is the 3D center-of-mass tracking error

\‍[  y = c - c_\mathrm{ref},
\‍]

where $c$ is the current center-of-mass position expressed in the world frame and $c_\mathrm{ref}$ is the reference position.

The task rate is the center-of-mass linear velocity

\‍[  v = \dot c.
\‍]

The acceleration term is the center-of-mass linear acceleration

\‍[  a = \ddot c.
\‍]

Definition at line 44 of file com-position.hpp.

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

Definition at line 50 of file com-position.hpp.

◆ Base

template<typename _Scalar>
typedef TaskModelAbstractTpl<Scalar> Base

Definition at line 51 of file com-position.hpp.

◆ TaskDataAbstract

template<typename _Scalar>
typedef TaskDataAbstractTpl<Scalar> TaskDataAbstract

Definition at line 52 of file com-position.hpp.

◆ Data

template<typename _Scalar>
typedef TaskDataCoMPositionTpl<Scalar> Data

Definition at line 53 of file com-position.hpp.

◆ DataCollectorAbstract

template<typename _Scalar>
typedef DataCollectorAbstractTpl<Scalar> DataCollectorAbstract

Definition at line 54 of file com-position.hpp.

◆ StateMultibody

template<typename _Scalar>
typedef StateMultibodyTpl<Scalar> StateMultibody

Definition at line 55 of file com-position.hpp.

◆ Matrix3xs

template<typename _Scalar>
typedef MathBase::Matrix3xs Matrix3xs

Definition at line 56 of file com-position.hpp.

◆ Vector3s

template<typename _Scalar>
typedef MathBase::Vector3s Vector3s

Definition at line 57 of file com-position.hpp.

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

Definition at line 58 of file com-position.hpp.

Member Function Documentation

◆ calc()

template<typename _Scalar>
virtual void calc(const std::shared_ptr< TaskDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x,
const Eigen::Ref< const VectorXs > &u )
overridevirtual

Compute the task value and task rate.

Implements TaskModelAbstractTpl< _Scalar >.

◆ calcDiff()

template<typename _Scalar>
virtual void calcDiff(const std::shared_ptr< TaskDataAbstract > &data,
const Eigen::Ref< const VectorXs > &x,
const Eigen::Ref< const VectorXs > &u )
overridevirtual

Compute the task Jacobians.

Implements TaskModelAbstractTpl< _Scalar >.

◆ createData()

template<typename _Scalar>
virtual std::shared_ptr< TaskDataAbstract > createData(DataCollectorAbstract *constdata)
overridevirtual

Allocate task data.

Reimplemented from TaskModelAbstractTpl< _Scalar >.

◆ print()

template<typename _Scalar>
virtual void print(std::ostream &os)const
overridevirtual

Print relevant information.

Reimplemented from TaskModelAbstractTpl< _Scalar >.

Member Data Documentation

◆ Scalar

template<typename _Scalar>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Definition at line 49 of file com-position.hpp.

◆ nr_

template<typename _Scalar>
std::size_t nr_
protected

Definition at line 114 of file task-base.hpp.

◆ nu_

template<typename _Scalar>
std::size_t nu_
protected

Definition at line 115 of file task-base.hpp.

◆ q_dependent_

template<typename _Scalar>
bool q_dependent_
protected

Definition at line 116 of file task-base.hpp.

◆ state_

template<typename _Scalar>
std::shared_ptr<StateAbstract> state_
protected

Definition at line 113 of file task-base.hpp.

◆ u_dependent_

template<typename _Scalar>
bool u_dependent_
protected

Definition at line 118 of file task-base.hpp.

◆ v_dependent_

template<typename _Scalar>
bool v_dependent_
protected

Definition at line 117 of file task-base.hpp.


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