Failed to find match for field 'intensity'.

asked 2018-09-25 05:49:16 -0600

SS6141 gravatar image

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.

edit retag flag offensive close merge delete

Comments

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).

Choco93 gravatar image Choco93  ( 2018-09-25 07:15:22 -0600 )edit

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.

SS6141 gravatar image SS6141  ( 2018-09-26 00:29:16 -0600 )edit

Why aren't you using this?

Choco93 gravatar image Choco93  ( 2018-09-26 01:45:23 -0600 )edit

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.

SS6141 gravatar image SS6141  ( 2018-09-27 06:43:38 -0600 )edit

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

Choco93 gravatar image Choco93  ( 2018-09-27 08:13:47 -0600 )edit

The pointcloud is organized.

SS6141 gravatar image SS6141  ( 2018-09-28 00:08:40 -0600 )edit

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.

Choco93 gravatar image Choco93  ( 2018-09-28 01:07:43 -0600 )edit

Thank you very much.

SS6141 gravatar image SS6141  ( 2018-10-22 00:35:09 -0600 )edit