4.6. Enabling and Visualizing Point Cloud in ROS 2
This section demonstrates how to enable point cloud data output from the camera node and visualize it using RViz2.
4.6.1. Enabling Depth Point Cloud
4.6.1.1. Command to Enable Depth Point Cloud
To activate the point cloud data stream for depth information, use the following command:
ros2 launch orbbec_camera gemini_330_series.launch.py enable_point_cloud:=true
4.6.1.2. Visualizing Depth Point Cloud in RViz2
After running the above command, perform the following steps to visualize the depth point cloud:
Open RViz2.
Add a
PointCloud2display.Select the
/camera/depth/pointstopic for visualization.Set the fixed frame to
camera_linkto properly align the data.
Example Visualization
Here is what the depth point cloud might look like in RViz2:

4.6.2. Enabling Colored Point Cloud
4.6.2.1. Command to Enable Colored Point Cloud
To enable the colored point cloud feature, enter the following command:
ros2 launch orbbec_camera gemini_330_series.launch.py enable_colored_point_cloud:=true
4.6.2.2. Visualizing Colored Point Cloud in RViz2
To visualize the colored point cloud data:
Launch RViz2 following the command execution.
Add a
PointCloud2display panel.Choose the
/camera/depth_registered/pointstopic from the list.Ensure the fixed frame is set to
camera_link.
Example Visualization
The result of the colored point cloud in RViz2 should look similar to this:
