Laser scan to point cloud

asked 2015-11-22 10:28:58 -0500

VascoAC gravatar image

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 tf_broadcaster and a tf_listener. I'm playing the bag (that has the scan), I'm running both the tf_broadcaster and tf_listener, and I've built the code from here http://answers.ros.org/question/11232... , 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!

edit retag flag offensive close merge delete

Comments

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

Loneflyer gravatar image Loneflyer  ( 2015-11-23 03:43:53 -0500 )edit

You can do a quick

rosrun tf view_frames
evince pdf

to get the frames being published by your laser node.

Loneflyer gravatar image Loneflyer  ( 2015-11-23 03:44:50 -0500 )edit

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

VascoAC gravatar image VascoAC  ( 2015-11-23 07:12:14 -0500 )edit

@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

VascoAC gravatar image VascoAC  ( 2015-11-27 08:19:14 -0500 )edit