|
Biorbd Release_1.13.0
|
Homogenous matrix to describe translations and rotations simultaneously. More...
#include <RotoTrans.h>
Public Member Functions | |
| RotoTrans (const RigidBodyDynamics::Math::Matrix4d &matrix=RigidBodyDynamics::Math::Matrix4d::Identity()) | |
| Construct RotoTrans matrix. | |
| RotoTrans (const Scalar &v00, const Scalar &v01, const Scalar &v02, const Scalar &v03, const Scalar &v10, const Scalar &v11, const Scalar &v12, const Scalar &v13, const Scalar &v20, const Scalar &v21, const Scalar &v22, const Scalar &v23, const Scalar &v30, const Scalar &v31, const Scalar &v32, const Scalar &v33) | |
| RotoTrans Construct a RotoTrans matrix by elements. | |
| RotoTrans (const Rotation &rot) | |
| Contruct Rototrans. | |
| RotoTrans (const Rotation &rot, const Vector3d &trans) | |
| Contruct Rototrans. | |
| RotoTrans (const Vector &rotation, const Vector3d &translation, const String &rotationSequence) | |
| Contruct Rototrans. | |
| RotoTrans (const utils::SpatialTransform &st) | |
| Contruct Rototrans. | |
| Vector3d | axe (size_t idx) const |
| Get a particular axis of the rotation matrix. | |
| RotoTrans | transpose () const |
| Return the tranposed matrix. | |
| Vector3d | trans () const |
| Return the translation vector. | |
| Rotation | rot () const |
| Return the rotation matrix. | |
| void | checkUnitary () |
| Check if the RotoTrans has a unitary matrix of rotation and the last row is (0, 0, 0, 1). | |
Static Public Member Functions | |
| static RotoTrans | fromMarkers (const rigidbody::NodeSegment &origin, const std::pair< rigidbody::NodeSegment, rigidbody::NodeSegment > &axis1markers, const std::pair< rigidbody::NodeSegment, rigidbody::NodeSegment > &axis2markers, const std::pair< String, String > &axesNames, const String &axisToRecalculate) |
| fromMarkers Creates a system of axes from two axes and an origin defined by markers | |
| static RotoTrans | combineRotAndTrans (const Rotation &rot, const Vector3d &trans) |
| Set the RotoTrans from a rotation and a translation. | |
| static RotoTrans | fromSpatialTransform (const utils::SpatialTransform &st) |
| set the RotoTrans from a spatial transform | |
| static RotoTrans | fromEulerAngles (const Vector &rot, const Vector3d &trans, const String &seq) |
| Create a RotoTrans from Euler angles. | |
| static Vector | toEulerAngles (const RotoTrans &rt, const String &seq) |
| Return extracted angles from the rotation matrix into Euler angles using the provided sequence. | |
| static utils::RotoTrans | mean (const std::vector< utils::RotoTrans > &rt) |
| Get the mean of the 4x4 matrices. | |
Protected Member Functions | |
| RigidBodyDynamics::Math::Vector4d | expand3dTo4d (const Vector3d &v1) |
| Expand 3D vector to 4D (padding with an extra 1). | |
Homogenous matrix to describe translations and rotations simultaneously.
Definition at line 31 of file RotoTrans.h.
| utils::RotoTrans::RotoTrans | ( | const RigidBodyDynamics::Math::Matrix4d & | matrix = RigidBodyDynamics::Math::Matrix4d::Identity() | ) |
Construct RotoTrans matrix.
| matrix | 4D identity matrix |
Definition at line 14 of file RotoTrans.cpp.
| utils::RotoTrans::RotoTrans | ( | const Scalar & | v00, |
| const Scalar & | v01, | ||
| const Scalar & | v02, | ||
| const Scalar & | v03, | ||
| const Scalar & | v10, | ||
| const Scalar & | v11, | ||
| const Scalar & | v12, | ||
| const Scalar & | v13, | ||
| const Scalar & | v20, | ||
| const Scalar & | v21, | ||
| const Scalar & | v22, | ||
| const Scalar & | v23, | ||
| const Scalar & | v30, | ||
| const Scalar & | v31, | ||
| const Scalar & | v32, | ||
| const Scalar & | v33 ) |
RotoTrans Construct a RotoTrans matrix by elements.
| v00 | Row 0, Col 0 |
| v01 | Row 0, Col 1 |
| v02 | Row 0, Col 2 |
| v03 | Row 0, Col 3 |
| v10 | Row 1, Col 0 |
| v11 | Row 1, Col 1 |
| v12 | Row 1, Col 2 |
| v13 | Row 1, Col 3 |
| v20 | Row 2, Col 0 |
| v21 | Row 2, Col 1 |
| v22 | Row 2, Col 2 |
| v23 | Row 2, Col 3 |
| v30 | Row 3, Col 0 |
| v31 | Row 3, Col 1 |
| v32 | Row 3, Col 2 |
| v33 | Row 3, Col 3 |
Definition at line 19 of file RotoTrans.cpp.
| utils::RotoTrans::RotoTrans | ( | const Rotation & | rot | ) |
Contruct Rototrans.
| rot | The rotation matrix |
| trans | Translation vector |
Definition at line 60 of file RotoTrans.cpp.
| utils::RotoTrans::RotoTrans | ( | const Vector & | rotation, |
| const Vector3d & | translation, | ||
| const String & | rotationSequence ) |
Contruct Rototrans.
| rotation | The Euler angles vector |
| translation | The translation vector |
| rotationSequence | The rotation sequence |
The number of rotation must match the number of axes in the rotation sequence
Definition at line 65 of file RotoTrans.cpp.
| utils::RotoTrans::RotoTrans | ( | const utils::SpatialTransform & | st | ) |
Contruct Rototrans.
| st | Spatial Transform vector |
Definition at line 72 of file RotoTrans.cpp.
| utils::Vector3d utils::RotoTrans::axe | ( | size_t | idx | ) | const |
Get a particular axis of the rotation matrix.
| idx | The index of axis (x = 0, y = 1 and z = 2) |
Definition at line 90 of file RotoTrans.cpp.
| void utils::RotoTrans::checkUnitary | ( | ) |
Check if the RotoTrans has a unitary matrix of rotation and the last row is (0, 0, 0, 1).
That function throws a runtime_error if the check fails
Definition at line 174 of file RotoTrans.cpp.
|
static |
Set the RotoTrans from a rotation and a translation.
| rot | The matrix of rotation |
| trans | The vector of translation |
Definition at line 112 of file RotoTrans.cpp.
|
protected |
Expand 3D vector to 4D (padding with an extra 1).
| v1 | Vector to expand |
Definition at line 166 of file RotoTrans.cpp.
|
static |
Create a RotoTrans from Euler angles.
| rot | The Euler angles vector |
| trans | The translation vector |
| seq | The rotation sequence |
The number of rotation umust match the number of axes in the rotation sequence
Definition at line 128 of file RotoTrans.cpp.
|
static |
fromMarkers Creates a system of axes from two axes and an origin defined by markers
| origin | The position of the origin |
| axis1markers | The beginning and ending of the vector of the first axis |
| axis2markers | The beginning and ending of the vector of the second axis |
| axesNames | The names ("x", "y" or "z") of the axes |
| axisToRecalculate | The axis to recalculate to ensure orthonormal system of axes |
Definition at line 75 of file RotoTrans.cpp.
|
static |
set the RotoTrans from a spatial transform
| st | The spatial transform |
Definition at line 123 of file RotoTrans.cpp.
|
static |
Get the mean of the 4x4 matrices.
| rt | The RotoTrans matrices to mean |
Definition at line 147 of file RotoTrans.cpp.
| utils::Rotation utils::RotoTrans::rot | ( | ) | const |
Return the rotation matrix.
Definition at line 108 of file RotoTrans.cpp.
|
static |
Return extracted angles from the rotation matrix into Euler angles using the provided sequence.
| rt | The RotoTrans matrix to extract angles from |
| seq | The angle sequence |
The rotation sequence can be any combination of x, y and z
Definition at line 140 of file RotoTrans.cpp.
| utils::Vector3d utils::RotoTrans::trans | ( | ) | const |
Return the translation vector.
Definition at line 104 of file RotoTrans.cpp.
| utils::RotoTrans utils::RotoTrans::transpose | ( | ) | const |
Return the tranposed matrix.
Definition at line 95 of file RotoTrans.cpp.