How to add RGB value to PointCloud2
Dear forum, I am trying to visualize the position of blue and yellow points in Rviz. Therefore I am publishing a PointCloud2 wth the following fields:
- x
- y
- z
- classification
- confidence
The classification determines if the object is yellow or blue ans is a float property of either 0 or 1.0
Now my question:
What is the most optimal way to color the points in Rviz2 accordingly? Should I add RGB values to the PointCloud2 and if so how can this be done? Or is there a simple setting in Rviz2 for that?
Thank you very much in advance.