Click & Whirr needs a wider screen
Open it on a laptop or desktop (1280px or wider recommended). The Learn · Code · Watch workspace needs the room to breathe.
Lesson e3
Navigate on your estimate
Checkpoints · 0 of 2 (waiting for Run)
- Reach the real finish (the estimate can lie, the mat cannot) (waiting for Run)
- Hold the road: the true pose stays near the route (waiting for Run)
A robot that feels fine and is wrong
Until now, every drive you coded had ground truth somewhere in the loop: a line under the sensor, a bearing to a goal the API computed for you. This run has none of that. The route from lessons 7 and 8 is on the mat, the slip from e1 is in the wheels, and the only things your code will ever be told are the two towers’ noisy fixes and whatever you choose to remember.
Press Run with the starter and watch closely: the robot sets off convinced. In its head (raw dead reckoning) it is tracing the route perfectly. On the mat, the slipping right wheel bends every straight into a curve, and the aim it computes from its imaginary pose steers the real robot further from the real route. It misses the finish without ever noticing anything was wrong. A robot that steers on an uncorrected belief does not feel lost; it feels fine, which is worse.
Put your Estimator in the loop
Bring the real robot home
▸API reference
- from mybot import Estimator, PurePursuit
- The pieces you earned: e1/e2's Estimator and lesson 8's PurePursuit. If the import banner is up, adopt the references you have not built.
- update(range_a, bear_a, range_b, bear_b, dt)
- Called every tick with both towers' fixes only. The wheel speeds you integrate are the ones YOU commanded last tick (self.cmd); nobody else knows them either. Return a (left, right) wheel tuple.
- robot.sensors.aim_from(x, y, theta, L)
- The pursuit bearing to the point L px ahead on the route, measured from the pose you pass in; + = to its left. Aim from your estimate. There is no aim_at on this lesson: the robot cannot aim from a true pose it does not know.
- how you're graded
- The checkpoints grade the HIDDEN true pose against the route: reach the finish, and keep the real robot near the route the whole way. Your estimate can look perfect in its own head and still fail both; only a corrected estimate gets the real robot home.
space pause · r reset · ctrl/cmd+enter run
Simulator
This lesson imports Odometry, Estimator, PurePursuit from your library. You haven’t built them yet.