# How to set tf topic when take LRF on hand to build a map?

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~

edit retag close merge delete

Sort by » oldest newest most voted

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.

more