Skip to content

Commit

Permalink
fix(tier4_perception_rviz_plugin): modify build error in rolling (aut…
Browse files Browse the repository at this point in the history
…owarefoundation#791)

* fix(tier4_perception_rviz_plugin): modify build error in rolling

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* fix(tier4_perception_rviz_plugin): add target compile definitions

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: guiping meng <alan.meng@autocore.ai>
  • Loading branch information
wep21 authored and alanmengg committed Sep 24, 2022
1 parent 30a0f2b commit eac57fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/tier4_perception_rviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ ament_auto_add_library(tier4_perception_rviz_plugin SHARED
target_link_libraries(tier4_perception_rviz_plugin
${QT_LIBRARIES})

# 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(tier4_perception_rviz_plugin PRIVATE
USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
)
endif()

# Export the plugin to be imported by rviz2
pluginlib_export_plugin_description_file(rviz_common plugins/plugin_description.xml)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@

#include <boost/optional.hpp>

#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_listener.h>

#include <algorithm>
Expand Down

0 comments on commit eac57fb

Please sign in to comment.