Skip to the lesson
FixTheRobot Explore Robotics / Probability for Robotics / M5 Probabilistic Motion and Observation Models / M5-T2

Probability for Robotics · Theory · M5

M5-T2 — Odometry and Velocity Motion Models

A robot never goes exactly where its odometry says. The motion model gives the distribution of where it went, and its shape is a curved band, not a circle.

  • Lesson 2 of 4
  • Intermediate
  • Module 5: Probabilistic Motion and Observation Models
  • Theory
  • About 18 minutes to read

The motion model is the first of the two distributions every filter needs: given the old pose and a control, where might the robot be now? This lesson builds the two standard answers, the odometry model (used when the wheel encoders tell you how far the robot turned and travelled) and the velocity model (used when you only know the commanded speeds). It shows how to sample them, how to propagate their covariance with Jacobians, and why a small heading error turns into a large sideways error with distance.

Learning objectives

After this lesson, you should be able to:

  • Write the odometry motion model (rotate, translate, rotate) with its four noise parameters, and sample from it.
  • Write the velocity motion model as a circular arc, including its straight-line limit.
  • Derive the Jacobians of the odometry model and propagate a pose covariance through a step.
  • Explain why the sideways error grows like d^1.5, and when the first-order covariance underestimates the along-track error.

The intuition

A differential-drive robot knows how far each wheel has turned. Between two moments, its pose changes from (x,y,θ)(x, y, \theta) to (x′,y′,θ′)(x', y', \theta'). Any such change can be described as three simple movements: turn to face the new position (δrot1\delta_{\text{rot1}}), drive straight to it (δtrans\delta_{\text{trans}}), and turn to the new heading (δrot2\delta_{\text{rot2}}). Those three numbers are the odometry reading, and the odometry motion model takes them as the control.

Each of the three has an error, and the errors have simple physical origins.

  • A turn is wrong by a small angle, because the wheels slip and the wheel base is not known exactly. The bigger the turn, and the farther the robot has travelled, the larger the angle error.
  • A distance is wrong by a few percent, because the wheel diameter is not exact and the floor is not perfectly grippy. The error is proportional to the distance.

Four parameters α1,…,α4\alpha_1, \dots, \alpha_4 say how much of each (the table below), and they are the only things to tune.

Noisy odometry: a curved cloud of end points, and lateral error growing faster than along-track errorLeft: 12 simulated paths of a robot commanded to drive 20 steps of 1 metre straight ahead, with small random errors in each turn and each distance, and 300 end points. The paths fan out like a trumpet and the end points form a curved band, wide sideways (about plus or minus 3 metres) and narrow along the path. Right: the standard deviation of the final position against the distance driven. The sideways error follows the curve square root of 2 alpha d cubed over 3 and reaches 1.46 metres at 20 metres, while the error along the path grows slowly, reaching about 0.13 metres. Dots from simulation lie on the curves. startend points after 20 malong the path (m) 0510152000.511.52distance driven (m)standard deviation of position (m) sideways: grows like d^1.5along the path: grows like √d
Twelve noisy paths of a robot that is told to drive 20 m straight, and the 300 end points. The cloud is a curved band much wider across the path than along it. Right: the sideways error grows with the distance to the power 1.5, the along-path error much more slowly.

The picture is the most important thing to take from this lesson. A tiny heading error, a degree or so, is harmless at the start of a drive and ruinous at the end: the robot points slightly the wrong way and keeps driving, so the sideways error is roughly distance times heading error. And the heading error itself accumulates, as a random walk. The two effects multiply: the sideways error grows not like the distance, nor like its square root, but like d3/2d^{3/2}. After 20 m with each metre carrying 1° of heading noise, the robot is 1.46 m off to the side but only about 0.1 m off along the path. This is why the cloud of possible poses is a curved band, often called the banana, not a circle, and why a filter that describes the pose by independent x and y variances is badly wrong.

The four parameters of the odometry motion model
ParameterControlsTypical cause
α1\alpha_1Rotation noise caused by rotationWheel slip while turning, a wheel base that is not exact
α2\alpha_2Rotation noise caused by translationA small heading drift per metre driven (unequal wheel diameters): the one that makes the banana
α3\alpha_3Translation noise caused by translationWheel diameter error, slip on the floor, the 1–3% distance error
α4\alpha_4Translation noise caused by rotationSlip during turning that also moves the robot along the floor

The odometry model has a rotate-drive-rotate structure with noise that grows with the size of each movement. Heading noise turns into sideways error, which grows faster than the distance.

Definitions

Odometry u=(δrot1,δtrans,δrot2)u = (\delta_{\text{rot1}}, \delta_{\text{trans}}, \delta_{\text{rot2}})
The reported motion between two poses as turn, drive and turn. It is computed from the encoder readings of the two moments.
Noise parameters α1,…,α4\alpha_1, \dots, \alpha_4
Non-negative numbers (units: radians² per radian², radians² per m², m² per m², m² per radian²) that set the variance of each movement.
Velocity control (v,ω)(v, \omega)
A commanded forward speed and turn rate, applied for a time Δt\Delta t. Used when no odometry is available.
Jacobians F,GF, G
FF is the derivative of the new pose with respect to the old pose, GG with respect to the control, both at the nominal values.
Odometry from two poses
δrot1=atan2⁡(Δy, Δx)−θ,δtrans=Δx2+Δy2,δrot2=θ′−θ−δrot1\delta_{\text{rot1}} = \operatorname{atan2}(\Delta y,\, \Delta x) - \theta, \quad \delta_{\text{trans}} = \sqrt{\Delta x^2 + \Delta y^2}, \quad \delta_{\text{rot2}} = \theta' - \theta - \delta_{\text{rot1}}
The three numbers that take the pose (x, y, θ) to (x′, y′, θ′). Angles are wrapped to (−π, π].
The noisy motion
x′=x+δ^transcos⁡(θ+δ^rot1)y′=y+δ^transsin⁡(θ+δ^rot1)θ′=θ+δ^rot1+δ^rot2\begin{aligned} x' &= x + \hat\delta_{\text{trans}}\cos(\theta + \hat\delta_{\text{rot1}}) \\ y' &= y + \hat\delta_{\text{trans}}\sin(\theta + \hat\delta_{\text{rot1}}) \\ \theta' &= \theta + \hat\delta_{\text{rot1}} + \hat\delta_{\text{rot2}} \end{aligned}
The hatted quantities are the reported ones with noise subtracted: each has a zero-mean Gaussian error, whose variance is given below.
Noise variances
σrot12=α1 δrot12+α2 δtrans2,σtrans2=α3 δtrans2+α4 (δrot12+δrot22),σrot22=α1 δrot22+α2 δtrans2\sigma^2_{\text{rot1}} = \alpha_1\,\delta_{\text{rot1}}^2 + \alpha_2\,\delta_{\text{trans}}^2, \qquad \sigma^2_{\text{trans}} = \alpha_3\,\delta_{\text{trans}}^2 + \alpha_4\,(\delta_{\text{rot1}}^2 + \delta_{\text{rot2}}^2), \qquad \sigma^2_{\text{rot2}} = \alpha_1\,\delta_{\text{rot2}}^2 + \alpha_2\,\delta_{\text{trans}}^2
Each variance grows with the square of the movement, so the standard deviation grows in proportion to it: the error is relative.
Velocity motion model (a circular arc)
(x′y′θ′)=(x−vωsin⁡θ+vωsin⁡(θ+ωΔt)y+vωcos⁡θ−vωcos⁡(θ+ωΔt)θ+ωΔt)\begin{pmatrix} x' \\ y' \\ \theta' \end{pmatrix} = \begin{pmatrix} x - \tfrac{v}{\omega}\sin\theta + \tfrac{v}{\omega}\sin(\theta + \omega\Delta t) \\ y + \tfrac{v}{\omega}\cos\theta - \tfrac{v}{\omega}\cos(\theta + \omega\Delta t) \\ \theta + \omega\Delta t \end{pmatrix}
For ω → 0 the arc becomes a straight line: x′ = x + vΔt cos θ, y′ = y + vΔt sin θ. Noise is added to v and ω before applying it (robotprob.sample_motion_velocity).
Covariance propagation through a step
Σ′=F Σ F⊤+G M G⊤,M=diag(σrot12, σtrans2, σrot22)\Sigma' = F\,\Sigma\,F^{\top} + G\,M\,G^{\top}, \qquad M = \mathrm{diag}(\sigma^2_{\text{rot1}},\, \sigma^2_{\text{trans}},\, \sigma^2_{\text{rot2}})
The first-order rule of the previous module: F carries the old uncertainty forward, G M Gᵀ adds the noise of this step.

Derivation: the Jacobians and the d^1.5 law

The Jacobians

Write ϕ=θ+δrot1\phi = \theta + \delta_{\text{rot1}} for the direction of travel. The motion function is g(x,y,θ;δrot1,δtrans,δrot2)=(x+δtranscos⁡ϕ,  y+δtranssin⁡ϕ,  θ+δrot1+δrot2)g(x, y, \theta; \delta_{\text{rot1}}, \delta_{\text{trans}}, \delta_{\text{rot2}}) = (x + \delta_{\text{trans}}\cos\phi,\; y + \delta_{\text{trans}}\sin\phi,\; \theta + \delta_{\text{rot1}} + \delta_{\text{rot2}}).

  1. F=∂g∂(x,y,θ)=(10−δtranssin⁡ϕ01δtranscos⁡ϕ001)F = \dfrac{\partial g}{\partial (x, y, \theta)} = \begin{pmatrix} 1 & 0 & -\delta_{\text{trans}}\sin\phi \\ 0 & 1 & \delta_{\text{trans}}\cos\phi \\ 0 & 0 & 1 \end{pmatrix}

    Differentiate each row with respect to x,y,θx, y, \theta (note ∂ϕ/∂θ=1\partial \phi/\partial\theta = 1). The third column says that an error in the heading of the old pose moves the new position sideways by the distance travelled.

  2. G=∂g∂(δrot1,δtrans,δrot2)=(−δtranssin⁡ϕcos⁡ϕ0δtranscos⁡ϕsin⁡ϕ0101)G = \dfrac{\partial g}{\partial (\delta_{\text{rot1}}, \delta_{\text{trans}}, \delta_{\text{rot2}})} = \begin{pmatrix} -\delta_{\text{trans}}\sin\phi & \cos\phi & 0 \\ \delta_{\text{trans}}\cos\phi & \sin\phi & 0 \\ 1 & 0 & 1 \end{pmatrix}

    Differentiate with respect to the three control components. The first column is the same sideways push (the first turn changes the direction of travel), the second is the direction of travel itself, the third shows that the last turn changes only the heading.

  3. Σ′=F Σ F⊤+G M G⊤\Sigma' = F\,\Sigma\,F^{\top} + G\,M\,G^{\top}

    Apply the first-order propagation of the last module, with independent control noise MM.

Why sideways error grows like d^1.5

Let the robot drive nn steps of length ℓ\ell straight ahead, d=nℓd = n\ell. In each step the two turns contribute heading noise of variance s2=2α2ℓ2s^2 = 2\alpha_2\ell^2 (using σrot2=α2ℓ2\sigma^2_{\text{rot}} = \alpha_2\ell^2 for each of the two turns).

  1. θk=∑j=1kεj,Var(θk)=k s2\theta_k = \sum_{j=1}^{k} \varepsilon_j, \qquad \mathrm{Var}(\theta_k) = k\,s^2

    The heading error after kk steps is a random walk: independent increments εj\varepsilon_j of variance s2s^2 add up in variance (the variance lesson).

  2. yn≈ℓ∑k=1nsin⁡θk≈ℓ∑k=1nθk=ℓ∑j=1n(n−j+1) εjy_n \approx \ell\sum_{k=1}^{n}\sin\theta_k \approx \ell\sum_{k=1}^{n}\theta_k = \ell\sum_{j=1}^{n} (n - j + 1)\,\varepsilon_j

    The sideways position is the sum of the sideways components of each step, ℓsin⁡θk\ell\sin\theta_k, and for small angles sin⁡θ≈θ\sin\theta \approx \theta. Exchanging the order of the double sum shows that heading noise from step jj is felt by all the later steps.

  3. Var(yn)=ℓ2s2∑m=1nm2=ℓ2s2 n(n+1)(2n+1)6≈ℓ2s2 n33\mathrm{Var}(y_n) = \ell^2 s^2\sum_{m=1}^{n} m^2 = \ell^2 s^2\,\dfrac{n(n+1)(2n+1)}{6} \approx \ell^2 s^2\,\dfrac{n^3}{3}

    The variances of independent terms add; the sum of squares formula for ∑m2\sum m^2 gives n3/3n^3/3 for large nn.

  4. Var(y)≈2α23 ℓ d3,σy≈2α2 ℓ3  d3/2\mathrm{Var}(y) \approx \dfrac{2\alpha_2}{3}\,\ell\,d^{3}, \qquad \sigma_y \approx \sqrt{\dfrac{2\alpha_2\,\ell}{3}}\; d^{3/2}

    Substitute s2=2α2ℓ2s^2 = 2\alpha_2\ell^2 and n=d/ℓn = d/\ell. With α2=0.0004\alpha_2 = 0.0004, ℓ=1\ell = 1 m and d=20d = 20 m: 2×0.0004×8000/3=1.46\sqrt{2 \times 0.0004 \times 8000/3} = 1.46 m.

Doubling the distance multiplies the sideways standard deviation by 21.5=2.832^{1.5} = 2.83, and the along-path error, which comes from distance noise alone, by only 2=1.41\sqrt{2} = 1.41.

What the first-order propagation misses

The Jacobians treat the heading error as small. But a heading error θ\theta also shortens the forward progress by the factor cos⁡θ≈1−θ2/2\cos\theta \approx 1 - \theta^2/2, a second-order effect that the Jacobians ignore (the last module showed the same effect for cos⁡\cos). At 20 m the heading standard deviation is 7° and this adds along-path variance that the first-order calculation does not see.

Because heading error is integrated over distance, the pose covariance of dead reckoning is a long, curved, strongly correlated band. Its sideways spread grows like d^1.5, and a diagonal covariance would hide the correlation between position and heading.

A worked example

A robot drives 20 steps of 1 m straight ahead, with α1=α2=α3=α4=0.0004\alpha_1 = \alpha_2 = \alpha_3 = \alpha_4 = 0.0004. Each step has a distance noise of 0.0004=2\sqrt{0.0004} = 2 cm and a noise of 0.02 rad (1.15°) in each of the two turns. The program propagates the covariance with the Jacobians and compares it with 4000 Monte Carlo runs.

  1. One step. At the start, ϕ=0\phi = 0, so F=I+(000001000)F = I + \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{pmatrix} (with δtrans=1\delta_{\text{trans}} = 1) and G=(010100101)G = \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 1 & 0 & 1 \end{pmatrix}. The control noise is M=diag(0.0004,0.0004,0.0004)M = \mathrm{diag}(0.0004, 0.0004, 0.0004).
  2. After 5, 10 and 20 m. Standard deviations (along, sideways, heading): Monte Carlo (0.045 m, 0.182 m, 3.6°), (0.067, 0.51, 5.1°), (0.127, 1.44, 7.2°); Jacobians (0.045, 0.184, 3.6°), (0.063, 0.518, 5.1°), (0.089, 1.462, 7.3°).
  3. The d^1.5 law. Sideways: 0.18, 0.51, 1.44 m at 5, 10, 20 m. From 5 m to 10 m it grows by 2.8, from 10 to 20 m by 2.8 again: the factor 21.52^{1.5}. The formula 2α2d3/3\sqrt{2\alpha_2 d^3/3} gives 1.461 m at 20 m.
  4. Where first order fails. The sideways and heading entries agree with Monte Carlo to 2%. The along-path standard deviation at 20 m does not: 0.127 m against 0.089 m. The first-order calculation sees only the distance noise, and misses the loss of forward progress caused by the 7° heading spread (the mean final x is 19.92 m, not 20).
  5. The velocity model. A command of v=1v = 1 m/s and ω=0.5\omega = 0.5 rad/s for 1 s moves the robot along an arc to x=sin⁡(0.5)/0.5=0.9589x = \sin(0.5)/0.5 = 0.9589, y=(1−cos⁡0.5)/0.5=0.2448y = (1 - \cos 0.5)/0.5 = 0.2448, heading 0.5 rad: shorter than the 1 m of arc length because the path curves.
import math
from robotprob import (Rng, sample_motion_odometry, motion_odometry, cov_matrix, mean_vector,
                       matmul, transpose, madd, symmetrize, zeros, sample_motion_velocity)

alphas = (0.0004, 0.0004, 0.0004, 0.0004)       # a1: rot from rot, a2: rot from trans, a3: trans from trans, a4: trans from rot

def jacobians(pose, odom):                      # F: d pose' / d pose,  G: d pose' / d control
    rot1, trans, rot2 = odom
    th = pose[2] + rot1
    F = [[1.0, 0.0, -trans * math.sin(th)], [0.0, 1.0, trans * math.cos(th)], [0.0, 0.0, 1.0]]
    G = [[-trans * math.sin(th), math.cos(th), 0.0], [trans * math.cos(th), math.sin(th), 0.0], [1.0, 0.0, 1.0]]
    return F, G

def control_cov(odom, a):                       # the variances of the three movements
    rot1, trans, rot2 = odom
    a1, a2, a3, a4 = a
    return [[a1 * rot1 ** 2 + a2 * trans ** 2, 0.0, 0.0],
            [0.0, a3 * trans ** 2 + a4 * (rot1 ** 2 + rot2 ** 2), 0.0],
            [0.0, 0.0, a1 * rot2 ** 2 + a2 * trans ** 2]]

step = (0.0, 1.0, 0.0)                          # drive 1 m straight, repeated 20 times
pose, P = [0.0, 0.0, 0.0], zeros(3, 3)
cov_track = {}
for k in range(1, 21):                          # propagate the covariance with the Jacobians
    F, G = jacobians(pose, step)
    P = symmetrize(madd(matmul(matmul(F, P), transpose(F)), matmul(matmul(G, control_cov(step, alphas)), transpose(G))))
    pose = motion_odometry(pose, step)
    cov_track[k] = [row[:] for row in P]

rng = Rng(9)                                    # the reference: sample the model many times
runs = 4000
finals = {5: [], 10: [], 20: []}
for _ in range(runs):
    p = [0.0, 0.0, 0.0]
    for k in range(1, 21):
        p = sample_motion_odometry(rng, p, step, alphas)
        if k in finals:
            finals[k].append(p)
print('after n metres of straight driving (std in m, m, degrees):')
for k in (5, 10, 20):
    mc = cov_matrix(finals[k])
    lin = cov_track[k]
    print(k, 'm  Monte Carlo', [round(math.sqrt(mc[0][0]), 3), round(math.sqrt(mc[1][1]), 3), round(math.degrees(math.sqrt(mc[2][2])), 2)],
          ' Jacobians', [round(math.sqrt(lin[0][0]), 3), round(math.sqrt(lin[1][1]), 3), round(math.degrees(math.sqrt(lin[2][2])), 2)])
print('mean final position after 20 m: x', round(mean_vector(finals[20])[0], 3), ' y', round(mean_vector(finals[20])[1], 3))
print('lateral std at 20 m from the formula sqrt(2 a2 d^3 / 3) =', round(math.sqrt(2 * 0.0004 * 20 ** 3 / 3), 3))

x, y, th = sample_motion_velocity(Rng(1), [0.0, 0.0, 0.0], 1.0, 0.5, 1.0, 0.0, 0.0)     # the velocity model without noise
print('arc with v = 1 m/s, w = 0.5 rad/s for 1 s: x', round(x, 4), ' y', round(y, 4), ' theta', round(th, 4))
after n metres of straight driving (std in m, m, degrees):
5 m  Monte Carlo [0.045, 0.182, 3.56]  Jacobians [0.045, 0.184, 3.62]
10 m  Monte Carlo [0.067, 0.51, 5.14]  Jacobians [0.063, 0.518, 5.12]
20 m  Monte Carlo [0.127, 1.437, 7.18]  Jacobians [0.089, 1.462, 7.25]
mean final position after 20 m: x 19.92  y 0.011
lateral std at 20 m from the formula sqrt(2 a2 d^3 / 3) = 1.461
arc with v = 1 m/s, w = 0.5 rad/s for 1 s: x 0.9589  y 0.2448  theta 0.5
The Jacobian propagation and the sampling agree on the sideways and heading spread. The along-path spread shows the limit of first order: heading errors also shorten the forward progress.

In robotics

Localizers use this model every step

A particle filter draws one sample of the model per particle and per step (sample_motion_odometry): the cloud of particles after a move is the banana of the figure. An extended Kalman filter instead propagates the covariance with the Jacobians above (module 8). Navigation stacks expose the four parameters under the names alpha1 to alpha4, with a fifth for omnidirectional bases, in their particle-filter localizer configuration. Wrongly small values make the filter overconfident after a long featureless corridor; wrongly large ones make it jumpy.

Tuning intuition

The parameters can be read off the behaviour. A robot that arrives too far to the side after long straight drives needs a larger α2\alpha_2. One that overshoots or undershoots in distance needs a larger α3\alpha_3. One whose heading is poorly known after turning in place needs a larger α1\alpha_1. M5-T4: Identifying Noise Parameters from Data shows how to estimate them from logged runs.

Systematic errors need calibration, not noise

The model treats odometry errors as random. The largest real errors are often systematic: wheels of slightly different diameters make a straight command curve to one side, a wrong wheel base makes every 90° turn 88°. These errors do not average out and do not look like noise: they look like drift in one direction. Calibration procedures such as driving a square clockwise and counter-clockwise separate the two main systematic errors (Borenstein and Feng's UMBmark); only the remainder is noise for α\alpha.

The velocity model for planning

When no wheel odometry exists, as for a legged robot or in a planner that predicts motion before it happens, the velocity model describes the arc a commanded (v,ω)(v, \omega) produces. Dynamic window and pure-pursuit planners use these arcs (see the Navigation course). The SLAM course covers the same models for localization in Odometry and Motion Models.

Other robots

For drones the motion model is the IMU integration of the next module and the UAV course; for manipulators it is the joint-space dynamics. The structure is always the same: a deterministic update plus noise whose size depends on what the robot did, and Jacobians for the covariance.

Common misconceptions

“Odometry noise is a small random number added to x and y.”

It is noise on the turns and the distance, which then appears in x and y through the heading. That is why the error is correlated and curved: a heading error shifts position more and more as the robot continues. Adding independent noise to x and y misses this and is the cause of overconfident filters.

“Doubling the distance doubles the error.”

The sideways error grows like d^1.5 (a factor 2.8 per doubling), the along-path error like √d (1.4), and a systematic bias like d (2). Which dominates depends on the distance; a robot that is accurate over 5 m can be unusable over 50.

“The covariance from the Jacobians is exact.”

It is a first-order approximation. In the example the sideways and heading entries are accurate to 2%, but the along-path standard deviation at 20 m is 30% too small, because heading errors cost forward progress at second order.

“More precise wheel encoders remove the need for a noise model.”

Encoders measure wheel rotation, not floor contact. Slip, unequal wheels and an uncertain wheel base remain, and they dominate the error of an encoder with hundreds of counts per degree.

Key takeaways

  1. The odometry model describes a movement as turn, drive, turn, each with Gaussian noise whose variance grows with the square of the size of the movement (α₁ to α₄).
  2. The velocity model moves the robot along a circular arc for a commanded (v, ω), with a straight-line limit as ω → 0; noise is added to v and ω.
  3. The Jacobians F (with respect to the old pose) and G (with respect to the control) give the covariance after a step: Σ′ = FΣFᵀ + GMGᵀ.
  4. A random heading error integrates into sideways position error: the sideways standard deviation grows like d^1.5, the along-path like √d. The cloud of poses is a curved band.
  5. First-order propagation is accurate for the sideways and heading spread but misses second-order loss of forward progress. Systematic errors are calibrated, not modelled as noise.

References and further reading

Each source is marked free or paid. Free to read does not mean free to reuse: the course resources page lists every source with its licence.

Knowledge check

Three questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

With the parameters of the example (α₂ = 0.0004 and steps of 1 m), compute the sideways standard deviation of dead reckoning after 10 m and after 40 m. By what factor does it grow, and by what factor would it grow if it followed the √d law?

Explanation

σy = √(2 α₂ ℓ d³ / 3), which for ℓ = 1 m is √(2 × 0.0004 × d³ / 3). At 10 m: √(2 × 0.0004 × 1000 / 3) = √0.2667 = 0.516 m. At 40 m: √(2 × 0.0004 × 64000 / 3) = √17.07 = 4.13 m. The ratio is 8 = 4^1.5. A √d law would give only a factor of 2. The robot that was within half a metre sideways after 10 m is four metres off after 40 m: dead reckoning over long distances is dominated by heading drift.

Question 2

A robot turns 90° on the spot (δrot1 = π/2, δtrans = 0, δrot2 = 0) with α₁ = 0.01. What is the standard deviation of the turn, in degrees, and what would it be for a 180° turn? Which parameter would you change if turns are accurate but the robot also creeps forward while turning?

Explanation

σrot1 = √(α₁ δrot1²) = √(0.01 × 2.467) = 0.157 rad = 9.0° for 90°, and 18° for 180° (the standard deviation is proportional to the angle, so a half-turn is twice as noisy). Creeping forward during a turn shows up as translation noise caused by rotation, controlled by α₄ (σ²_trans = α₃ δtrans² + α₄ (δrot1² + δrot2²)); raise it, leaving α₁ alone.

Question 3

In the example the Jacobian propagation gives an along-path standard deviation of 0.089 m after 20 m, while Monte Carlo gives 0.127 m. Explain the difference, and say whether it matters for a robot that is limited by its sideways error.

Explanation

The first-order propagation sees only the distance noise (σ ≈ 0.02 m per metre, so 0.02 × √20 = 0.089 m). It misses the fact that a heading error θ shortens the forward progress by about θ²/2 per step; with a heading spread of about 7° (0.126 rad) the accumulated effect is of the order of 0.1 m in standard deviation and a mean shortening of 8 cm (the mean final x is 19.92 m). The added variance is 0.127² − 0.089² = 0.0082 m². It does not matter much here: the sideways error is 1.4 m, eleven times larger, so the along-path term has little effect on the shape. It matters when the robot is constrained along the path (a docking station), and then sampling or a second-order treatment is better.

What’s next

The motion model says where the robot may be after moving. The next lesson builds the other half: given where the robot is, what will its sensors read?

Practice this lesson

Probabilistic Odometry

Dead reckoning puts Rover on the far side of a wall after two corners. Implement the odometry motion model, grow the uncertainty with distance, and identify the wheel noise from logged runs.

Next lesson

M5-T3 — Range, Bearing and Beam Observation Models

Write the likelihood of a range-bearing measurement of a landmark and of a range beam with hits, short readings, misses and random returns.

Nothing below is required to finish this lesson.

Other courses on this site treat neighbouring topics from their own angle: