Robots Autónomos

Anuncio
Robots Autónomos
Mapping and motion models
Domingo Gallardo
Depto. CCIA
http://www.rvg.ua.es/master/robots
Probabilistic Robotics
•
Slides taken from the book “Probabilistic Robotics” by
Thrun, Burgard y Fox
Depto DCCIA - Robots Autónomos
2
References
•
Probabilistic Robotics, cap. 5
Depto DCCIA - Robots Autónomos
3
The general problem of mapping
What does the
environment look like?
Depto DCCIA - Robots Autónomos
4
Localization and mapping
•
Localization: given a known map and a set of sensor
readings and robot actions, estimate the most likely
position of the robot in the map.
•
¿What if we don’t know the map? Mapping involves to
simultaneously estimate the pose of the vehicle and the
map.
•
The general problem is therefore denoted as the
simultaneous localization and mapping problem (SLAM)
Depto DCCIA - Robots Autónomos
5
The general problem of mapping
•
Formally, mapping involves, given the sensor data,
to calculate the most likely map
Depto DCCIA - Robots Autónomos
6
Types of SLAM problems
•
Grid maps or scans
•
Landmark based
Depto DCCIA - Robots Autónomos
7
Problems in mapping
•
•
Sensor interpretation
•
How do we extract relevant information from raw sensor
data?
•
How do we represent and integrate this information over
time?
Robot locations have to be estimated
•
How can we identify that we are at a previously visited
place?
•
This problem is the so-called data association problem.
Depto DCCIA - Robots Autónomos
8
Robot Motion
•
•
Robot motion is inherently uncertain.
How can we model this uncertainty?
Depto DCCIA - Robots Autónomos
9
Dynamic Bayesian Network for Controls,
State and Sensations
Depto DCCIA - Robots Autónomos 10
Probabilistic motion models
•
To implement the Bayes Filter, we need the transition
model p(x | x’, u).
•
The term p(x | x’, u) specifies a posterior probability, that
action u carries the robot from x’ to x.
•
In this section we will specify, how
p(x | x’, u) can be modeled based on the motion equations.
Depto DCCIA - Robots Autónomos 11
Coordinate Systems
•
In general the configuration of a robot can be described by
six parameters.
•
Three-dimensional cartesian coordinates plus three Euler
angles pitch, roll, and tilt.
•
Throughout this section, we consider robots operating on a
planar surface.
•
The state space of such systems is three-dimensional
(x,y,θ).
Depto DCCIA - Robots Autónomos 12
Typical Motion Models
•
•
In practice, one often finds two types of motion models:
•
•
Odometry-based
Velocity-based (dead reckoning)
Odometry-based models are used when systems are
equipped with wheel encoders.
•
Velocity-based models have to be applied when no wheel
encoders are given.
•
They calculate the new pose based on the velocities and
the time elapsed.
Depto DCCIA - Robots Autónomos 13
Example wheel encoders
These modules require
+5V and GND to
power them, and
provide a 0 to 5V
output. They provide
+5V output when they
"see" white, and a 0V
output when they "see"
black.
These disks are manufactured
out of high quality laminated
color plastic to offer a very crisp
black to white transition. This
enables a wheel encoder
sensor to easily see the
transitions.
Depto DCCIA - Robots Autónomos 14
Dead reckoning
•
•
Derived from “deduced reckoning.”
•
Achieved by calculating the current pose of the vehicle
based on its velocities and the time elapsed.
Mathematical procedure for determining the present
location of a vehicle.
Depto DCCIA - Robots Autónomos 15
Reasons for motion errors
ideal case
bump
different wheel
diameters
carpet
and many more …
Depto DCCIA - Robots Autónomos 16
Odometry models
•
•
Robot moves from
to
Odometry information
Depto DCCIA - Robots Autónomos 17
The atan2 function
•
Extends the inverse tangent and correctly copes with the
signs of x and y.
Depto DCCIA - Robots Autónomos 18
Noise model for odometry
•
The measured motion is given by the true motion corrupted
with noise.
Depto DCCIA - Robots Autónomos 19
Typical distributions for probabilistics
motion models
Normal distribution
Triangular distribution
Depto DCCIA - Robots Autónomos 20
Calculating the probability
•
•
For a normal distribution
1.
Algorithm prob_normal_distribution(a,b):
2.
return
For a triangular distribution
1.
Algorithm prob_triangular_distribution(a,b):
2.
return
Depto DCCIA - Robots Autónomos 21
Calculating the posterior
•
Given x, x’ and u
1.
Algorithm motion_model_odometry(x,x’,u)
2.
odometry values (u)
3.
4.
5.
6.
values of interest (x,x’)
7.
8.
9.
10.
11. return
p1 · p2 · p3
Depto DCCIA - Robots Autónomos 22
Application
•
Repeated application of the sensor model for short
movements.
•
Typical banana-shaped distributions obtained for 2dprojection of 3d posterior.
p(x|u,x’)
x’
u
x’
u
Depto DCCIA - Robots Autónomos 23
Sample-based density representation
Depto DCCIA - Robots Autónomos 24
How to sample from normal or triangular
distributions
•
•
Sampling from a normal distribution
1.
Algorithm sample_normal_distribution(b):
2.
return
Sampling from a triangular distribution
1.
Algorithm sample_triangular_distribution(b):
2.
return
Depto DCCIA - Robots Autónomos 25
Normally distributed samples
Depto DCCIA - Robots Autónomos 26
Triangular distributions
103 samples
104 samples
105 samples
106 samples
Depto DCCIA - Robots Autónomos 27
Rejection sampling
•
Sampling from arbitrary distributions
1.
Algorithm sample_distribution(f,b):
2.
repeat
3.
4.
5.
until (
6.
return
)
Depto DCCIA - Robots Autónomos 28
Example
•
Sampling from
Depto DCCIA - Robots Autónomos 29
Sample odometry motion model
1.
Algorithm sample_motion_model(u, x):
2.
3.
4.
5.
6.
sample_normal_distribution
7.
8.
Return
Depto DCCIA - Robots Autónomos 30
Sampling from our motion model
Start
Depto DCCIA - Robots Autónomos 31
Examples (odometry-based)
Depto DCCIA - Robots Autónomos 32
Velocity-based model
Depto DCCIA - Robots Autónomos 33
Equation for the velocity model
Center of circle:
with
Depto DCCIA - Robots Autónomos 34
Posterior probability for the velocity model
Depto DCCIA - Robots Autónomos 35
Sampling from the velocity model
Depto DCCIA - Robots Autónomos 36
Examples (velocity-based)
Depto DCCIA - Robots Autónomos 37
Map-consistent motion model
≠
Approximation:
Depto DCCIA - Robots Autónomos 38
Summary
•
We discussed motion models for odometry-based and
velocity-based systems
•
We discussed ways to calculate the posterior probability p
(x| x’, u).
•
•
We also described how to sample from p(x| x’, u).
•
In practice, the parameters of the models have to be
learned.
•
We also discussed an extended motion model that takes
the map into account.
Typically the calculations are done in fixed time intervals
Δt.
Depto DCCIA - Robots Autónomos 39
Descargar