tf2_eigen.hpp
Go to the documentation of this file.
1 // Copyright 2024 Ekumen, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef BELUGA_ROS_TF2_EIGEN_HPP
16 #define BELUGA_ROS_TF2_EIGEN_HPP
17 
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>
24 #else
25 #error BELUGA_ROS_VERSION is not defined or invalid
26 #endif
27 
28 #include <beluga_ros/messages.hpp>
29 
30 #include <Eigen/Core>
31 
37 namespace tf2 {
39 
41 
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());
50  return out;
51 }
52 
53 } // namespace tf2
54 
55 #endif // BELUGA_ROS_TF2_EIGEN_HPP
tf2_eigen.h
tf2
tf2 namespace extension for message conversion overload resolution.
tf2_geometry_msgs.h
tf2::toMsg
B toMsg(const A &a)
messages.hpp


beluga_ros
Author(s):
autogenerated on Tue Jul 16 2024 03:00:02