changing rgb values of /camera/depth_registered/points - not visible!

asked 2016-09-24 19:21:17 -0500

brigit gravatar image

I am working on a ROS node which subscribes to /camera/depth_registered/points and convert in to a pcl::PointCloud<pcl::pointxyzrgb>. From there, I explicitly set the rgb values of each point (using the rgb unpacking method) in the cloud, convert the pcl::PointCloud to a ROS sensor_message::PointCloud2 (using pcl::toROSMsg(..)) and then publish the point cloud with different colors. For testing, I initially set all pixels to be green.

My problem is that I don't see a green point cloud...I only see the original scene rgb values. rviz has a color transformer for PointCloud2 which I select 'rgb8' for (this shows original scene rgb values). I've tried the other options but I'll either get a grayscale version of the scene ('intensity') or a rainbow version ('axisColor') or plain white ('flatColor').

I really need to change these rgb values for visualization purposes; can anyone suggest what I might be doing wrong (or how to fix it)?

thanks! brigit

edit retag flag offensive close merge delete