15 #ifndef GEOMETRY__VECTOR3__OPERATOR_HPP_
16 #define GEOMETRY__VECTOR3__OPERATOR_HPP_
18 #include <Eigen/Dense>
20 #include <geometry_msgs/msg/point.hpp>
21 #include <geometry_msgs/msg/quaternion.hpp>
22 #include <geometry_msgs/msg/vector3.hpp>
30 typename T, std::enable_if_t<std::conjunction_v<IsLikeVector3<T>>, std::nullptr_t> =
nullptr>
31 auto operator+(
const T & v,
const Eigen::Vector3d & eigen_v) -> T
34 result.x = v.x + eigen_v.x();
35 result.y = v.y + eigen_v.y();
36 result.z = v.z + eigen_v.z();
41 typename T,
typename U,
42 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
46 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
62 typename T,
typename U,
63 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
67 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
83 typename T,
typename U,
84 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, std::is_scalar<U>>, std::nullptr_t> =
88 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
104 typename T,
typename U,
105 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, std::is_scalar<U>>, std::nullptr_t> =
109 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
125 typename T,
typename U,
126 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
128 auto operator+=(T & a,
const U & b) -> decltype(
auto)
137 typename T,
typename U,
138 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
142 constexpr decltype(a.x) e = std::numeric_limits<decltype(a.x)>::epsilon();
143 return (std::abs(a.x - b.x) < e) && (std::abs(a.y - b.y) < e) && (std::abs(a.z - b.z) < e);
auto operator==(const T &a, const U &b) -> bool
Definition: operator.hpp:140
auto operator/(const T &a, const U &b)
Definition: operator.hpp:107
auto operator*(const T &a, const U &b)
Definition: operator.hpp:57
auto operator+=(T &a, const U &b) -> decltype(auto)
Definition: operator.hpp:71
auto operator-(const T &a, const U &b)
Definition: operator.hpp:43
auto operator+(const T &a, const U &b)
Definition: operator.hpp:29
Definition: bounding_box.hpp:32
geometry_msgs::msg::Point Point
Definition: lanelet_wrapper.hpp:65
geometry_msgs::msg::Vector3 Vector3
Definition: lanelet_wrapper.hpp:69