Skip to content

Commit

Permalink
fix(gnss_poser): modify build error in rolling (autowarefoundation#801)
Browse files Browse the repository at this point in the history
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
wep21 authored Apr 25, 2022
1 parent b03d565 commit cb47f42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions sensing/gnss_poser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ target_link_libraries(gnss_poser_node
Geographic
)

# workaround to allow deprecated header to build on both galactic and rolling
if(${tf2_geometry_msgs_VERSION} VERSION_LESS 0.18.0)
target_compile_definitions(gnss_poser_node PRIVATE
USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
)
endif()

rclcpp_components_register_node(gnss_poser_node
PLUGIN "gnss_poser::GNSSPoser"
EXECUTABLE gnss_poser
Expand Down
6 changes: 6 additions & 0 deletions sensing/gnss_poser/include/gnss_poser/gnss_poser_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
#include <boost/circular_buffer.hpp>

#include <tf2/transform_datatypes.h>

#ifdef USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

#include <tf2_ros/transform_broadcaster.h>
#include <tf2_ros/transform_listener.h>

Expand Down
5 changes: 2 additions & 3 deletions sensing/gnss_poser/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
<depend>geo_pos_conv</depend>
<depend>geographiclib</depend>
<depend>geometry_msgs</depend>
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>sensor_msgs</depend>
<depend>tf2</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tf2_ros</depend>
<depend>tier4_debug_msgs</depend>
<depend>ublox_msgs</depend>

<exec_depend>rclcpp</exec_depend>
<exec_depend>rclcpp_components</exec_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

Expand Down

0 comments on commit cb47f42

Please sign in to comment.