diff --git a/CMakeLists.txt b/CMakeLists.txt index 4895f08..1278555 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ endif() find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rclcpp_components REQUIRED) -find_package(PCL 1.7 REQUIRED) +find_package(PCL 1.10 REQUIRED) find_package(sensor_msgs REQUIRED) find_package(std_msgs REQUIRED) find_package(nav_msgs REQUIRED) @@ -33,6 +33,8 @@ find_package(octomap_msgs REQUIRED) find_package(tf2 REQUIRED) find_package(tf2_ros REQUIRED) find_package(tf2_msgs REQUIRED) +find_package(tf2_geometry_msgs REQUIRED) +find_package(rclcpp_components REQUIRED) link_directories(${PCL_LIBRARY_DIRS}) include_directories(${PCL_INCLUDE_DIRS}) @@ -60,6 +62,8 @@ ament_target_dependencies(octomap_server2 tf2_ros tf2_msgs tf2 + tf2_geometry_msgs + rclcpp_components ) target_link_libraries(octomap_server2 ${PCL_LIBRARIES} ${OCTOMAP_LIBRARIES}) diff --git a/deps.repos b/deps.repos index 9edaf7b..2b8bb91 100644 --- a/deps.repos +++ b/deps.repos @@ -6,7 +6,7 @@ repositories: ./../perception_pcl: type: git url: https://github.com/ros-perception/perception_pcl.git - version: foxy-devel + version: ros2 ./../pcl_msgs: type: git url: https://github.com/ros-perception/pcl_msgs.git diff --git a/src/octomap_server.cpp b/src/octomap_server.cpp index 60b202f..764f9dd 100644 --- a/src/octomap_server.cpp +++ b/src/octomap_server.cpp @@ -1016,7 +1016,7 @@ namespace octomap_server { second_pass.setInputCloud(pc.makeShared()); second_pass.filter(ground); - second_pass.setFilterLimitsNegative (true); + second_pass.setNegative(true); second_pass.filter(nonground); } }