Failed to find match for field 'intensity'.
Hello,
I have written a ROS node to read PointCloud from Velodyne. I am converting it to PCL using fromROSMsg(). When I compile, I do not get errors. I get Failed to find match for field 'intensity'. when the node runs and reads data. Kindly find the code snippet below.
void read_stream(const sensor_msgs::PointCloud2 &msg)
{
fromROSMsg(msg, pcl_pc);
func();
}
//pcl_pc is a global variable of type PointCloud<pointxyzi>
Any help in this regard will be very much appreciated. Thanks in advance.
if you only take
pointxyz
, it should solve your problem but it's still a hack. But I cannot think of any other thing that could cause this error except either your pointcloud is missing intensity info (shouldn't), or the message is wrongly formed(that's standard should work).I would like to generate an image out of it of type sensor_msgs/Image. Can that be accomplished by taking only pointxyz? I don't think so.
Why aren't you using this?
I have a pointcloud from Velodyne. As you might be aware, Velodyne Pointcloud will not have RGB. Thus, the mentioned package will not and did not work.
You don't need an image topic, you need it to be in image format [matrix x*y] instead of single row. Explained in this thread
The pointcloud is organized.
Quickly tried this, you do need rgb for this to work, my bad. In that case you can make intensity image probably, for rgb image you do need color values to assign to points.
Thank you very much.