ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I have faced a similar issue. The problem isn't that you aren't getting an image; the problem is that the pcl::toROSMsg (cloud, image); is doing some weird conversions so that the image is no longer a 2D array of pixels, but one long 1D array of pixel values. If you do rostopic echo /image_topic you will see that the messages on that topic don't have any timestamps, and these long arrays are being generated. Also the width will be 10000, height will be 1.

I tried playing around with the cloud's height and width properties but this didn't seem to change the resultant image's height or width.

For my projection-to-image conversion, I sent out my projected cloud as the output message of this node, then wrote another node for doing image processing (using OpenCV). Hope that helps!