The lls_processing
package provides a ROS2 node that subscribes to point cloud data, combines it into a unified coordinate frame, and optionally publishes, saves the combined point cloud.
The package uses Open3D for point cloud manipulation, and compiles pointclouds using TF2 transforms based on the subscribed pointcloud timestamps.
Mesh creation has not been implemented yet.
- Node:
MeshConstructor
Combines multiple point clouds into a single coordinate frame and applies transformations for mesh creation.
- Ensure that you have ROS2 installed.
- Install dependencies, particularly:
open3d
for point cloud manipulationnumpy
for data processingdata_gathering_msgs
keyboard_msgs
(optional)
pip install open3d==0.18.0 numpy==1.24.0
cd src
git clone [email protected]:Luka140/data_gathering_msgs.git
git clone [email protected]:cmower/ros2-keyboard.git
-
Clone this repository into your ROS2 workspace and build it:
colcon build --packages-select lls_processing source install/setup.bash
Parameter | Type | Default | Description |
---|---|---|---|
global_frame_id | string | base_link | Frame ID for the global coordinate frame to transform the combined cloud into. |
bbox_max | float | 0.0 | Maximum bounding box limit for the combined pointcloud. Points outside the box are removed 0.0 means no limit. |
local_bbox_max | float | 0.0 | Same as the previous but applies to individual pointclouds in their own reference frame |
save_pcl | bool | true | If true, saves the combined pointcloud to a .ply file |
publish_pcl | bool | true | if true, publishes the combined pointcloud on the combined_cloud topic |
listen_keyboard | bool | true | If true, listens for keyboard inputs to trigger point cloud processing operations. |
/scancontrol_pointcloud
(sensor_msgs/PointCloud2): Receives individual point clouds for processing./keydown
(keyboard_msgs/Key): Listens for keyboard events (optional)./combine_pointclouds
(std_msgs/Empty): Deprecated topic for triggering point cloud combination.
/combined_cloud
(sensor_msgs/PointCloud2): Publishes the combined point cloud after processing ifpublish_pcl
is True
/combine_pointclouds
(data_gathering_msgs/srv/RequestPCL): A service to request the combination and retrieval of processed point clouds.
To launch the node, use:
ros2 launch lls_processing.launch.py
To request a pointcloud:
ros2 service call /combine_pointclouds data_gathering_msgs/srv/RequestPCL
If listen_keyboard is enabled, the following keys can trigger specific actions:
- C: Trigger point cloud combination.
- M: Trigger mesh construction (not yet implemented).