Does gazebo_ros_depth_camera with "points" output produce a color point cloud?
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">
<always_on>true</always_on>
<update_rate>${mast_cam_frame_rate}</update_rate>
<camera>
<horizontal_fov>${mast_cam_h_fov}</horizontal_fov>
<image>
<width>${mast_cam_img_width}</width>
<height>${mast_cam_img_height}</height>
<format>R8G8B8</format>
</image>
<clip>
<near>${mast_cam_near_clip}</near>
<far>${mast_cam_far_clip}</far>
</clip>
<depth_camera>
<output>points</output>
</depth_camera>
</camera>
<plugin name="bottom_mast_depth_camera"
filename="libgazebo_ros_depth_camera.so">
<cameraName>bottom_mast_camera</cameraName>
<frameName>bottom_mast_camera_frame</frameName>
<updateRate>${mast_cam_frame_rate}</updateRate>
<pointCloudCutoff>2.0</pointCloudCutoff>
</plugin>
</sensor>
</gazebo>
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.
Asked by Jim Rothrock on 2014-02-11 13:28:02 UTC
Answers
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:
https://bitbucket.org/osrf/gazebo/issues/1865/rendering-depthcamera-does-not-output
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
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.
Asked by pcdangio on 2016-03-01 00:48:50 UTC
Comments