Skip to content

Commit

Permalink
Drop PointCloud(1) support from ROS 2 plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Mar 2, 2024
1 parent 01831ae commit 936f760
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/plugin/BodyROS2Item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
#include <sensor_msgs/msg/laser_scan.hpp>

#include <sensor_msgs/msg/point_cloud2.hpp>
#ifdef CNOID_ROS_PLUGIN_USE_POINTCLOUD1
#include <sensor_msgs/msg/point_cloud.hpp>
typedef sensor_msgs::msg::PointCloud PointCloudTypeForRangeSensor;
#else
typedef sensor_msgs::msg::PointCloud2 PointCloudTypeForRangeSensor;
#endif

#include "gettext.h"
#include <fmt/format.h>
Expand Down
4 changes: 3 additions & 1 deletion src/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 936f760

Please sign in to comment.