Principles of Robot Autonomy I

36
Principles of Robot Autonomy I Markov localiza,on and EKF-localiza,on

Transcript of Principles of Robot Autonomy I

Page 1: Principles of Robot Autonomy I

Principles of Robot Autonomy IMarkov localiza,on and EKF-localiza,on

Page 2: Principles of Robot Autonomy I

Today’s lecture

11/7/19

• Aim• Learn about Markov localiza,on, with an emphasis on EKF and non-

parametric localiza,on

• Readings• S. Thrun, W. Burgard, and D. Fox. Probabilis,c robo,cs. MIT press, 2005.

Sec,ons 7.2 – 7.6, 8.3

AA 274 | Lecture 17 2

Page 3: Principles of Robot Autonomy I

Mobile robot localization

• Problem: determine pose of a robot relative to a given map

m

• Localiza,on can be interpreted as the problem of establishing correspondence between the map coordinate system and the robot’s local coordinate frame• This process requires integra,on

of data over ,me

11/7/19 AA 274 | Lecture 17 3

Page 4: Principles of Robot Autonomy I

Local versus global localiza>on

• Position tracking assumes that the initial pose is known -> local problem well-addressed via Gaussian filters• In global localization, the initial pose is unknown -> global problem

best addressed via non-parametric, multi-hypothesis filters• In kidnapped robot localization, initial pose is unknown and during

operation robot can be “kidnapped” and “teleported” to some other location -> global problem best addressed via non-parametric, multi-hypothesis filters

11/7/19 AA 274 | Lecture 17 4

Page 5: Principles of Robot Autonomy I

Static versus dynamic environments

• Static environments are environments were the only variable quantity is the pose of the robot• Dynamic environments possess objects (e.g., people) other than the

robot whose locations change over time -> addressed via either state augmentation or outlier rejection

11/7/19 AA 274 | Lecture 17 5

Page 6: Principles of Robot Autonomy I

Passive versus active localization

• In passive localization, localization module only observes the robot; i.e., robot’s motion is not aimed at facilitating localization• In active localization, robot’s actions are aimed at minimizing the

localization error• Hybrid approaches are possible

11/7/19 AA 274 | Lecture 17 6

Page 7: Principles of Robot Autonomy I

Single-robot versus mul>-robot

• In single-robot localiza,on, a single, individual robot is involved in the localiza,on process• In mul,-robot localiza,on, a team of robots is engaged with

localiza,on, possibly coopera,vely (or even adversarially!)

In this class we will focus on local & global, sta,c (or quasi-sta,c), passive, single-robot localiza,on problems

11/7/19 AA 274 | Lecture 17 7

Page 8: Principles of Robot Autonomy I

Cas>ng the localiza>on problem within a Bayesian filtering framework• State 𝑥", control 𝑢" and measurements 𝑧" have the same meaning as

in the general filtering context• For a differential drive robot equipped with a laser range-finder

(returning a set of range 𝑟' and bearing 𝜙' measurements)

11/7/19 AA 274 | Lecture 17 8

Page 9: Principles of Robot Autonomy I

Casting the localization problem within a Bayesian filtering framework• A map m is a list of objects in the environment along with their

properties

• Maps can be• Location-based: index 𝑖 corresponds to a specific location (hence, they are

volumetric)• Feature-based: index 𝑖 is a feature index, and 𝑚' contains, next to the

properties of a feature, the Cartesian location of that feature

11/7/19 AA 274 | Lecture 17 9

Page 10: Principles of Robot Autonomy I

Location-based maps

11/7/19

Ver,cal cell decomposi,on Fixed cell decomposition (occupancy grid)

AA 274 | Lecture 17 10

Page 11: Principles of Robot Autonomy I

Feature-based maps

11/7/19

Topological mapLine-based map

node

edge

AA 274 | Lecture 17 11

Page 12: Principles of Robot Autonomy I

Cas>ng the localiza>on problem within a Bayesian filtering framework• Motion model is probabilistic

• Key fact:• Useful approximation (tight at high update rates)

11/7/19

Consistency of state 𝑥" with map 𝑚

Uses approxima,on

AA 274 | Lecture 17 12

Page 13: Principles of Robot Autonomy I

Casting the localization problem within a Bayesian filtering framework• Measurement model is probabilis,c

• Sensors usually generate more than one measurement when queried

• Typically, independence assump,on is made

11/7/19 AA 274 | Lecture 17 13

Page 14: Principles of Robot Autonomy I

Markov localiza>on

• Straightforward application of Bayes filter• Requires a map m as input• Addresses:• Global localization• Position tracking• Kidnapped robot problem

11/7/19 AA 274 | Lecture 17 14

Page 15: Principles of Robot Autonomy I

Markov localization: typical choices for initial belief• Initial belief, 𝑏𝑒𝑙(𝑥/) reflects initial knowledge of robot pose• For position tracking

• If initial pose is known,

• If partially known,

• For global localization • If initial pose is unknown,

11/7/19 AA 274 | Lecture 17 15

Page 16: Principles of Robot Autonomy I

Markov localization: example

11/7/19 AA 274 | Lecture 17 16

Page 17: Principles of Robot Autonomy I

Markov localization: example

11/7/19 AA 274 | Lecture 17 17

Page 18: Principles of Robot Autonomy I

Markov localization: example

11/7/19 AA 274 | Lecture 17 18

Page 19: Principles of Robot Autonomy I

Instantiation of Markov localization

• To make algorithm tractable, we need to add some structure to the representa,on of 𝑏𝑒𝑙(𝑥")

1. Gaussian representa,on 2. Par,cle filter representa,on

11/7/19 AA 274 | Lecture 17 19

Page 20: Principles of Robot Autonomy I

Extended Kalman filter (EKF) localization

• Key idea: represent belief 𝑏𝑒𝑙(𝑥") by its first and second moment, i.e., 𝜇" and Σ"• We will develop the EKF localiza,on algorithm under the assump,ons

that:1. A feature-based map is available, consis,ng of point landmarks

2. There is a sensor that can measure the range 𝑟 and the bearing 𝜙 of the landmarks rela,ve to the robot’s local coordinate frame

• Key concepts carry forward to other map / sensing models

11/7/19

Location of the landmark in the global coordinate frame

AA 274 | Lecture 17 20

Page 21: Principles of Robot Autonomy I

Range and bearing sensors

• Range & bearing sensors are common: features extracted from range scans and stereo vision come with range 𝑟 and bearing 𝜙 information • At time t, a set of features is measured (assumed independent)

• Assuming that the i-th measurement at time t corresponds to the j-thlandmark in the map, the measurement model is

11/7/19

Gaussian noise

AA 274 | Lecture 17 21

Page 22: Principles of Robot Autonomy I

The issue of data associa>on

• Data associa,on problem: uncertainty may exists regarding the iden,ty of a landmark• Formally, we define a correspondence variable between measurement 𝑧"' and landmark 𝑚3 in the map as (assume 𝑁 landmarks)

• I if i-th measurement at ,me t corresponds to j-th landmark

• if a measurement does not correspond to any landmark

• Two versions of the localiza,on problem1. Correspondence variables are known2. Correspondence variables are not known (usual case)

11/7/19 AA 274 | Lecture 17 22

Page 23: Principles of Robot Autonomy I

EKF localiza>on with known correspondences

• Algorithm is derived from EKF filter• Assume motion model (in our case, differential drive robot)

• Assume range and bearing measurement model

11/7/19 AA 274 | Lecture 17 23

zit = h(xt, j,m) + �t, �t ⇠ N (0, Qt), H

it :=

@h(µt, j,m)

@xt

Page 24: Principles of Robot Autonomy I

EKF localization with known correspondences• Main difference with EKF filter:

multiple measurements are processed at the same time• We exploit conditional

independence assumption

• Such assumption allows us to incrementally add the information, as if there was zero motion in between measurements

11/7/19

Innova,on covariance

AA 274 | Lecture 17 24

Page 25: Principles of Robot Autonomy I

Example of EKF-localiza>on: predic>on step

11/7/19

• Observations measure relative distance and bearing to a marker• For simplicity, we assume that

the robot detects only one marker at a time

AA 274 | Lecture 17 25

Page 26: Principles of Robot Autonomy I

Example of EKF-localiza>on: measurement predic>on step

11/7/19 AA 274 | Lecture 17 26

Page 27: Principles of Robot Autonomy I

Example of EKF-localiza>on: correc>on step

11/7/19 AA 274 | Lecture 17 27

Page 28: Principles of Robot Autonomy I

EKF localiza>on with unknown correspondences

• Key idea: determine the identity of a landmark during localization via maximum likelihood estimation, whereby one first determines the most likely value of 𝑐", and then takes this value for granted• Formally, the maximum likelihood estimator determines the

correspondence that maximizes the data likelihood

• Challenge: there are exponentially many terms in the maximization above!• Solution: perform maximization separately for each 𝑧"'

11/7/19 AA 274 | Lecture 17 28

Page 29: Principles of Robot Autonomy I

Estimating the correspondence variables

• Step #1: find

• Derivation (sketch)

11/7/19 AA 274 | Lecture 17 29

Page 30: Principles of Robot Autonomy I

Estimating the correspondence variables

• Performing the algebraic calcula,ons

• Step #2: es,mate correspondence as

11/7/19 AA 274 | Lecture 17 30

Page 31: Principles of Robot Autonomy I

EKF localization with unknown correspondences

11/7/19

Correspondence estimation

• Same as before, plus the inclusion of a maximum likelihood estimator for the correspondence variables

AA 274 | Lecture 17 31

Page 32: Principles of Robot Autonomy I

Comments

• Other popular features include lines, corners, distinct patterns• In the case of lines, an observation would be

11/7/19 AA 274 | Lecture 17 32

Page 33: Principles of Robot Autonomy I

Comments

• Alterna,ve approach to es,mate correspondences is to use a valida8on gate:

• A more general approach to deal with data associa,on is the mul,-hypothesis tracking filter, where a belief is represented by a mixture of Gaussians (each tracking a sequence of data associa,on decisions)• UKF localiza,on is another popular approach for feature-based

localiza,on11/7/19

Match landmark j with measurement i if

Mahalanobis distance

AA 274 | Lecture 17 33

Page 34: Principles of Robot Autonomy I

Monte Carlo localization (MCL)

• Key idea: represent belief 𝑏𝑒𝑙 𝑥" by a set of M particles

• Requires a map m as input• Addresses:• Global localization• Position tracking• Kidnapped robot problem (by injecting

random particles)• Can handle dynamic environments

via outlier rejection

11/7/19 AA 274 | Lecture 17 34

Page 35: Principles of Robot Autonomy I

MCL: example

11/7/19 AA 274 | Lecture 17 35

Page 36: Principles of Robot Autonomy I

Next time

11/7/19 AA 274 | Lecture 17 36