pinocchio  2.4.4
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
pinocchio::rpy Namespace Reference

Roll-pitch-yaw operations. More...

Functions

template<typename Matrix3Like >
Eigen::Matrix< typename Matrix3Like::Scalar, 3, 1, Matrix3Like ::Options > matrixToRpy (const Eigen::MatrixBase< Matrix3Like > &R)
 Convert from Transformation Matrix to Roll, Pitch, Yaw. More...
 
template<typename Scalar >
Eigen::Matrix< Scalar, 3, 3 > rpyToMatrix (const Scalar r, const Scalar p, const Scalar y)
 Convert from Roll, Pitch, Yaw to rotation Matrix. More...
 
template<typename Vector3Like >
Eigen::Matrix< typename Vector3Like::Scalar, 3, 3, Vector3Like ::Options > rpyToMatrix (const Eigen::MatrixBase< Vector3Like > &rpy)
 Convert from Roll, Pitch, Yaw to rotation Matrix. More...
 

Detailed Description

Roll-pitch-yaw operations.

Function Documentation

◆ matrixToRpy()

Eigen::Matrix<typename Matrix3Like::Scalar,3,1, Matrix3Like ::Options> pinocchio::rpy::matrixToRpy ( const Eigen::MatrixBase< Matrix3Like > &  R)

Convert from Transformation Matrix to Roll, Pitch, Yaw.

Given a rotation matrix \(R\), the angles \(r, p, y\) are given so that \( R = R_z(y)R_y(p)R_x(r) \), where \(R_{\alpha}(\theta)\) denotes the rotation of \(\theta\) degrees around axis \(\alpha\). The angles are guaranteed to be in the ranges \(r\in[-\pi,\pi]\) \(p\in[-\frac{\pi}{2},\frac{\pi}{2}]\) \(y\in[-\pi,\pi]\), unlike Eigen's eulerAngles() function

Warning
the method assumes \(R\) is a rotation matrix. If it is not, the result is undefined.

Definition at line 67 of file rpy.hpp.

◆ rpyToMatrix() [1/2]

Eigen::Matrix<Scalar,3,3> pinocchio::rpy::rpyToMatrix ( const Scalar  r,
const Scalar  p,
const Scalar  y 
)

Convert from Roll, Pitch, Yaw to rotation Matrix.

Given \(r, p, y\), the rotation is given as \( R = R_z(y)R_y(p)R_x(r) \), where \(R_{\alpha}(\theta)\) denotes the rotation of \(\theta\) degrees around axis \(\alpha\).

Definition at line 25 of file rpy.hpp.

◆ rpyToMatrix() [2/2]

Eigen::Matrix<typename Vector3Like::Scalar,3,3, Vector3Like ::Options> pinocchio::rpy::rpyToMatrix ( const Eigen::MatrixBase< Vector3Like > &  rpy)

Convert from Roll, Pitch, Yaw to rotation Matrix.

Given a vector \((r, p, y)\), the rotation is given as \( R = R_z(y)R_y(p)R_x(r) \), where \(R_{\alpha}(\theta)\) denotes the rotation of \(\theta\) degrees around axis \(\alpha\).

Definition at line 46 of file rpy.hpp.