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)