Skip to content

Commit

Permalink
Fix include paths for ROS2 headers (#37)
Browse files Browse the repository at this point in the history
* Fix include paths for ROS2 headers

* Add conditional include on deprecated header
  • Loading branch information
kgreenek authored Aug 16, 2023
1 parent 5eda2c6 commit 8079811
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <unordered_map>

/* ROS2 */
#include <nav_msgs/msg/odometry.h>
#include <nav_msgs/msg/odometry.hpp>
#include <rcl/rcl.h>
#include <sensor_msgs/msg/imu.h>
#include <sensor_msgs/msg/nav_sat_fix.h>
#include <sensor_msgs/msg/imu.hpp>
#include <sensor_msgs/msg/nav_sat_fix.hpp>
#include <tf2_ros/static_transform_broadcaster.h>
#include <tf2_ros/transform_broadcaster.h>
#include <tf2_ros/transform_listener.h>
Expand Down
5 changes: 5 additions & 0 deletions fixposition_driver_ros2/src/data_to_ros2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
*/

/* ROS */
#if __has_include(<tf2_eigen/tf2_eigen.hpp>)
#include <tf2_eigen/tf2_eigen.hpp>
#else
// This header was deprecated as of ROS2 Humble, but is still required in order to support Foxy.
#include <tf2_eigen/tf2_eigen.h>
#endif

/* PACKAGE */
#include <fixposition_driver_ros2/data_to_ros2.hpp>
Expand Down

0 comments on commit 8079811

Please sign in to comment.