Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Garbled depth data from libgazebo_ros_openni_kinect

I am trying to include a Kinect in my simulation with the libgazebo_ros_openni_kinect plugin, but the depth data that it outputs is corrupted. The RGB data looks just fine, but the depth image is just black with thin grey vertical lines (see the screenshot below).

I am running ROS Hydro and Gazebo 1.9.5 (I also tried 2.1.0 and 2.2.2) under Mac OS X 10.8.5. My Gazebo is the latest patched version from the Homebrew osrf/homebrew-simulation tap. I am using the latest hydro-devel branch of gazebo_ros_pkgs, though I have also tried the one from the ros-gbp repo.

Below is the excerpt from my .urdf.xacro file that loads the plugin:

   <gazebo reference="${camera_name}_link">  
      <sensor type="depth" name="camera">
        <always_on>true</always_on>
        <update_rate>20.0</update_rate>
        <camera>
          <horizontal_fov>${60.0*M_PI/180.0}</horizontal_fov>
          <image>
            <format>R8G8B8</format>
            <width>320</width>
            <height>240</height>
          </image>
          <clip>
            <near>0.05</near>
            <far>8.0</far>
          </clip>
        </camera>
        <plugin name="kinect_camera_controller" filename="libgazebo_ros_openni_kinect.so">
          <cameraName>${camera_name}</cameraName>
          <alwaysOn>true</alwaysOn>
          <updateRate>20</updateRate>
          <imageTopicName>rgb/image_raw</imageTopicName>
          <depthImageTopicName>depth_registered/image_raw</depthImageTopicName>
          <pointCloudTopicName>depth_registered/points</pointCloudTopicName>
          <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>
          <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
          <frameName>${camera_name}_depth_optical_frame</frameName>
          <baseline>0.1</baseline>
          <distortion_k1>0.0</distortion_k1>
          <distortion_k2>0.0</distortion_k2>
          <distortion_k3>0.0</distortion_k3>
          <distortion_t1>0.0</distortion_t1>
          <distortion_t2>0.0</distortion_t2>
          <pointCloudCutoff>0.4</pointCloudCutoff>
        </plugin>
      </sensor>
    </gazebo>

depth image screenshot

Garbled depth data from libgazebo_ros_openni_kinect

I am trying to include a Kinect in my simulation with the libgazebo_ros_openni_kinect plugin, but the depth data that it outputs is corrupted. The RGB data looks just fine, but the depth image is just black with thin grey vertical lines (see the screenshot below).

I am running ROS Hydro and Gazebo 1.9.5 (I also tried 2.1.0 and 2.2.2) under Mac OS X 10.8.5. My Gazebo is the latest patched version from the Homebrew osrf/homebrew-simulation tap. I am using the latest hydro-devel branch of gazebo_ros_pkgs, though I have also tried the one from the ros-gbp repo.

Below is the excerpt from my .urdf.xacro file that loads the plugin:

   <gazebo reference="${camera_name}_link">  
      <sensor type="depth" name="camera">
        <always_on>true</always_on>
        <update_rate>20.0</update_rate>
        <camera>
          <horizontal_fov>${60.0*M_PI/180.0}</horizontal_fov>
          <image>
            <format>R8G8B8</format>
            <width>320</width>
            <height>240</height>
          </image>
          <clip>
            <near>0.05</near>
            <far>8.0</far>
          </clip>
        </camera>
        <plugin name="kinect_camera_controller" filename="libgazebo_ros_openni_kinect.so">
          <cameraName>${camera_name}</cameraName>
          <alwaysOn>true</alwaysOn>
          <updateRate>20</updateRate>
          <imageTopicName>rgb/image_raw</imageTopicName>
          <depthImageTopicName>depth_registered/image_raw</depthImageTopicName>
          <pointCloudTopicName>depth_registered/points</pointCloudTopicName>
          <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>
          <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
          <frameName>${camera_name}_depth_optical_frame</frameName>
          <baseline>0.1</baseline>
          <distortion_k1>0.0</distortion_k1>
          <distortion_k2>0.0</distortion_k2>
          <distortion_k3>0.0</distortion_k3>
          <distortion_t1>0.0</distortion_t1>
          <distortion_t2>0.0</distortion_t2>
          <pointCloudCutoff>0.4</pointCloudCutoff>
        </plugin>
      </sensor>
    </gazebo>

depth image screenshot