Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 171

Converting 2D lidar data to pointcloud

$
0
0
I have a 2D laser scan data, that means I have rotating laser sensor that is giving me distance to the object for each degree (e.i. 60° 2,5m ) and I need to process these data in the OpenCV. On the forum I found out that I have to follow this path: **sensor_msgs::LaserScan** convert to **sensor_msgs::Image** and than to **OpenCV image.** When I transformed the sensor_msgs::LaserScan to the ros image format using the this command: projector.transformLaserScanToPointCloud("/robot1/base_link",*msg_laser,cloud,listener); I got structure containing the data vector which is full of weird values like **[0] 101 'e'** or **[1] 163 '£'** ... When I try to convert this ros image to OpenCV image I am getting error: [ERROR] [1461933013.832914106, 990.212000000]: Error in converting cloud to image message: No rgb field!! It makes sence because the sensor is giving me only intensity values witahout color. But what should I do with the wrong pointcloud2 format ? Thank you for every suggestion, Martin

Viewing all articles
Browse latest Browse all 171

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>