AMCL: Localization in practice
(Tue Oct 22, lecture 14)
previous next
Look at the mechanics of SLAM and AMCL
Homework due for today
Legend: : Participation (pass/fail)  : PDF  : Team  : Attachment

Please do Running SLAM on Turtlebot3. Deliverable: create the deliverables as explained in the writeup.

Proposal: Submit your Term Project Proposal. See Final Project Proposals. Deliverable: The proposal as described; team partners can submit the same proposal.
Localization
 How does the Robot “know” where it is?
 How does it determine it’s “pose”?
 Relative to a coordinate system
 Could be GPS coordinates
 But more likely coordinate of a given map
Localizing the Robot on a map
 Key package is called
amcl
 Adaptive Monte Carlo Localization
 It’s a deep theoretical area covered in Probabilistic Robotics by Sebsastian Thrun, et al
How it works at a high level
 Location of robot is its pose
 Always known with respect to a map coordinate frame (also called sometimes the world coordinate frame)
amcl
maintains a set of candidate poses plus a probability that they reflect reality
 As robot moves, actual sensor readings are compared with expected sensor readings for each pose, and the probability of each candidate pose can be updated.
 Low probability poses are discarded, and high probability poses are updated based on odometry, scan, and probability.
 For path planning purposes the highest probability pose is used.
 It is definitely a guess not a certainty.
Simulating localization
 We will rebuild the map here to make sure things are consistent
 A new wrinkle here is the use of turtlebot3_simulation which will take the place of teleop
 That node drives the robot around ranomly while gmapping is building the map
 After some time has gone by, save the map.
NB Be careful with the filenames of the map. You will get strange errors if the file name given to turtlebot3_navigation is incorrect or not resolvable!
# create the simulated environment called stage_4
$ roslaunch turtlebot3_gazebo turtlebot3_stage_4.launch
# launch a simulated turtlebot3 that drives a random pattern
$ roslaunch turtlebot3_gazebo turtlebot3_simulation.launch
# launch the slam algoritm, which will create an inmemory map data structure
$ roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
# After the map looks done, save it into a map file for later.
$ cd ~
$ rosrun map_server map_saver f stage4
Discuss projects
 Look at deliverables
 Discuss status
AMCL in more detail
Monte Carlo
 That’s where the Casinos are!
 Algorithms that incorporate random guesses when a direct solution is hard or not feasible
 Diagram on the board how you would calculate Pi using a Monte Carlo Algorithm
 And here’s a Video of Monte Carlo Pi
 Note for
PI
it’s a very inefficient way to get an accurate result
 But it illustrates the idea of Monte Carlo estimation
Localization
 Markov localization
 Markov means that the new state is dependent only on the previous state (and not the history) and that the probability distributions are
 Markov localization = state estimation from sensor data
 Probabilistic algorithm
 See figure in powerpoints
 Belief, Sense, Update … etc.
 But how is the belief represented, and how is the update done efficiently
Particle Filter
 Instead of “solving” the equation for all data and all points
 Use a montecarlo technique
 Generate a random collection of candidate locations
 Compute the motion
 Adjust the probability of each particle
Next Class