ros-visualization / rviz

ROS 3D Robot Visualizer
BSD 3-Clause "New" or "Revised" License
831 stars 463 forks source link

PointCloud XYZRGBL RGB8 colour transformer does not show cloud #1184

Open heuristicus opened 6 years ago

heuristicus commented 6 years ago

I have a pointcloud with XYZRGBL fields generated in PCL, whose display does not seem to work correctly in rviz. If I view the cloud in pcl_viewer I can see the following colour handlers:

List of available color handlers for actor out.pcd-0: [random](1) x(2) y(3) z(4) rgb(5) label(6)

The cloud (attached below) has specific RGB values for each label and is received as a PointCloud2 type. However, when displaying this cloud in rviz, if the RGB8 colour transformer is selected, nothing appears. This is also true for the MONO8 transformer.

Selecting any of the other colour transformers shows that there are indeed points coming through. With the intensity transformer, using the label channel correctly displays the cloud, with different label regions having different colours. However, the rgb values given by the label display are different to the rgb values given in the original instantiation of the labelled cloud, so if the user has set specific rgb values for each point with a certain label, they will not be displayed with this method.

This is in rviz 1.12.13 (also on 1.12.16), on Ubuntu 16.04. I'd like to help fix this but there are no error or warning messages which I can use to point me to where the problem might lie.

You can check this by starting a roscore, running rviz, adding a PointCloud2 display subscribed to cloud_pcd, and then running

rosrun pcl_ros pcd_to_pointcloud out.pcd 1

With the following pcd file:

out.pcd.zip

You will be able to see messages coming in, but because the default transformer is rgb8, you will not see anything.

jediofgever commented 4 years ago

having same issue after 2 years

rhaschke commented 4 years ago

@jediofgever, you are cordially invited to debug this issue and provide a fixing PR.