Map and Laser error
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.
Asked by Os7 on 2022-06-18 09:27:34 UTC
Answers
You need to add a new ros node that corrects for the odometry drift. Some people use the ros amcl
package for this.
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.
Asked by Mike Scheutzow on 2022-06-19 09:38:57 UTC
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
Asked by Os7 on 2022-06-19 10:14:31 UTC
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.
Asked by Mike Scheutzow on 2022-06-19 11:30:12 UTC
Alright will test this and see how things go thanks for the help
Asked by Os7 on 2022-06-19 11:35:00 UTC
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.
Asked by Mike Scheutzow on 2022-06-19 11:39:58 UTC
Comments
Over time, the odometry pose from your wheel encoders will slowly accumulate error. How are you correcting for this?
Asked by Mike Scheutzow on 2022-06-19 07:29:15 UTC
I don't know, the problem happens when the robot is rotating when the navigation goal is a straight line it work well
Asked by Os7 on 2022-06-19 07:54:33 UTC