15 #ifndef GEOMETRY__QUATERNION__NORMALIZE_HPP_
16 #define GEOMETRY__QUATERNION__NORMALIZE_HPP_
27 template <typename T, std::enable_if_t<IsLikeQuaternion<T>::value, std::nullptr_t> =
nullptr>
30 if (
const auto n =
norm(q); std::fabs(n) <= std::numeric_limits<double>::epsilon()) {
32 "Norm of Quaternion(", q.w,
",", q.x,
",", q.y,
",", q.z,
") is ", n,
33 ". The norm of the quaternion you want to normalize should be greater than ",
34 std::numeric_limits<double>::epsilon());
36 return geometry_msgs::build<geometry_msgs::msg::Quaternion>()
#define THROW_SIMULATION_ERROR(...)
Definition: exception.hpp:60
auto norm(const T &q)
Definition: norm.hpp:26
auto normalize(const T &q)
Definition: normalize.hpp:28
Definition: bounding_box.hpp:32