20201019-03 - ETHZ - Odometry Calibration

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Odometry

calibration
Big picture

Modeling Class

We derived a mathematical model for a differential drive robot

How do we find the parameters of the model?

Duckietown
2
Intuition
Odometry = ὁδός + μέτρον = measurement of the road/path

Odometry Calibration = Determination of model parameters to “match” predicted motion and


measurements

“Reality”

Dynamic
model

Constrained
Dynamic
model

Kinematic
model

Duckietown
3
Problem Definition (General formulation)
Given a model of the Duckiebot and a set of discrete measurement from which the
output can be estimated, find the most likely calibration parameters.

Calibration parameters

"̇ = $ %; ", (
Model of the system:
) = *(")
Measurements (not necessarily evenly spaced in time)

Set of discrete measurements: ℳ. = {01 = 0 21 , 23 < … < 21 < … < 2. }

Set of output estimates: 87. = {)91 = ℎ 01 , ; = 1, … , =}

Most likely calibration parameters: p∗ = arg max prob(measurements|p)


E

Duckietown
4
Different cases
Calibration parameters

"̇ = $ %; ", (
Model of the system:
) = *(")

• Constrained Kinematic model


Kinematic model
$ ⋅ : •
• Constrained Dynamic model
• More general Dynamic model

* ⋅ : • Robot pose
• Sensor pose
Measurements (not necessarily evenly spaced in time)

Set of discrete measurements: ℳ. = {01 = 0 21 , 23 < … < 21 < … < 2. }

• “Internal” sensors (“interoception”)


01 : Wheel Encoders, IMUs, Compass, …
• “External” sensors (“exteroception”)
Camera, Lidar, Infrared, …

Duckietown
5
Different cases (Typical solution)
Calibration parameters

"̇ = $ %; ", (
Model of the system:
) = *(")

• Constrained Kinematic model


Kinematic model
$ ⋅ : •
• Constrained Dynamic model
• More general Dynamic model

* ⋅ : • Robot pose
• Sensor pose
Measurements (not necessarily evenly spaced in time)

Set of discrete measurements: ℳ. = {01 = 0 21 , 23 < … < 21 < … < 2. }

• “Internal” sensors (interoception)


01 : Wheel Encoders, IMUs, Compass, …
• “External” sensors (exteroception)
Camera, Lidar, Infrared, …

Duckietown
6
Odometry calibration with encoders
Δ"
• Encoder measures a “tick” every Δ", there
are #$%$ ticks in 2'( Number of ticks
measured in Δ)
/0/1
• Travelled distance in Δ): *+/- = 2'(+/-
/232
Distance travelled by A
in time interval
http://www.robotc.net

H1 IH0 K1 IK0
FG = →* =
C C 2R P
• Kinematic model: E H1 AH0 K1 AK0 WX
M=̇ → ΔM =
CN CN vP

yT x T
θ
x t + Δt = x t + d cosθ W
A
• y t + Δt = y t + d sinθ vQ
?@ A?B
θ t + Δt = θ t + 2L
CD

2R Q
Y
V VX

Duckietown
7
Odometry calibration with encoders

• Calibration parameters: p = (R E , R G , L)
;:
• q from: 7 3
Coordinates of points known in world frame
Drive parallel to line on points 8 2 6 4
x t + Δt = x t + dcosθ
• q! (p) from y t + Δt = x t + dsinθ 1 5
3 53
θ t + Δt = θ t + 4 6 9:
78

• Least squares to determine parameters


But:
• Adding noise leads to drift
• Duckiebots don’t have encoders
2020 Now they do! DT19, DB-Beta

Duckietown
8
Manual odometry calibration for
Duckiebots (gain / trim model)
Voltage to left/right motors

"# = (& + ()(*+ − -.)


• Trim and Gain model: !
"/ = (& − ()(*+ + -.)
Gain Trim

• Step 1: Set gain to minimize slipping of wheels (g~1 − 1.5)


• Step 2: Drive Duckiebot forward on straight line for ~2 m
• While Δ > 10 cm: Change trim

Increase ; Decrease ;
Δ

Duckietown
10
Kinematic model with motors at steady
state
• Geometric hypothesis: • Kinematic hypothesis
1. Identical wheels (of diameter 2") 5. Rigid body • Motor dynamics
2. Equally spaced wheels (axle length = 2#) • Kinematic constraints 8. Steady State
3. Symmetric along longitudinal axis 6. No skidding
4. Center of mass on symmetry axis 7. No slipping

V% &% v% Kinematic Model


Left motor Left wheel
v) =
v( + v% v) , θ
2
V( &( v( v( − v%
Right motor Right wheel θ̇ =
2L

“Wheel” calibration parameters


c−1
• At steady state: v%/( = c%/( V%/( t=
• Through trim we c+1
R %/( Wheel radii measure ratio wheel c(
c%/( = calibration parameters c=
k 1,%/( c%
Motor constants

Duckietown
11
The math (for reference)
() 0 45
• ! " =$% " +' " + +, .̇ " → % = (! − 7)
(* 1 6
D
• .̇ " = Pure rolling
6 <A
;A = ? = CA ?A
4: 45 < =>,A A
• 9 " = +) % " = !− 7 →;= ? ⇒ <<
1 6 => ;< = ? = C< ?<
G =>,< <
• E.̈ = 7̇ = 9 − 9()H*
6
Ignore disturbance for now

From kinematics:
0
7J = (7L − M') !J = (7 − M') Let K = KR = 1
OP L 1
• I ⇒N =K+" =1+"
76 = (7L + M') !6 =
0
(7 + M') TJ
OQ L C−V
1 U=
!J = (K + ")(7L − M') =K−" =1−" C+V
• Trim and Gain model: I T6
!6 = (K − ")(7L + M') C<
C=
CA

Duckietown
12
Summary
• All models are wrong, some are useful

• Given a model, fit the parameters to the observations to calibrate

• In Duckietown, we can use measurements from the encoders, the camera or do


it “manually” (trim and gain)

https://docs.duckietown.org/da
! Try it yourself! ffy/opmanual_duckiebot/out/whe
el_calibration.html

Duckietown

You might also like