15 #ifndef BELUGA_ROS_TF2_EIGEN_HPP
16 #define BELUGA_ROS_TF2_EIGEN_HPP
18 #if BELUGA_ROS_VERSION == 2
19 #include <tf2_eigen/tf2_eigen.hpp>
20 #include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
21 #elif BELUGA_ROS_VERSION == 1
22 #include <tf2_eigen/tf2_eigen.h>
23 #include <tf2_geometry_msgs/tf2_geometry_msgs.h>
25 #error BELUGA_ROS_VERSION is not defined or invalid
28 #include <beluga_ros/messages.hpp>
45 template <
class Scalar>
46 inline beluga_ros::msg::Point
toMsg(
const Eigen::Matrix<Scalar, 2, 1>& in) {
47 beluga_ros::msg::Point out;
48 out.x =
static_cast<double>(in.x());
49 out.y =
static_cast<double>(in.y());
tf2 namespace extension for message conversion overload resolution.
Definition: tf2_eigen.hpp:38
beluga_ros::msg::Point toMsg(const Eigen::Matrix< Scalar, 2, 1 > &in)
Converts an Eigen Vector2 type to a Point message.
Definition: tf2_eigen.hpp:46