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

Frame placement task model. More...

#include <frame-placement.hpp>

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

Public Types

typedef TaskModelAbstractTpl< Scalar > Base
typedef TaskDataFramePlacementTpl< Scalar > Data
typedef DataCollectorAbstractTpl< Scalar > DataCollectorAbstract
typedef MathBaseTpl< Scalar > MathBase
typedef MathBase::Matrix3s Matrix3s
typedef MathBase::Matrix6s Matrix6s
typedef pinocchio::MotionTpl< Scalar > Motion
typedef pinocchio::SE3Tpl< Scalar > SE3
typedef StateMultibodyTpl< Scalar > StateMultibody
typedef TaskDataAbstractTpl< Scalar > TaskDataAbstract
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

 TaskModelFramePlacementTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const SE3 &pref)
 Construct a frame placement task using the default control dimension.
 TaskModelFramePlacementTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const SE3 &pref, const pinocchio::ReferenceFrame type)
 Construct a frame placement task with an explicit reference frame.
 TaskModelFramePlacementTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const SE3 &pref, const pinocchio::ReferenceFrame type, const std::size_t nu)
 Construct a frame placement task with an explicit reference frame.
 TaskModelFramePlacementTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const SE3 &pref, const std::size_t nu)
 Construct a frame placement 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>
TaskModelFramePlacementTpl< 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 SE3 & get_reference () const
 Return the reference placement.
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 SE3 &reference)
 Update the reference placement.
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::TaskModelFramePlacementTpl< _Scalar >

Frame placement task model.

The task quantity is a 6D pose error expressed in the selected reference frame. Let $M=(R,t)$ be the current frame placement, $M_{\mathrm{ref}}$ the absolute reference placement, and

\‍[  y_L = \log_6\!\left(M_{\mathrm{ref}}^{-1} M\right).
\‍]

The three conventions are

\‍[\begin{aligned}
  \mathrm{LOCAL}:\quad & y = y_L, \\
  \mathrm{WORLD}:\quad & y =
      \log_6\!\left(M M_{\mathrm{ref}}^{-1}\right), \\
  \mathrm{LOCAL\_WORLD\_ALIGNED}:\quad & y =
      \begin{bmatrix}R&0\\0&R\end{bmatrix} y_L.
\end{aligned}
\‍]

The reference placement is always an absolute pose in the world. The task rate and acceleration use the same reference-frame convention as the error:

\‍[  v = {}^{\mathrm{rf}}\!V_f,\qquad
  a = {}^{\mathrm{rf}}\!A_f.
\‍]

Here ${}^{\mathrm{rf}}\!V_f$ and ${}^{\mathrm{rf}}\!A_f$ are the frame spatial velocity and acceleration expressed in the selected reference frame.

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

Member Typedef Documentation

◆ MathBase

template<typename _Scalar>
typedef MathBaseTpl<Scalar> MathBase

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

◆ Base

template<typename _Scalar>
typedef TaskModelAbstractTpl<Scalar> Base

Definition at line 57 of file frame-placement.hpp.

◆ TaskDataAbstract

template<typename _Scalar>
typedef TaskDataAbstractTpl<Scalar> TaskDataAbstract

Definition at line 58 of file frame-placement.hpp.

◆ Data

template<typename _Scalar>
typedef TaskDataFramePlacementTpl<Scalar> Data

Definition at line 59 of file frame-placement.hpp.

◆ DataCollectorAbstract

template<typename _Scalar>
typedef DataCollectorAbstractTpl<Scalar> DataCollectorAbstract

Definition at line 60 of file frame-placement.hpp.

◆ StateMultibody

template<typename _Scalar>
typedef StateMultibodyTpl<Scalar> StateMultibody

Definition at line 61 of file frame-placement.hpp.

◆ Matrix3s

template<typename _Scalar>
typedef MathBase::Matrix3s Matrix3s

Definition at line 62 of file frame-placement.hpp.

◆ Matrix6s

template<typename _Scalar>
typedef MathBase::Matrix6s Matrix6s

Definition at line 63 of file frame-placement.hpp.

◆ VectorXs

template<typename _Scalar>
typedef MathBase::VectorXs VectorXs

Definition at line 64 of file frame-placement.hpp.

◆ Motion

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

Definition at line 65 of file frame-placement.hpp.

◆ SE3

template<typename _Scalar>
typedef pinocchio::SE3Tpl<Scalar> SE3

Definition at line 66 of file frame-placement.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 55 of file frame-placement.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: