From 936f76084750d19c5966963651870718a7e18e40 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Sat, 2 Mar 2024 12:44:23 +0900 Subject: [PATCH] Drop PointCloud(1) support from ROS 2 plugin --- src/plugin/BodyROS2Item.cpp | 5 ----- src/plugin/CMakeLists.txt | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugin/BodyROS2Item.cpp b/src/plugin/BodyROS2Item.cpp index 258c4bc..c2e2cf5 100644 --- a/src/plugin/BodyROS2Item.cpp +++ b/src/plugin/BodyROS2Item.cpp @@ -13,12 +13,7 @@ #include #include -#ifdef CNOID_ROS_PLUGIN_USE_POINTCLOUD1 -#include -typedef sensor_msgs::msg::PointCloud PointCloudTypeForRangeSensor; -#else typedef sensor_msgs::msg::PointCloud2 PointCloudTypeForRangeSensor; -#endif #include "gettext.h" #include diff --git a/src/plugin/CMakeLists.txt b/src/plugin/CMakeLists.txt index 3a84222..32f569c 100644 --- a/src/plugin/CMakeLists.txt +++ b/src/plugin/CMakeLists.txt @@ -23,7 +23,9 @@ if(DEFINED ENV{ROS_VERSION}) ${catkin_LIBRARIES} Choreonoid::CnoidBodyPlugin ) - option(USE_POINTCLOUD1_IN_BODY_ROS_ITEM "Use the PointCloud type instead of PointCoud2 for publishing range sensor data" OFF) + + # PointCloud(1) is deprecated in ROS 2, but it is still used in ROS 1 + option(USE_POINTCLOUD1_IN_BODY_ROS_ITEM "Use the PointCloud type instead of PointCloud2 for publishing range sensor data with ROS 1" OFF) mark_as_advanced(USE_POINTCLOUD1_IN_BODY_ROS_ITEM) if(USE_POINTCLOUD1_IN_BODY_ROS_ITEM)