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

Gmapping question

asked 2022-09-24 08:55:02 -0500

Kostas Tzias gravatar image

Could someone explain to me the required frames from

All i get from this ,is that a static_transform_publisher is need to TF the frames

(laser or base_scan or etc.) --> base_link and base_link --> odom

but i already have transformation (coming from arduino code )

which is { odom --> base_link } and i also got static_transform from my LIDAR's launch file which is base_link -->base_scan

Soo for a complete tf tree does it need to be a backwards trasnformation of the frames i already have , or maybe one tf between 2 frames is enough

edit retag flag offensive close merge delete


I think you have what is required. The parent is the odom, then the base_link and then base_scan. I do not understand your last sentence. If you are asking if one transform between two frames is enough (like the coordinate of base_scan with respect to base_link) or if you need two transforms, then I say one transform is enough.

zrahman gravatar image zrahman  ( 2022-09-24 12:29:08 -0500 )edit

Yeah that's what i thought but the tf tree between them is keep breaking while its already providing map . What i mean is that the map is provided and after a few seconds the tf tree is splitting to .. map-->odom and base_link-->base_scan

Kostas Tzias gravatar image Kostas Tzias  ( 2022-09-24 13:54:29 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2022-09-27 14:59:59 -0500

Mike Scheutzow gravatar image

updated 2022-09-27 15:03:55 -0500

With gmapping, "building a map" and "using a map" require different launch file configurations. When using a map, you need to either 1) provide a static transform map->odom (and you'll likely experience odom drift), or 2) you need to run some ros node like amcl that will publish map->odom and correct for odom drift.

Beware of one quirk of amcl: in my experience, you need to trigger it using a ros service i.e. it doesn't re-run itself once it finishes.

edit flag offensive delete link more


What happens when "building a map" ,does it have similar requirements .

Kostas Tzias gravatar image Kostas Tzias  ( 2022-09-28 10:58:00 -0500 )edit

Question Tools

1 follower


Asked: 2022-09-24 08:55:02 -0500

Seen: 93 times

Last updated: Sep 27 '22