0
$\begingroup$

Rosanswers logo

Hello all,

Currently I am trying to use one of existing ROS packages with stereo camera. This package subscribes to <sensor_msgs::PointCloud2> data type of 3D point cloud and converts it into pcl::PointCloudpcl::PointXYZRGB data type using pcl::fromROSMsg function at the beginning of the source code. Stereo camera I am using publishes <sensor_msgs::PointCloud2> data type of point cloud and I tried to use it. But when I ran the package, this following message keeps popping up and results in not calling callback function properly. This point is where I am blocked.

Failed to find match for field 'rgb'.

I am pretty sure that rostopic publishing from stereo camera has rgb image unlike what message says. I was able to check that using rviz as well. I haven't used stereo camera before so I guess may be it could be the stereo camera's innate problem. Previously I had no problems using pcl::fromROSMsg function with kinect sensor.

I am using ubuntu 14.04 and ROS indigo, and I would say that solving this issue is the only way that I can use this package at this moment because if I change this beginning part for other sensor input data type, then I need to change the rest of the whole source code. By solving converting issue, it could work simply.

Is there any one who went through similar problem that I am facing either with or without stereo camera? Or for those who have any ideas on this, please let me know. Any advise would be really appreciable.

Thank you all in advance.


Originally posted by yoo00 on ROS Answers with karma: 25 on 2014-09-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Can you examine the raw sensor_msgs/PointCloud2 and check whatfields are being stored in the pointcloud (http://docs.ros.org/api/sensor_msgs/html/msg/PointCloud2.html and the child array of http://docs.ros.org/api/sensor_msgs/html/msg/PointField.html )?

That will narrow down the problem to your publisher or your subscriber.


Originally posted by paulbovbel with karma: 4518 on 2014-09-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by yoo00 on 2014-09-25:
Thank you for your reply, Paulbovbel! I was able to solve the problem. The thing is that pcl::fromROSMsg function expects 32FLOAT data type of point cloud, but the sensor I am using publishes UINT32 data type of rgb point cloud values. After I changed the values from the sensor, it fixed. Thanks.

Comment by ljk on 2015-09-09:
I encountered the same problem, thanks a lot for the workable solution!

Comment by Angel-J on 2018-03-17:
how changed the values from the sensor?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.