Rosanswers logo


Is it possible to use gmapping without odometry information

In the Hector Slam tutorial it says if you do not require the use of a odom frame (for example because your platform does not provide any usable odometry) you can directly publish a transformation from map to base_link:

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

Is it possible to do the same with gmapping?

however I try the same in the gmapping launch file and nothing works. The map initial generates but when i move the kinect (which is the body of the rover) it doesn't update the position of the kinect...

I thought gmapping would use some kind of 2D ICP with the laser scan, i don't see why you need odometry information, though it should help.

It RIVZ there is no transform from odom to base_frame so i presume gmapping just created an odom frame and didn't use the base_frame as the odom frame

Originally posted by Sentinal_Bias on ROS Answers with karma: 418 on 2013-05-25

Post score: 2


1 Answer 1


Rosanswers logo

Unfortunately GMapping does not work without odom information. It uses the odom tf to determine if it has to incorporate new scans and as inital guess for the internal 2D scanmatching.

You could try to use the laser_scan_matcher to provide some kind of fixed world-transform (just enable ~publish_tf, call the ~fixed_frame /odom and disable all inputs). That may be enough to get GMapping working. But i would expect, that the results wont be rather poor, because of the small field of view of the kinect. Try to make sure, that you always have enough features visible. :)

Edit (to answer the question more precisely):

GMapping can work without the /odom topic itself, but it definitely needs a transform /world (or /odom) -> /base_link for inter-scan motion estimation. :)

Originally posted by Ben_S with karma: 2510 on 2013-05-25

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Arkapravo on 2013-05-25:
@Ben_S I am not fully sure, but I would guess that any SLAM/mapping approach has to rely on the odometry, correct me if I am wrong ! My argument is more based on the notion of executing a SLAM, odometry and laser scan have to work in tandem.

Comment by Ben_S on 2013-05-25:
Any SLAM has to rely on some sort of localization, sure. The difference is where it comes from. GMapping relies on the initial guess through external odometry, while hector for example uses high frequency internal scanmatching. (Thats why it works best with high frequency, high FoV laserscanners...)

Comment by Ben_S on 2013-05-25:
Well lets better call it motion estimation and not localization. But the space in the comment was too short. :)

Comment by Arkapravo on 2013-05-25:
@Ben_S Thanks !

Comment by mgrallos on 2022-03-20:
Hi can I use ground truth state topic in replacement for odometry? my tf frames would look like map -> ground truth and base_footprint -> base_link->laser


Your Answer

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