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>
29 typename T, std::enable_if_t<std::conjunction_v<IsLikeVector3<T>>, std::nullptr_t> =
nullptr>
30 auto operator+(
const T & v,
const Eigen::Vector3d & eigen_v) -> T
33 result.x = v.x + eigen_v.x();
34 result.y = v.y + eigen_v.y();
35 result.z = v.z + eigen_v.z();
40 typename T,
typename U,
41 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
45 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
61 typename T,
typename U,
62 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
66 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
82 typename T,
typename U,
83 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, std::is_scalar<U>>, std::nullptr_t> =
87 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
103 typename T,
typename U,
104 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, std::is_scalar<U>>, std::nullptr_t> =
108 if constexpr (std::is_same_v<T, geometry_msgs::msg::Vector3>) {
124 typename T,
typename U,
125 std::enable_if_t<std::conjunction_v<IsLikeVector3<T>, IsLikeVector3<U>>, std::nullptr_t> =
127 auto operator+=(T & a,
const U & b) -> decltype(
auto)
auto operator/(const T &a, const U &b)
Definition: operator.hpp:106
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:64
geometry_msgs::msg::Vector3 Vector3
Definition: lanelet_wrapper.hpp:68