Hi everyone,
I’m currently developing a simulation environment with a BlueBoat model equipped with an OAK-D stereo camera and am using the ArduPilot plugin for control.
However, I’m encountering an issue where the point cloud from the OAK-D camera isn’t visualized in either Gazebo or RViz.
Key Observations:
- The point cloud topic is visible and being published in Gazebo (
gz topic -l
confirms this), andros2 topic echo
shows data being output. - In RViz, the
PointCloud2
panel displays: “0 points from 0 messages” even though the topic is listed and data is echoed. - Gazebo also fails to display the point cloud visually.
SDF Configuration for the OAK-D Sensor:
<link name="oakd_camera_link">
<pose>0.3 0 0.05 0 0 0</pose>
<inertial>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.0001</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.0001</iyy>
<iyz>0</iyz>
<izz>0.0001</izz>
</inertia>
</inertial>
<visual name="oakd_camera_visual">
<geometry>
<mesh>
<uri>package://ros_gz_blueboat_description/models/blueboat/meshes/OAK-D.dae</uri>
</mesh>
</geometry>
<material>
<diffuse>0.5 0.5 0.5 1</diffuse>
<ambient>0.5 0.5 0.5 1</ambient>
</material>
</visual>
<sensor name="oakd_camera_sensor" type="depth_camera">
<pose relative_to='oakd_camera_link'>0 0 0 0 0 0</pose>
<camera>
<horizontal_fov>1.3962634</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
<format>R_FLOAT32</format>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
<depth_camera>
<output>depths</output>
</depth_camera>
</camera>
<always_on>true</always_on>
<update_rate>10</update_rate>
<visualize>true</visualize>
<enable_metrics>1</enable_metrics>
</sensor>
</link>
<joint name="oakd_camera_joint" type="fixed">
<parent>base_link</parent>
<child>oakd_camera_link</child>
</joint>
Questions:
- What could be causing the point cloud not to display in Gazebo and RViz even though data appears to be published?
Any insights or suggestions would be greatly appreciated!
Thanks in advance, Yan-Liang Chen