Skip to content

Commit

Permalink
fix(autoware_auto_tf2): remove duplicated function in tf2_geometry_msg (
Browse files Browse the repository at this point in the history
#886)

chore: add workaround for tf2 update (autowarefoundation#5127)

Co-authored-by: Daisuke Nishimatsu <[email protected]>
# Conflicts:
#	planning/behavior_path_planner/CMakeLists.txt
  • Loading branch information
zhiwango authored and kazuki527 committed Oct 2, 2023
1 parent de3fd70 commit e856606
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 25 deletions.
6 changes: 6 additions & 0 deletions common/autoware_auto_geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
src/bounding_box.cpp
)

if(tf2_geometry_msgs_VERSION VERSION_LESS 0.25.4)
target_compile_definitions(${PROJECT_NAME} PRIVATE
DEFINE_LEGACY_FUNCTION
)
endif()

if(BUILD_TESTING)
set(GEOMETRY_GTEST geometry_gtest)
set(GEOMETRY_SRC test/src/test_geometry.cpp
Expand Down
5 changes: 5 additions & 0 deletions common/autoware_auto_tf2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ if(BUILD_TESTING)
"tf2_geometry_msgs"
"tf2_ros"
)
if(tf2_geometry_msgs_VERSION VERSION_LESS 0.25.4)
target_compile_definitions(test_tf2_autoware_auto_msgs PRIVATE
DEFINE_LEGACY_FUNCTION
)
endif()
endif()

ament_auto_package()
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using BoundingBox = autoware_auto_perception_msgs::msg::BoundingBox;

namespace tf2
{

#ifdef DEFINE_LEGACY_FUNCTION
/*************/
/** Point32 **/
/*************/
Expand Down Expand Up @@ -94,6 +94,7 @@ inline void doTransform(
t_out.points[i].z = static_cast<float>(v_out[2]);
}
}
#endif

/******************/
/** Quaternion32 **/
Expand Down
27 changes: 3 additions & 24 deletions planning/behavior_path_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,10 @@ set(common_src
src/marker_util/lane_change/debug.cpp
)

if(COMPILE_WITH_OLD_ARCHITECTURE)
ament_auto_add_library(behavior_path_planner_node SHARED
src/behavior_tree_manager.cpp
src/scene_module/scene_module_bt_node_interface.cpp
src/scene_module/lane_following/lane_following_module.cpp
${common_src}
if(tf2_geometry_msgs_VERSION VERSION_LESS 0.25.4)
target_compile_definitions(behavior_path_planner_node PRIVATE
DEFINE_LEGACY_FUNCTION
)

target_compile_definitions(behavior_path_planner_node PRIVATE USE_OLD_ARCHITECTURE)

message(WARNING "Build behavior_path_planner with OLD framework...")

else()
ament_auto_add_library(behavior_path_planner_node SHARED
src/planner_manager.cpp
src/scene_module/avoidance/manager.cpp
src/scene_module/dynamic_avoidance/manager.cpp
src/scene_module/start_planner/manager.cpp
src/scene_module/goal_planner/manager.cpp
src/scene_module/side_shift/manager.cpp
src/scene_module/lane_change/manager.cpp
${common_src}
)

message(WARNING "Build behavior_path_planner with NEW framework...")
endif()

target_include_directories(behavior_path_planner_node SYSTEM PUBLIC
Expand Down
6 changes: 6 additions & 0 deletions planning/surround_obstacle_checker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ ament_auto_add_library(${PROJECT_NAME} SHARED
src/node.cpp
)

if(tf2_geometry_msgs_VERSION VERSION_LESS 0.25.4)
target_compile_definitions(${PROJECT_NAME} PRIVATE
DEFINE_LEGACY_FUNCTION
)
endif()

target_link_libraries(${PROJECT_NAME}
${PCL_LIBRARIES}
)
Expand Down

0 comments on commit e856606

Please sign in to comment.