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

Frame rotation task model. More...

#include <frame-rotation.hpp>

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

Public Types

typedef TaskModelAbstractTpl< Scalar > Base
typedef TaskDataFrameRotationTpl< 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

 TaskModelFrameRotationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Matrix3s &Rref)
 Construct a frame rotation task with LOCAL reference frame.
 TaskModelFrameRotationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Matrix3s &Rref, const pinocchio::ReferenceFrame type, const std::size_t nu)
 Construct a frame rotation task with an explicit reference frame.
 TaskModelFrameRotationTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Matrix3s &Rref, const std::size_t nu)
 Construct a frame rotation task with LOCAL reference frame.
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>
TaskModelFrameRotationTpl< 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 Matrix3s & get_reference () const
 Return the reference rotation.
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 Matrix3s &reference)
 Update the reference rotation.
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::TaskModelFrameRotationTpl< _Scalar >

Frame rotation task model.

The task quantity $y$ is a log-map rotation error. The reference frame selects the convention:

  • LOCAL: $y = \log(R_{\mathrm{ref}}^T R)$, $v = J_{\log}(y)\,{}^f\omega$, and $a = J_{\log}(y)\,{}^f\alpha$;
  • WORLD and LOCAL_WORLD_ALIGNED: $y = \log(R R_{\mathrm{ref}}^T)$, $v = J_{\log}(y)\,{}^o\omega$, and $a = J_{\log}(y)\,{}^o\alpha$.

WORLD and LOCAL_WORLD_ALIGNED are equivalent here because only the angular component is used.

Definition at line 37 of file frame-rotation.hpp.

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

Definition at line 43 of file frame-rotation.hpp.

◆ Base

template<typename _Scalar>
typedef TaskModelAbstractTpl<Scalar> Base

Definition at line 44 of file frame-rotation.hpp.

◆ TaskDataAbstract

template<typename _Scalar>
typedef TaskDataAbstractTpl<Scalar> TaskDataAbstract

Definition at line 45 of file frame-rotation.hpp.

◆ Data

template<typename _Scalar>
typedef TaskDataFrameRotationTpl<Scalar> Data

Definition at line 46 of file frame-rotation.hpp.

◆ DataCollectorAbstract

template<typename _Scalar>
typedef DataCollectorAbstractTpl<Scalar> DataCollectorAbstract

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

◆ StateMultibody

template<typename _Scalar>
typedef StateMultibodyTpl<Scalar> StateMultibody

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

◆ Matrix3s

template<typename _Scalar>
typedef MathBase::Matrix3s Matrix3s

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

◆ Matrix6xs

template<typename _Scalar>
typedef MathBase::Matrix6xs Matrix6xs

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

◆ Vector3s

template<typename _Scalar>
typedef MathBase::Vector3s Vector3s

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

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

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

◆ Motion

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

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

Constructor & Destructor Documentation

◆ TaskModelFrameRotationTpl()

template<typename _Scalar>
TaskModelFrameRotationTpl(std::shared_ptr< StateMultibody >state,
const pinocchio::FrameIndexid,
const Matrix3s &Rref,
const std::size_tnu )

Construct a frame rotation task with LOCAL reference frame.

The task dimension is fixed to 3 and the task does not depend on the control input.

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 42 of file frame-rotation.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: