Ask Your Question
0

Can I transform LaserScan messages?

asked 2013-11-22 01:38:28 -0500

kamek gravatar image

Is there a way to transform LaserScan messages from one frame to another? I'd like to keep the message type (i.e., I don't want a PointCloud message, I want to keep LaserScan). I have a tf tree setup and I simply want my to work with my LaserScan message in a different frame.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-11-22 02:18:34 -0500

That´s not easily possible because of the way a scan is represented in the sensors_msgs/LaserScan message. The distance measurements are given in a vector and the position of scan endpoints can be computed using the other fields in the message (angle_min etc.). This representation obviously is only valid when using the actual frame_id of the LIDAR.

The easiest way to transform it to another frame is converting it to a pointcloud using the tools provided in laser_pipeline.

edit flag offensive delete link more

Comments

That's what I figured, that you'd have to first convert to a pointcloud. Is there a simple way to convert back to a LaserScan message after the transformation? I thought maybe someone had written a LaserScan->PointCloud->Transform->LaserScan tool.

kamek gravatar image kamek  ( 2013-11-22 02:57:52 -0500 )edit

Look at the contents of the message, the representation only is viable when the frame used is the one where the LIDAR´s spinning mirror is. (Nearly) every attempt to put a transformed scan into a LaserScan message will be an approximation and erroneous (apart from some corner cases).

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2013-11-22 03:14:45 -0500 )edit

Thanks. I suppose it would work using a different LaserScan message that had ranges and bearings rather than ranges, start angle, and angle increments.

kamek gravatar image kamek  ( 2013-11-22 09:02:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-11-22 01:38:28 -0500

Seen: 1,609 times

Last updated: Nov 22 '13