Issue Visualizing Point Cloud in Gazebo and RViz with OAK-D Camera on BlueBoat Model

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:

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:

  1. 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