Rosanswers logo

I'm tring to use gmapping to build a map.

Before that,I try to record /scan and /tf.

If I want to just take the laser range finder on hand to build a map.

How do I set /tf topic correctly?

Thank you~

Originally posted by sam on ROS Answers with karma: 2570 on 2012-02-01

Post score: 0


1 Answer 1


Rosanswers logo

As mentioned in my answer here, there are two approaches available for scenarios where you do not have viable odometry data (which is the case for handheld mapping).

In case you want to try hector_mapping and you don't have a IMU, you can try these parameters:

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="laser_frame" />
<param name="odom_frame" value="laser_frame" />

with laser_frame being the frame your scan data has in it's header. Provided you hold the scanner steady (no roll and pitch motion, please ;) ) and the environment is largely rectangular, the system should work.

/edit: To make it more clear: The problem with the scenario you describe is not so much the tf setup itself (see the tf tutorial for that), but the fact that you cannot provide odometry, which gmapping requires.

Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-02-01

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

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