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

Map and Laser error

asked 2022-06-18 09:27:34 -0600

Os7 gravatar image

Hello all I am facing an issue when trying to navigate, the laser and the saved map data don't match causing some problems when giving a goal location and even when i give a pose there is still a big miss match between them .. how could solve this issue and what might by the cause for it ?
I am using RPlidar that is mounted on top of the robot with a differential drive robot that is getting odom data from two incremental encoders. Here is the map and laser And here is the Rqt graph

edit retag flag offensive close merge delete

Comments

Over time, the odometry pose from your wheel encoders will slowly accumulate error. How are you correcting for this?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-06-19 07:29:15 -0600 )edit

I don't know, the problem happens when the robot is rotating when the navigation goal is a straight line it work well

Os7 gravatar image Os7  ( 2022-06-19 07:54:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-06-19 09:38:57 -0600

Mike Scheutzow gravatar image

updated 2022-06-19 09:42:48 -0600

You need to add a new ros node that corrects for the odometry drift. Some people use the ros amcl package for this.

http://wiki.ros.org/amcl

amcl is a Global Localizer. It takes the laser scan and the map as input, and aligns multiple lidar scans to the map to determine the robot's current map pose. Then it publishes a new map->odom transform, which has the effect of correcting any drift in the odom->base_link transform. If I remember correctly, the standard ros amcl node does this calculation only once, so you'll need code to re-trigger the calculation after it finishes.

The reason you need both amcl and wheel-encoder-odom for robot pose is that amcl is slow - it can take more than 1 second for it to decide where the robot is currently.

edit flag offensive delete link more

Comments

I have amcl node running, but from what i have understood from what you said i need to keep re-triggering it like every X seconds? Any idea how i can do this or an example you can refer me to Thanks alot

Os7 gravatar image Os7  ( 2022-06-19 10:14:31 -0600 )edit

The amcl node provides a ros service to do this. Here's how it's used from the command line:

rosservice call /global_localization "{}"

I wouldn't try to do this too often; keep at least a few seconds between calls.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-06-19 11:30:12 -0600 )edit

Alright will test this and see how things go thanks for the help

Os7 gravatar image Os7  ( 2022-06-19 11:35:00 -0600 )edit
1

Instead of amcl, the laser_scan_matcher can also be used to correct odom drift. It's much faster. Just be aware this is a Tracker, not a Global Localizer.

http://wiki.ros.org/laser_scan_matcher

It's harder to use because it doesn't publish map->odom for you.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-06-19 11:39:58 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-06-18 09:27:34 -0600

Seen: 575 times

Last updated: Jun 19 '22