Gazebo | Ignition | Community
Ask Your Question

Does gazebo_ros_depth_camera with "points" output produce a color point cloud?

asked 2014-02-11 12:28:02 -0500

I am using gazebo_ros_depth_camera to generate a point cloud with Gazebo 1.9.2, ROS Hydro, and Ubuntu 12.04 LTS. Here is the relevant section of my URDF file:

<gazebo reference="bottom_mast_camera">
  <sensor name="bottom_mast_camera" type="depth">


    <plugin name="bottom_mast_depth_camera"

Notice that I am using "points" in the <output> element, not "depths". Is such a point cloud supposed to be a color point cloud? I found the Gazebo source code that creates the point cloud, and it is producing a color point cloud. However, when I subscribe to the cloud on a ROS topic, the green and blue values are always zero. Red is usually 128 or 160. <output>depths</output> results in a correct color point cloud.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-29 23:48:50 -0500

pcdangio gravatar image

I have a strong suspicion that this is a bug based on a similar experience I had. Here is the issue I opened to bring up the problem:

The reason that it works for "depths" and not for "points" is because a Gazebo developer came across the bug when writing the gazebo_ros_depth_camera plugin. Because of this bug, he had to write a computationally expensive workaround that indirectly calculates the RGB point cloud from the depth image. If you set the <output> to "points" in the SDF, the gazebo_ros_depth_camera plugin instead uses an incomplete part of the developer's code, which still has the RGB color bug present.

Also FYI, the two hexadecimal values I list in the bug report correspond to the 128 and 160 values you found for the red channel.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2014-02-11 12:28:02 -0500

Seen: 1,919 times

Last updated: Feb 29 '16