1#ifndef BIORBD_UTILS_ROTATION_H
2#define BIORBD_UTILS_ROTATION_H
4#include "biorbdConfig.h"
9#include "Utils/Matrix3d.h"
11namespace BIORBD_NAMESPACE {
38#ifdef BIORBD_USE_EIGEN3_MATH
43 template <
typename OtherDerived>
48#ifdef BIORBD_USE_CASADI_MATH
53 Rotation(
const RBDLCasadiMath::MX_Xd_static<3, 3>& other);
59 Rotation(
const RBDLCasadiMath::MX_Xd_SubMatrix& other);
139 const std::pair<rigidbody::NodeSegment, rigidbody::NodeSegment>&
141 const std::pair<rigidbody::NodeSegment, rigidbody::NodeSegment>&
143 const std::pair<String, String>& axesNames,
144 const String& axisToRecalculate);
159 const std::pair<rigidbody::NodeSegment, rigidbody::NodeSegment>&
161 const std::pair<rigidbody::NodeSegment, rigidbody::NodeSegment>&
163 const std::pair<String, String>& axesNames,
164 const String& axisToRecalculate);
178#ifndef BIORBD_USE_CASADI_MATH
188#ifdef BIORBD_USE_EIGEN3_MATH
193 template <
typename OtherDerived>
194 Rotation& operator=(
const Eigen::MatrixBase<OtherDerived>& other) {
195 Eigen::Matrix3d::operator=(other);
199#ifdef BIORBD_USE_CASADI_MATH
204 void operator=(
const RBDLCasadiMath::MX_Xd_static<3, 3>& other);
210 void operator=(
const RBDLCasadiMath::MX_Xd_SubMatrix& other);
232std::ostream& operator<<(
A point attached to a segment, generally speaking a skin marker.
Matrix3d()
Construct matrix.
static utils::Rotation mean(const std::vector< utils::Rotation > &mToMean)
Get the mean of the Rotation matrices.
static Rotation fromMarkersNonNormalized(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 defined by markers
static Rotation fromEulerAngles(const Vector &rot, const String &seq)
Create a Rotation from Euler angles.
void checkUnitary()
Check if the Rotation is a unitary matrix of rotation.
Vector3d axe(size_t idx) const
Get a particular axis of the Rotation matrix.
static Rotation fromSpatialTransform(const utils::SpatialTransform &st)
set the Rotation from a spatial transform
static Vector toEulerAngles(const Rotation &r, const String &seq)
Return extracted angles from the rotation matrix into Euler angles using the provided sequence.
static Rotation fromMarkers(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 defined by markers
Rotation(const Matrix3d &matrix=Matrix3d::Identity())
Construct Rotation matrix.
Wrapper around the std::string class with augmented functionality.
Wrapper around Eigen Vector3d and attach it to a parent.
Wrapper of the Eigen VectorXd.