0
$\begingroup$

Rosanswers logo

I am working on a laser scan matching algorithm and I have got the pose of the robot during laser scans. How do I generate a map with this data? I do not want to use gmapping. I just want to use laser and pose data and create map_server topic to visualize in rviz.I figured out that occupancy grid has to be generated and it would be published as /map but there is no tutorial as to how to generate a occupancy grid.


Originally posted by balakumar-s on ROS Answers with karma: 137 on 2013-11-18

Post score: 1


Original comments

Comment by dornhege on 2013-11-18:
Do you want any algorithm in between or use the pose + scans you get to build the map?

Comment by balakumar-s on 2013-11-18:
I want to use pose+scans to build the map. simply put I have odometry and laser scan topics I want map_server from these two.

Comment by Nick Hoo on 2016-10-08:
Hello, I also want to know how to use /scan and /robot_pose_ekf to create /map. I want to know the principle. Thank you.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I´m not 100% sure it works out of the box (and I definitely have not time to test it), but by using hector_mapping and a launch file setup similar to this one, it should be possible to perform mapping with known poses. The example launch file was used to map a 1.7m-2.1m height slice of an environment. The most important parts are the "map_with_known_poses" and "use_tf_pose_start_estimate" parameters, which both have to be set to "true".


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2013-11-18

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by balakumar-s on 2013-11-18:
Thanks! but I have my own algorithm for scan matching and generating poses for each laser scan. I want to just use the poses and laser scans and map to simulate the effectiveness of my algorithm. Using the launch file would just use hector mapping to map or use only my algorithm to map?

Comment by Stefan Kohlbrecher on 2013-11-19:
It would completely use your algorithm to map and just use tf and laser data to produce an occupancy grid map.

Comment by balakumar-s on 2013-11-19:
It is using hector_mapping. I tested by having odom as static(made everything 0) and yet i get a proper map. I am attaching the launch file. http://txt.do/detq this is the link.

Comment by Stefan Kohlbrecher on 2013-11-20:
It´s using tf for mapping, so as long as there is a transform between map and the laser scan´s frame_id, it should map with known poses. It really should not perform any localization.

Comment by balakumar-s on 2013-11-22:
It is not working, there is some problem in my tf so I am building my own code for this as I am interested in SLAM and learning about occupancyGrid and Mapping will be helpful. Thank you.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.