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

Frame translation task model. More...

#include <frame-translation.hpp>

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

Public Types

typedef TaskModelAbstractTpl< Scalar > Base
typedef TaskDataFrameTranslationTpl< Scalar > Data
typedef DataCollectorAbstractTpl< Scalar > DataCollectorAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::Matrix3s Matrix3s
typedef MathBase::Matrix6xs Matrix6xs
typedef pinocchio::MotionTpl< Scalar > Motion
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

 TaskModelFrameTranslationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Vector3s &xref)
 Construct a frame translation task using the default control dimension and LOCAL coordinates.
 TaskModelFrameTranslationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Vector3s &xref, const pinocchio::ReferenceFrame type)
 Construct a frame translation task with an explicit reference frame convention.
 TaskModelFrameTranslationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Vector3s &xref, const pinocchio::ReferenceFrame type, const std::size_t nu)
 Construct a frame translation task with an explicit reference frame convention.
 TaskModelFrameTranslationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Vector3s &xref, const std::size_t nu)
 Construct a frame translation task using LOCAL coordinates.
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>
TaskModelFrameTranslationTpl< 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.
pinocchio::FrameIndex get_id () const
 Return the frame index.
const Vector3s & get_reference () const
 Return the reference translation.
pinocchio::ReferenceFrame get_type () const
 Return the reference frame convention.
virtual void print (std::ostream &os) const override
 Print relevant information.
void set_id (const pinocchio::FrameIndex id)
 Update the frame index.
void set_reference (const Vector3s &reference)
 Update the reference translation.
void set_type (const pinocchio::ReferenceFrame type)
 Update the reference frame convention.
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::TaskModelFrameTranslationTpl< _Scalar >

Frame translation task model.

The task quantity is a 3D translation error expressed in the selected reference frame, where xref is an absolute world translation:

  • LOCAL: $y = R^T (t - t_\mathrm{ref})$,
  • WORLD and LOCAL_WORLD_ALIGNED: $y = t - t_\mathrm{ref}$.

The task rate $v$ is the corresponding linear velocity in the same convention:

\‍[  v = \big({}^{\mathrm{rf}}\!V_f\big)_{\mathrm{lin}}.
\‍]

The acceleration term is the corresponding linear acceleration:

\‍[  a = \big({}^{\mathrm{rf}}\!A_f\big)_{\mathrm{lin}}.
\‍]

WORLD and LOCAL_WORLD_ALIGNED are equivalent for the linear part.

Definition at line 41 of file frame-translation.hpp.

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

Definition at line 47 of file frame-translation.hpp.

◆ Base

template<typename _Scalar>
typedef TaskModelAbstractTpl<Scalar> Base

Definition at line 48 of file frame-translation.hpp.

◆ TaskDataAbstract

template<typename _Scalar>
typedef TaskDataAbstractTpl<Scalar> TaskDataAbstract

Definition at line 49 of file frame-translation.hpp.

◆ Data

template<typename _Scalar>
typedef TaskDataFrameTranslationTpl<Scalar> Data

Definition at line 50 of file frame-translation.hpp.

◆ DataCollectorAbstract

template<typename _Scalar>
typedef DataCollectorAbstractTpl<Scalar> DataCollectorAbstract

Definition at line 51 of file frame-translation.hpp.

◆ StateMultibody

template<typename _Scalar>
typedef StateMultibodyTpl<Scalar> StateMultibody

Definition at line 52 of file frame-translation.hpp.

◆ Matrix3s

template<typename _Scalar>
typedef MathBase::Matrix3s Matrix3s

Definition at line 53 of file frame-translation.hpp.

◆ Matrix6xs

template<typename _Scalar>
typedef MathBase::Matrix6xs Matrix6xs

Definition at line 54 of file frame-translation.hpp.

◆ Vector3s

template<typename _Scalar>
typedef MathBase::Vector3s Vector3s

Definition at line 55 of file frame-translation.hpp.

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

Definition at line 56 of file frame-translation.hpp.

◆ Motion

template<typename _Scalar>
typedef pinocchio::MotionTpl<Scalar> Motion

Definition at line 57 of file frame-translation.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 46 of file frame-translation.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: