This ROS2 package provides a node that reads a PCD (Point Cloud Data) file and publishes its contents as a PointCloud2 message on a ROS2 topic.
- ROS2 (tested on Humble, but should work on other distributions)
- PCL (Point Cloud Library) 1.12 or later
- C++14 or later
-
Create a new directory in your ROS2 workspace's
src
folder:mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src git clone https://github.com/omerssid/pcd_publisher.git
-
Build the package:
cd ~/ros2_ws colcon build --packages-select pcd_publisher
-
Source the setup file:
source ~/ros2_ws/install/setup.bash
Run the node:
ros2 run pcd_publisher pcd_publisher /path/to/pcd
The node will publish the point cloud data on the /pointcloud
topic.
This project is licensed under the MIT License - see the LICENSE file for details.