State multibody representation. More...
#include <multibody.hpp>
Public Types | |
| typedef StateAbstractTpl< Scalar > | Base |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef pinocchio::ModelTpl< Scalar > | PinocchioModel |
| typedef MathBase::VectorXs | VectorXs |
| Public Types inherited from StateAbstractTpl< _Scalar > | |
| typedef MathBaseTpl< Scalar > | MathBase |
| typedef MathBase::MatrixXs | MatrixXs |
| typedef MathBase::VectorXs | VectorXs |
Public Member Functions | |
| StateMultibodyTpl (std::shared_ptr< PinocchioModel > model) | |
| Initialize the multibody state. | |
| template<typename NewScalar> | |
| StateMultibodyTpl< NewScalar > | cast () const |
| virtual void | diff (const Eigen::Ref< const VectorXs > &x0, const Eigen::Ref< const VectorXs > &x1, Eigen::Ref< VectorXs > dxout) const override |
| Compute the state manifold differentiation. | |
| const std::shared_ptr< PinocchioModel > & | get_pinocchio () const |
| Return the Pinocchio model (i.e., model of the rigid body system) | |
| virtual void | integrate (const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< VectorXs > xout) const override |
| Compute the state manifold integration. | |
| virtual void | Jdiff (const Eigen::Ref< const VectorXs > &, const Eigen::Ref< const VectorXs > &, Eigen::Ref< MatrixXs > Jfirst, Eigen::Ref< MatrixXs > Jsecond, const Jcomponent firstsecond=both) const override |
| Compute the Jacobian of the state manifold differentiation. | |
| virtual void | Jintegrate (const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< MatrixXs > Jfirst, Eigen::Ref< MatrixXs > Jsecond, const Jcomponent firstsecond=both, const AssignmentOp=setto) const override |
| Compute the Jacobian of the state manifold integration. | |
| virtual void | JintegrateTransport (const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< MatrixXs > Jin, const Jcomponent firstsecond) const override |
| Parallel transport from integrate(x, dx) to x. | |
| virtual void | print (std::ostream &os) const override |
| Print relevant information of the state multibody. | |
| virtual VectorXs | rand () const override |
| Generate a random state. | |
| virtual VectorXs | zero () const override |
| Generate a zero state. | |
| Public Member Functions inherited from StateAbstractTpl< _Scalar > | |
| StateAbstractTpl (const std::size_t nx, const std::size_t ndx) | |
| Initialize the state dimensions. | |
| VectorXs | diff_dx (const Eigen::Ref< const VectorXs > &x0, const Eigen::Ref< const VectorXs > &x1) |
| Compute the state manifold differentiation. | |
| bool | get_has_limits () const |
| Indicate if the state has defined limits. | |
| const VectorXs & | get_lb () const |
| Return the state lower bound. | |
| std::size_t | get_ndx () const |
| Return the dimension of the tangent space of the state manifold. | |
| std::size_t | get_nq () const |
| Return the dimension of the configuration tuple. | |
| std::size_t | get_nv () const |
| Return the dimension of tangent space of the configuration manifold. | |
| std::size_t | get_nx () const |
| Return the dimension of the state tuple. | |
| const VectorXs & | get_ub () const |
| Return the state upper bound. | |
| VectorXs | integrate_x (const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx) |
| Compute the state manifold integration. | |
| std::vector< MatrixXs > | Jdiff_Js (const Eigen::Ref< const VectorXs > &x0, const Eigen::Ref< const VectorXs > &x1, const Jcomponent firstsecond=both) |
| std::vector< MatrixXs > | Jintegrate_Js (const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, const Jcomponent firstsecond=both) |
| Compute the Jacobian of the state manifold integration. | |
| void | set_lb (const VectorXs &lb) |
| Modify the state lower bound. | |
| void | set_ub (const VectorXs &ub) |
| Modify the state upper bound. | |
Public Attributes | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
| Public Attributes inherited from StateAbstractTpl< _Scalar > | |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Protected Attributes | |
| bool | has_limits_ |
| Indicates whether any of the state limits is finite. | |
| VectorXs | lb_ |
| Lower state limits. | |
| std::size_t | ndx_ |
| State rate dimension. | |
| std::size_t | nq_ |
| Configuration dimension. | |
| std::size_t | nv_ |
| Velocity dimension. | |
| std::size_t | nx_ |
| State dimension. | |
| VectorXs | ub_ |
| Upper state limits. | |
| Protected Attributes inherited from StateAbstractTpl< _Scalar > | |
| bool | has_limits_ |
| Indicates whether any of the state limits is finite. | |
| VectorXs | lb_ |
| Lower state limits. | |
| std::size_t | ndx_ |
| State rate dimension. | |
| std::size_t | nq_ |
| Configuration dimension. | |
| std::size_t | nv_ |
| Velocity dimension. | |
| std::size_t | nx_ |
| State dimension. | |
| VectorXs | ub_ |
| Upper state limits. | |
Additional Inherited Members | |
| Protected Member Functions inherited from StateAbstractTpl< _Scalar > | |
| void | update_has_limits () |
State multibody representation.
A multibody state is described by the configuration point and its tangential velocity, or in other words, by the generalized position and velocity coordinates of a rigid-body system. For this state, we describe its operators: difference, integrates, transport and their derivatives for any Pinocchio model.
For more details about these operators, please read the documentation of the StateAbstractTpl class.
Definition at line 34 of file multibody.hpp.
| typedef MathBaseTpl<Scalar> MathBase |
Definition at line 40 of file multibody.hpp.
| typedef StateAbstractTpl<Scalar> Base |
Definition at line 41 of file multibody.hpp.
| typedef pinocchio::ModelTpl<Scalar> PinocchioModel |
Definition at line 42 of file multibody.hpp.
| typedef MathBase::VectorXs VectorXs |
Definition at line 43 of file multibody.hpp.
| typedef MathBase::MatrixXs MatrixXs |
Definition at line 44 of file multibody.hpp.
| explicit |
Initialize the multibody state.
| [in] | model | Pinocchio model |
| overridevirtual |
Generate a zero state.
Note that the zero configuration is computed using pinocchio::neutral.
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Generate a random state.
Note that the random configuration is computed using pinocchio::random which satisfies the manifold definition (e.g., the quaterion definition)
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Compute the state manifold differentiation.
The state differentiation is defined as:

where 



| [in] | x0 | Previous state point (size nx) |
| [in] | x1 | Current state point (size nx) |
| [out] | dxout | Difference between the current and previous state points (size ndx) |
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Compute the state manifold integration.
The state integration is defined as:

where 



| [in] | x | State point (size nx) |
| [in] | dx | Velocity vector (size ndx) |
| [out] | xout | Next state point (size nx) |
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Compute the Jacobian of the state manifold differentiation.
The state differentiation is defined as:

where 



The Jacobians lie in the tangent space of manifold, i.e. 



where 

| [in] | x0 | Previous state point (size nx) |
| [in] | x1 | Current state point (size nx) |
| [out] | Jfirst | Jacobian of the difference operation relative to the previous state point (size ndx ![]() |
| [out] | Jsecond | Jacobian of the difference operation relative to the current state point (size ndx ![]() |
| [in] | firstsecond | Argument (either x0 and / or x1) with respect to which the differentiation is performed. |
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Compute the Jacobian of the state manifold integration.
The state integration is defined as:

where 



The Jacobians lie in the tangent space of manifold, i.e. 



where 

| [in] | x | State point (size nx) |
| [in] | dx | Velocity vector (size ndx) |
| [out] | Jfirst | Jacobian of the integration operation relative to the state point (size ndx ![]() |
| [out] | Jsecond | Jacobian of the integration operation relative to the velocity vector (size ndx ![]() |
| [in] | firstsecond | Argument (either x and / or dx) with respect to which the differentiation is performed |
| [in] | op | Assignment operator which sets, adds, or removes the given Jacobian matrix |
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Parallel transport from integrate(x, dx) to x.
This function performs the parallel transportation of an input matrix whose columns are expressed in the tangent space at 

| [in] | x | State point (size nx). |
| [in] | dx | Velocity vector (size ndx) |
| [out] | Jin | Input matrix (number of rows = nv). |
| [in] | firstsecond | Argument (either x or dx) with respect to which the differentiation of Jintegrate is performed. |
Implements StateAbstractTpl< _Scalar >.
| overridevirtual |
Print relevant information of the state multibody.
| [out] | os | Output stream object |
Reimplemented from StateAbstractTpl< _Scalar >.
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar |
Definition at line 39 of file multibody.hpp.
| protected |
Indicates whether any of the state limits is finite.
Definition at line 340 of file state-base.hpp.
| protected |
Lower state limits.
Definition at line 338 of file state-base.hpp.
| protected |
State rate dimension.
Definition at line 335 of file state-base.hpp.
| protected |
Configuration dimension.
Definition at line 336 of file state-base.hpp.
| protected |
Velocity dimension.
Definition at line 337 of file state-base.hpp.
| protected |
State dimension.
Definition at line 334 of file state-base.hpp.
| protected |
Upper state limits.
Definition at line 339 of file state-base.hpp.