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

ROS and PCL conversion issue using stereo camera

asked 2014-09-23 21:16:31 -0500

yoo00 gravatar image

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::PointCloud<pcl::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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-24 10:10:53 -0500

paulbovbel gravatar image

updated 2014-09-24 10:20:12 -0500

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

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

edit flag offensive delete link more

Comments

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.

yoo00 gravatar image yoo00  ( 2014-09-25 22:06:24 -0500 )edit

I encountered the same problem, thanks a lot for the workable solution!

ljk gravatar image ljk  ( 2015-09-09 22:43:27 -0500 )edit

how changed the values from the sensor?

Angel-J gravatar image Angel-J  ( 2018-03-17 07:00:17 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-09-23 21:16:31 -0500

Seen: 2,004 times

Last updated: Sep 24 '14