Skip to content

Commit

Permalink
Fix humble build issue with PCL library
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime CLEMENT <[email protected]>
  • Loading branch information
maxime-clem committed Aug 25, 2022
1 parent 07f0b5b commit 09e9ec4
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 6 deletions.
12 changes: 9 additions & 3 deletions planning/apparent_safe_velocity_limiter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ project(apparent_safe_velocity_limiter)
find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(Boost REQUIRED)
find_package(PCL REQUIRED COMPONENTS common)
find_package(pcl_conversions REQUIRED)

ament_auto_add_library(apparent_safe_velocity_limiter_node SHARED
DIRECTORY src
)

ament_target_dependencies(apparent_safe_velocity_limiter_node PCL)
target_include_directories(apparent_safe_velocity_limiter_node
SYSTEM PUBLIC
"${PCL_INCLUDE_DIRS}"
)

# Disable warnings due to external dependencies
get_target_property(lanelet2_core_INCLUDE_DIR
lanelet2_core::lanelet2_core INTERFACE_INCLUDE_DIRECTORIES
Expand All @@ -23,8 +30,7 @@ rclcpp_components_register_node(apparent_safe_velocity_limiter_node
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()

ament_add_gtest(test_${PROJECT_NAME}
ament_add_ros_isolated_gtest(test_${PROJECT_NAME}
test/test_forward_projection.cpp
test/test_obstacles.cpp
test/test_collision_distance.cpp
Expand Down
4 changes: 3 additions & 1 deletion planning/apparent_safe_velocity_limiter/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
<depend>rclcpp</depend>
<depend>rclcpp_components</depend>
<depend>sensor_msgs</depend>
<depend>tf2_eigen</depend>
<depend>tf2_geometry_msgs</depend>
<depend>tier4_autoware_utils</depend>
<depend>tier4_planning_msgs</depend>
<depend>vehicle_info_util</depend>
<depend>visualization_msgs</depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_cmake_ros</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <boost/geometry.hpp>
#include <boost/geometry/algorithms/correct.hpp>

#include <pcl_conversions/pcl_conversions.h>

namespace apparent_safe_velocity_limiter
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
#include <boost/geometry/strategies/cartesian/buffer_point_circle.hpp>
#include <boost/geometry/strategies/cartesian/buffer_side_straight.hpp>

#ifdef ROS_DISTRO_GALACTIC
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif
#include <tf2/utils.h>

namespace apparent_safe_velocity_limiter
Expand Down
5 changes: 5 additions & 0 deletions planning/apparent_safe_velocity_limiter/src/obstacles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
#include <boost/assign.hpp>
#include <boost/geometry.hpp>

#ifdef ROS_DISTRO_GALACTIC
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif
#include <tf2/utils.h>

namespace apparent_safe_velocity_limiter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
#include <pcl/Vertices.h>
#include <pcl/filters/crop_hull.h>
#include <pcl_conversions/pcl_conversions.h>
#ifdef ROS_DISTRO_GALACTIC
#include <tf2_eigen/tf2_eigen.h>
#else
#include <tf2_eigen/tf2_eigen.hpp>
#endif

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
#include <tier4_autoware_utils/geometry/geometry.hpp>

#include <tf2/utils.h>
#ifdef ROS_DISTRO_GALACTIC
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

namespace apparent_safe_velocity_limiter
{
Expand Down

0 comments on commit 09e9ec4

Please sign in to comment.