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

Stabilize the map => odom tf for localization

asked 2019-08-09 03:26:42 -0600

Tima1995 gravatar image

Hey ROS forum,

I just tried to add the tf transform to my robot to consider the map => odom transformation for better localization. Here, I use odom from the encoders, and the map data from the slam and gmapping. I had a look in RVIZ and I could see, that the odom system is jumping very hard in the map coordinates. The odom system should drift with time for sure, but big jumps are too much to get a good localization. Also the SLAM itself dosen´t work properly, the measured points differ much from the already located obstacles: C:\fakepath\slam_problem.png

One problem might be, that my robot always spawns to the center again if it crashes into a wall etc.. But I don´t know how to correct that problem.

Do you have an idea how to solve that problem or did you have similar situations?

Thanks in advance!

edit retag flag offensive close merge delete


I've tried using encoder odometry, and has given me bad results always. You could try using world odometry, that has given me decent results.

rmv24 gravatar image rmv24  ( 2019-08-09 10:50:38 -0600 )edit

But don´t you get then perfect odometry data from the encoders? I try to make my localization to run as realistic as possible. That´s why I used the encoder odometry there. Thanks for your answer!

Tima1995 gravatar image Tima1995  ( 2019-08-14 03:31:25 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-08-09 10:59:47 -0600

I'm not sure I 100% follow your issue, but if I were to rephrase you can tell me if this is what you mean: you're running SLAM on a robot providing the map->odom transform and your robot is providing the odom->base_link transform via the encoders. When you're doing this in (what it appears to be simulation of a square, featureless room) your space, the robot is jumping around.

From looking at the photo provided, I have also seen this of gmapping when you put it in a regular, featureless environment like a square room with nothing in it. You need to add some features or make the environment not exactly the same to the simulation for gmapping to grab onto things correctly.

edit flag offensive delete link more


Sorry for the late comment and thanks for the answer! Yes you perfectly got what I mean. And I will try another world with some additional objects. When I did that I will tell you if it was helpful.

Tima1995 gravatar image Tima1995  ( 2019-08-14 03:29:40 -0600 )edit

Awesome, can you mark the answer as correct so we can remove it from the unanswered questions queue

stevemacenski gravatar image stevemacenski  ( 2019-08-14 13:34:48 -0600 )edit

Question Tools

1 follower


Asked: 2019-08-09 03:26:42 -0600

Seen: 548 times

Last updated: Aug 09 '19