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

Laser Scan publisher

asked 2012-04-11 11:58:07 -0600

allenh1 gravatar image

I have written a laser scan filter based off of geometric correction. It is doing well, so I'd like to try mapping with it. After the scan is filtered, it is stored in a pcl::PointCloud<pcl::PointXYZ> PointCloud. I need to take this and convert it to a laser scan for gmapping. Any helpful hints as to how I go about this?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-04-11 21:40:45 -0600

Lorenz gravatar image

Have a look at point_cloud_to_laserscan.

All you need to do is publish your pcl::PointCloud use the point_cloud_to_laserscan node to get the corresponding laser scan. In the ros package turtlebot_bringup you'll find an example launch file that converts Kinect point clouds to laser scans.

edit flag offensive delete link more

Comments

Ok. The topic I'm publishing is "cloud". I'm working with a topic, titled "scan" that is already running. How do I discern the two for mapping?

allenh1 gravatar image allenh1  ( 2012-04-16 11:57:44 -0600 )edit

Have a look at topic remapping: http://www.ros.org/wiki/Remapping%20Arguments

Lorenz gravatar image Lorenz  ( 2012-04-16 22:36:46 -0600 )edit
0

answered 2012-04-11 12:25:14 -0600

Mac gravatar image

The LaserScan message type is fairly self-explanitory; you need to know the angular increment of your points, and the ranges, and that's about it.

edit flag offensive delete link more

Comments

The issue is the fact that I'm manipulating scan data. I'm sure I could just copy the stuff from the laser, but the time stamp will be different. Also, I know that there's a pointcloud_to_laserscan node. Can I use this during the run to convert the pointclouds? If so, how?

allenh1 gravatar image allenh1  ( 2012-04-11 12:32:55 -0600 )edit
1

I don't really understand what you mean with 'the time stamp will be different'. The laser scan should have the same time stamp as the original sensor measurements, so just copying the header should be fine.

Lorenz gravatar image Lorenz  ( 2012-04-11 21:41:54 -0600 )edit

Question Tools

Stats

Asked: 2012-04-11 11:58:07 -0600

Seen: 1,395 times

Last updated: Apr 11 '12