Robotics StackExchange | Archived questions

Laser scan to point cloud

Hi everyone, I'm fairly new to ROS and I've successfully recorded a rosbag with just a laser scan. I'm able to view it in RVIZ and now I'm trying to transform the scan into a point cloud. I've also a tfbroadcaster and a tflistener. I'm playing the bag (that has the scan), I'm running both the tfbroadcaster and tflistener, and I've built the code from here http://answers.ros.org/question/11232/how-to-turn-laser-scan-to-point-cloud-map/ , but I'm not able to obtain the point cloud. When I run the bag, the node that transform the laser scans into point cloud aborts. And I get this message:

terminate called after throwing an instance of 'tf2::LookupException' what(): "laser" passed to lookupTransform argument source_frame does not exist. Aborted (core dumped)

Thanks in advance!

Asked by VascoAC on 2015-11-22 11:24:19 UTC

Comments

Are you sure the frame ID on which the laser publishes the laser scan is called "laser"?

Asked by Loneflyer on 2015-11-23 04:43:53 UTC

You can do a quick

rosrun tf view_frames
evince pdf

to get the frames being published by your laser node.

Asked by Loneflyer on 2015-11-23 04:44:50 UTC

@Loneflyer I get 2 frame id's : from base_laser to base_link

Asked by VascoAC on 2015-11-23 08:12:14 UTC

@Loneflyer I've already corrected that mistake. Now when I play my bag file I get the error: terminate called after throwing an instance of 'tf2::ExtrapolationException' what(): Lookup would require extrapolation into the future. Requested time 1448633914.965443600 but the latest data is at time

Asked by VascoAC on 2015-11-27 09:19:14 UTC

Answers