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

How to verify odom --> base_link is accurate or not?

asked 2016-11-17 20:04:31 -0500

Damo gravatar image

updated 2016-11-18 00:39:58 -0500

gvdhoorn gravatar image

I'm using AMCL and when I specify a goal to navigation, the pose of my robot drift.While AMCL need odom --> base_link tf and laserscan data,so how can I verify odom --> base_link is accurate or not?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2016-11-18 02:23:05 -0500

Procópio gravatar image

updated 2018-10-22 05:41:55 -0500

Extracted from section 1.2 in the navigation tuning guide:

Often, I'll have a lot of trouble getting a robot to localize correctly. It will constantly get lost and I'll spend a lot of time mucking with the parameters for AMCL only to find that the real culprit is the robot's odometry. As such, I always run two sanity checks to make sure that I believe the odometry of a robot.

The first test checks how reasonable the odometry is for rotation. I open up rviz, set the frame to "odom," display the laser scan the robot provides, set the decay time on that topic high (something like 20 seconds), and perform an in-place rotation. Then, I look at how closely the scans match each other on subsequent rotations. Ideally, the scans will fall right on top of each other, but some rotational drift is expected, so I just make sure that the scans aren't off by more than a degree or two.

The next test is a sanity check on odometry for translation. I'll set up rviz the same way with the robot a few meters away from a wall. Then, I'll drive the robot straight at the wall and look at the thickness of the wall as reported by the aggregated laser scans in rviz. Ideally, the wall should look like a single scan but I just make sure that it doesn't have a thickness of more than a few centimeters. If you drive a meter towards a wall and get scans spread out over half a meter though, something is likely wrong with the odometry.

edit flag offensive delete link more


Should I transform laser to Odom or base_link? When I try to run rviz, scans do not coincide with each other . I am using transform as odom-> base_link -> laser

sarthak gravatar image sarthak  ( 2017-04-28 10:06:36 -0500 )edit

If scans do not coincide with each other, you likely have a bad odometry. It is not an issue with the transforms, probably. Your tf chain is just fine.

Procópio gravatar image Procópio  ( 2017-05-02 07:35:50 -0500 )edit

answered 2016-11-18 01:20:48 -0500

Shay gravatar image

You can close AMCL and publish the tf map -> odom staticly with static_transform_publisher. To test the accuracy of odom -> base_link, you should make map and odom coincide, that is you should run static_transform_publisher 0 0 0 0 0 0 map odom 50 to make the x/y/z and y/p/r offset zero.

And then you can set a goal to navigation and compare the robot's real location with the location feedback to RViz. Cuz at this time the location in RViz comes from odom -> base_link.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-11-17 20:04:31 -0500

Seen: 1,998 times

Last updated: Oct 22 '18