22#ifndef EOS_FITTING_ROTATION_ANGLES_HPP
23#define EOS_FITTING_ROTATION_ANGLES_HPP
25#include "eos/core/math.hpp"
41inline Eigen::Matrix<T, 3, 1>
tait_bryan_angles(Eigen::Matrix<T, 3, 3> rotation_matrix, Eigen::Index axis_0,
42 Eigen::Index axis_1, Eigen::Index axis_2)
44 Eigen::Matrix<T, 3, 1> euler_angles = rotation_matrix.eulerAngles(axis_0, axis_1, axis_2);
49 if (std::abs(euler_angles(1)) > T(core::pi<T> / 2.0))
51 euler_angles.array() -= T(core::pi<T>) * euler_angles.array().sign();
52 euler_angles(1) = -euler_angles(1);
Eigen::Matrix< T, 3, 1 > tait_bryan_angles(Eigen::Matrix< T, 3, 3 > rotation_matrix, Eigen::Index axis_0, Eigen::Index axis_1, Eigen::Index axis_2)
Computes Tait-Bryan angles (in radians) from the given rotation matrix and axes order.
Definition: rotation_angles.hpp:41
Namespace containing all of eos's 3D model fitting functionality.