0
$\begingroup$

Rosanswers logo

Hi folks,

how are things like AMCL, gmapping and odometry combined?

We're building a robot that will be capable of localizing itself within its environment by using a fixed triangulation system (called beacons). This system tells the robot its X and Y coordinates within the map. So the robot knows its current position pretty well.

Orientation however is measured by a gyroscope. Its angular velocity value is integrated over time to extrapolate the robots orientation. It most likely will be drifting.

Besides the gyroscope/accelerometer the robot will also have access to rotary encoders which measure the distance that its wheels will drive.

And the third thing the robot will likely get is a laser scanner. However there might be other moving obstacles in the range of the laser.

Now, how could we combine pretty well known absolute localisation with laser scan, drifting orientation and odometry by means of AMCL and gmapping?

Thanks a lot!

Cheers, Hendrik


Originally posted by Hendrik Wiese on ROS Answers with karma: 1145 on 2013-10-24

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This page gives a nice overview and mostly answers the questions you asked: http://wiki.ros.org/navigation/Tutorials/RobotSetup

It is one of the navigation tutorials. They are an excellent resource, well worth going through, and are linked to from that page.

Basically, you start by publishing the output of the encoders and the gyro as an odometry message and also publish it as a transform that connects your robot (e.g., "base_link" or "base_footprint") to the odom reference frame. amcl and gmapping incorporate the laser scan. amcl will provide the map reference frame transform and localize the robot while gmapping will build a map from the laser data.


Originally posted by dan with karma: 875 on 2013-10-26

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Hendrik Wiese on 2013-10-26:
Ah, that's why my robot keeps jumping around in rviz when I enable amcl. I have a static link between map and odom. I'll have a look at the tutorial nevertheless. Thank you very much!

Comment by dan on 2013-10-26:
Yes, a static link between map and odom is not good and would produce the sort of behavior you describe as the frame published by amcl would fight with that. To clarify my answer amcl and gmapping do not run at the same time, run one or the other to either localize or make a map.

Comment by dan on 2013-10-26:
If this answers your question well enough, please mark it as answered by clicking on the check mark. That saves others from checking to see if it needs attention. Thanks.

Comment by Hendrik Wiese on 2013-10-26:
Certainly, I'll do as soon as I know that it does.

Comment by lovelife on 2018-12-27:
@dan, if you want to map and localize at the same time? is possible with gmapping and amcl or there are other algorithms for that?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.