Skip to main content
Open In Colab The navigation MDP assumed exact sensor readings and gave each policy the robot’s true pose. A physical robot has neither. It must infer its pose from noisy wheel odometry and lidar, and the error changes as it moves. The experiments here keep the same room, robot, and policies but replace the true pose with a pose estimate. EKF SLAM estimates the pose while mapping landmarks. Dead reckoning, which integrates wheel odometry without correcting it from lidar, provides a useful comparison. Results obtained from the true pose remain in the tables as a baseline. In the final experiment, QMDP weights actions over the filter’s Gaussian belief, so pose uncertainty affects the choice.

The room and the robot

The experiment uses the same environment as the finite navigation MDP: a 4 m square room, four circular obstacles, and a goal at (3.5,3.5)(3.5,3.5). The TurtleBot3 Waffle is represented by a disk with a 0.2 m radius and follows the same noisy unicycle model. Each commanded speed receives Gaussian noise with standard deviation 0.02. Reaching within 0.25 m of the goal or colliding ends the episode; otherwise it is truncated after 200 steps of 0.2 s. The simulator also records the achieved twist (v~t,ω~t)(\tilde v_t,\tilde\omega_t), including actuation noise, because that motion determines the wheel-encoder readings. The dynamics are unchanged from the navigation MDP; only the sensing and state estimation are new.

Wheel odometry

The Waffle’s nominal wheel radius is r=0.033r=0.033 m, and each wheel sits d=0.1435d=0.1435 m from the centerline. Under the differential-drive model, a twist (v,ω)(v,\omega) corresponds to uL=(v−dω)/ru_L=(v-d\omega)/r and uR=(v+dω)/ru_R=(v+d\omega)/r. The encoders report the wheel rotations associated with the achieved twist (v~t,ω~t)(\tilde v_t,\tilde\omega_t) plus noise. As in the EKF SLAM chapter, the standard deviation for a wheel rotating at uu is α∣u∣+β\alpha|u|+\beta, with α=0.05\alpha=0.05 and β=0.1\beta=0.1 rad/s. Odometry converts the reported wheel speeds back to a twist using the nominal radius. This conversion is exact only when both physical wheels have radius rr. Wear or an uneven load can change the effective radius; model the right wheel as rR=(1+δ)rr_R=(1+\delta)r, following the example in EKF localization. Its angular speed is then uR=v~t+d ω~t(1+δ) r,u_R = \frac{\tilde v_t + d\,\tilde\omega_t}{(1 + \delta)\, r}, Odometry multiplies this measurement by rr, producing a distance error by the factor 1/(1+δ)1/(1+\delta). Because the bias keeps the same sign, it accumulates over the trajectory instead of averaging away. The filter does not include δ\delta in its model. The filter’s motion model gg integrates the twist from the reported wheel speeds over one step, the same Euler step the simulator takes. Its Jacobians GtG_t (with respect to the pose) and VtV_t (with respect to the wheel speeds) give the motion noise Qt=VtMtVt⊤Q_t = V_t M_t V_t^\top, where MtM_t is the diagonal covariance of the encoder noise. The course writes motion noise as QtQ_t and measurement noise as RtR_t, the reverse of the letters in Thrun, Burgard and Fox (Thrun et al., 2005).

Landmarks from the lidar

Each lidar scan contains 360 ranges, one per degree, with 1 cm Gaussian range noise. The four circular obstacles serve as landmarks; the walls do not. Their radii range from 0.20 to 0.30 m, compared with the 0.10 m pillars used in the EKF SLAM chapter, so the detection front end needs two adjustments. A range jump larger than 15 cm separates adjacent clusters. A candidate landmark must curve toward the robot: its midpoint must lie at least 8 cm in front of the chord joining its endpoints. Flat wall segments and inward-facing corners fail this test. A geometric circle fit is then applied to the cluster. The detector accepts radii from 0.1 to 0.4 m and centers within 2.5 m, and reports the center’s range and bearing. Minimizing radial distances avoids the roughly 1 cm inward bias produced by an algebraic fit on these short arcs.
Output from cell 5 A simulated scan from the blue pose. Gray points show the 360 lidar returns; orange circles show accepted fits, and crosses mark their reported centers. The dashed circle indicates the 2.5 m landmark cutoff. Measurement noise RtR_t is calibrated by comparing the reported range and bearing with the true obstacle centers at 400 random poses:
The detector returns an average of 2.94 landmarks per scan, so the filter usually observes three obstacles at once. Range error has a mean of −1.7-1.7 mm and a standard deviation of 8.4 mm; bearing error has a standard deviation of 0.13 degrees. The filter retains the more conservative noise values from the EKF SLAM chapter: 2 cm for range and 0.75 degrees for bearing. This larger RtR_t reduces the weight of each observation and broadens the association gate.

EKF SLAM on the navigation run

The filter is the EKF SLAM section’s step, unchanged. The prediction moves the pose with gg and grows the covariance with GtG_t and QtQ_t. Each landmark observation is then associated with the mapped landmark at the smallest Mahalanobis distance, or starts a new landmark with add_landmark if no mapped landmark passes the 99.9% gate. The correspondences are unknown, as in that section. Initialization uses the true start pose with zero pose covariance, aligning the map frame with the room and making the goal at (3.5,3.5)(3.5,3.5) known in filter coordinates. The filter processes the first scan before any motion. Those initial landmarks are placed from an exact pose, so the map orientation inherits only the bearing noise in that scan. Delaying the first correction until after motion would rotate the entire map by the first-step heading error, which later relative landmark measurements could not remove. Dead reckoning shares the prediction step but omits all corrections; its covariance records how quickly the encoder-noise model expects the pose to drift.

Policies on an estimated pose

The experiment reuses two policies without retraining. Go-to-goal turns toward the target and moves forward once aligned; it needs only goal distance and bearing computed from the supplied pose. The second policy is the finite model’s optimum π∗\pi^*, a table over 36×36×1636\times36\times16 pose cells and five steering commands. Rebuilding that table also preserves Q∗(s,a)Q^*(s,a), denoted q∗q_* in the MDP chapter, for the later QMDP experiment. Both policies use certainty equivalence: they act as though the supplied pose were exact and ignore its covariance. Three pose sources are tested. Ground truth provides the ideal baseline; dead reckoning and the EKF SLAM mean provide estimates. Episode outcomes are always evaluated from the true pose, regardless of which pose drives the policy.

Choosing the wheel radius error

A plausible wheel-radius error should reflect its physical source. The EKF localization example uses a wheel that is 1% smaller than the model assumes, representing tire wear or uneven loading. For the Waffle, 1% is 0.33 mm of the 33 mm nominal radius. The experiments therefore set the right wheel to δ=−0.01\delta=-0.01. At full speed, this bias makes odometry overestimate the turn rate by about 0.5 degrees per second. The following sweep drives π∗\pi^* from dead reckoning across several values of δ\delta, including zero, to show how quickly the bias matters.
Dead reckoning limits π∗\pi^* to a 72% success rate even when the wheel radii are correct. Encoder noise accumulates in the heading estimate and gradually separates the believed pose from the true pose. A 0.5% radius error has little additional effect; success falls to 63% at 1% error and 25% at 3%. Across the same sweep, mean position error rises from 5.4 cm to 9.0 cm. Although both are well below the 0.25 m goal tolerance, every failure is a collision: π∗\pi^* often passes close enough to an obstacle for a few centimeters of localization error to matter.

Results over 500 episodes

Both policies are evaluated on the same 500 seeded episodes with δ=−0.01\delta=-0.01. Starts are sampled from free space at least 1.5 m from the goal, and every pose source receives the same starts and actuation noise. The final column reports the position error seen by the policy, averaged first over the steps in each episode and then across episodes.
Ground truth supplies the ideal baseline. Go-to-goal succeeds in 31% of the episodes, while π∗\pi^* succeeds in all of them. The earlier 300-episode experiment measured 34% for go-to-goal, a difference consistent with sampling variation. Dead reckoning reduces go-to-goal success from 31% to 22% and π∗\pi^* success from 100% to 63%. Every additional failure is a collision. Go-to-goal shows a smaller mean pose error only because many of its episodes terminate before the drift has time to grow. Using the EKF SLAM mean restores both policies to the baseline: 31% for go-to-goal and 100% for π∗\pi^*. Mean position error stays at 0.5 to 0.6 cm, between one sixth and one tenth of the dead-reckoning error. This performance depends on landmark coverage. The lidar usually sees three obstacles, allowing a correction at every step and preventing wheel-radius bias from accumulating. Long gaps in landmark visibility would leave the filter running on odometry and allow the error to grow.

One episode in detail

The first episode in which dead reckoning causes π∗\pi^* to collide while EKF SLAM reaches the goal provides a representative comparison. Both runs begin from the same pose and use the same actuation noise.
Output from cell 13 True trajectory (green) and the trajectory inferred by the policy (orange, dashed). A 2-sigma position ellipse is drawn every 10 steps, and the green circle marks the final true pose. Dead reckoning drives the left run; the EKF SLAM mean drives the right. The trajectories remain close for the first two meters, after which the dead-reckoning estimate drifts left of the true path. Because odometry credits the smaller right wheel with too much travel, it overestimates the robot’s left turn; the final heading error is about 11 degrees. The estimated trajectory clears the obstacle at (3,3)(3,3), but the true robot is 18 cm away from that estimate and clips the obstacle after 72 steps. Growing heading uncertainty stretches the position ellipses across the direction of travel. With EKF SLAM, the ellipses remain small and the robot reaches the goal after 79 steps. Output from cell 14 Position error during the EKF-driven episode, compared with twice the root-mean-square position uncertainty reported by each covariance. Dead reckoning is propagated in parallel from the same encoder readings. Dead-reckoning error exceeds 10 cm after roughly 12 s and reaches 27 cm by the end of the run. Its covariance is more conservative, with a 60 cm bound that covers the drift despite omitting wheel-radius bias from the model. The EKF error remains much smaller, although its room-frame bound grows with distance from the start. Landmark observations constrain the robot relative to the map, but the map’s orientation inherits the bearing uncertainty of the initial scan. A small angular error about the start creates a lateral displacement that increases with distance. The deliberately conservative RtR_t further widens this bound. The bound has no sharp drops because roughly three landmarks remain visible at every step. The dramatic covariance reduction seen at loop closure requires a landmark to disappear and later re-enter view; this room provides no comparable gap.

Acting on the belief with QMDP

Certainty equivalence discards the covariance Σt\Sigma_t. QMDP instead uses the Gaussian pose belief b(s)≈N(μt,Σt)b(s)\approx\mathcal N(\mu_t,\Sigma_t) (Thrun et al., 2005). It averages the fully observed optimal action values under that belief and selects the largest: at=arg⁡max⁡a∑sb(s) Q∗(s,a).a_t = \arg\max_a \sum_s b(s)\, Q^*(s, a). Here ss indexes cells in the finite model and Q∗Q^* comes from value iteration. Monte Carlo sampling projects the continuous belief onto those cells: draw N=200N=200 poses s(i)s^{(i)} from N(μt,Σt)\mathcal N(\mu_t,\Sigma_t) and average the action values of their cells, ∑sb(s) Q∗(s,a)≈1N∑i=1NQ∗(cell(s(i)),a).\begin{aligned} \sum_s b(s)\, Q^*(s, a) &\approx \frac{1}{N} \sum_{i=1}^{N} Q^*\big(\text{cell}(s^{(i)}), a\big). \end{aligned} Samples inside obstacles are discarded because the robot knows it has not collided. With a narrow covariance, the samples occupy the same cell as μt\mu_t and QMDP reduces to π∗(μt)\pi^*(\mu_t). Its action changes only when appreciable belief mass reaches cells with different optimal actions, such as cells on opposite sides of an obstacle boundary. With a full scan, roughly three landmarks are visible at every step and position uncertainty remains well within one 11 cm cell. QMDP therefore behaves almost exactly like π∗(μt)\pi^*(\mu_t). To create meaningful uncertainty without changing the dynamics, the next experiment blocks the rear half of the lidar, as a tall payload mounted behind the sensor might do. Only the forward half-plane remains visible. The detector also rejects an obstacle cut by the edge of the visible sector because the partial arc biases its circle fit. Encoder noise, wheel-radius bias, RtR_t, and episode seeds remain unchanged. During gaps in landmark visibility, the filter propagates from odometry alone and its covariance expands.
Output from cell 17 EKF SLAM position error and its 2-sigma bound with a full scan (left) and a blocked rear half (right). Gray bands indicate steps without a visible landmark. Among the first 50 trials, this episode has the longest blind interval. Blocking the rear half leaves the robot without a landmark on 29% of its steps; the median episode’s longest blind interval is 2.2 s. In the episode shown, the 2-sigma bound reaches 9.9 cm, compared with 3.1 cm for the full scan. Both uncertainty and position error grow most quickly inside the gray bands, when the filter can only predict. Blind intervals also occur beside obstacles: as the robot passes one, the boundary of the visible half-plane cuts its arc and the detector rejects it.
With the half-scan EKF belief, QMDP succeeds in 100% of episodes and π∗(μt)\pi^*(\mu_t) in 99%; their collision rates are 0% and 1%. QMDP selects a different action on 13% of its steps. The gap is about five of the 500 episodes. It favors QMDP, but it is too small to rank the two policies with confidence. The widest 2-sigma bound in the episode above is 9.9 cm, close to one 11 cm cell, so the belief covers only a few neighboring cells even during a blind interval. With dead reckoning, no landmark correction narrows the belief. QMDP changes the action on 34% of steps and succeeds in 72% of episodes, compared with 63% for π∗(μt)\pi^*(\mu_t). Their collision rates are 28% and 37%. A 9-point gain over 500 episodes is larger than sampling variation alone would explain. QMDP assumes that state uncertainty disappears after the next action because Q∗Q^* describes a fully observed MDP from that point onward. Consequently, it assigns no value to information-gathering actions. It will not turn to bring a landmark into view or slow down while localization improves. Planning those actions requires a policy over beliefs, which is the full POMDP problem.

What the estimate costs

In this room, full-scan EKF SLAM introduces no measurable loss: go-to-goal and π∗\pi^* succeed as often from the filter mean as from the true pose because about three landmarks remain visible and mean error stays at 0.5 to 0.6 cm. Dead reckoning is much less forgiving. Random encoder noise alone reduces π∗\pi^* success by 28 percentage points; adding a 1% wheel-radius bias increases the loss to 37 points. With the rear half of the scan blocked, no landmark is visible during 29% of the run and uncertainty grows between sightings. Even so, π∗(μt)\pi^*(\mu_t) still reaches the goal in 99% of episodes with a mean error of 1.8 cm, which leaves QMDP almost nothing to recover. QMDP helps where the belief is wide: on dead reckoning it raises success from 63% to 72%. QMDP accounts for uncertainty when comparing actions but does not seek observations. A policy that deliberately looks before committing must plan over beliefs. Key references: (Thrun et al., 2005)

References

  • Thrun, S., Burgard, W., Fox, D. (2005). Probabilistic Robotics. Link

Found an error on this page? Report an issue.