TactivergeLite

Lite / Intelligent Robotic Systems / Week 31

One connection at a time

Plug in five new subsystems at once and the rover drives in circles. Which of the five is to blame? You have no idea, and that is the problem.

About 35 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Big-bang integration feels fast and is almost always slower. Adding one connection at a time, with a test that must pass before the next, turns 'something is wrong' into 'step 4 broke it'.

Predict

A rover's odometry, camera fix and Kalman filter are all new. What is the best order to integrate them?

  1. All three at once
  2. Odometry alone, then add camera fixes with fixed trust, then switch to the Kalman filter
  3. Kalman filter first, without any sensors
Guess first, then reveal

Start with the simplest working system, then add one piece at a time and check that each addition improves the result. If the Kalman step makes things worse, you know where to look.

Discover

Integrate in steps: run the route with no checkpoints, then with one checkpoint and fixed camera trust, then with three checkpoints, then switch to the Kalman filter. Record the final error after each step.

What the interactive shows (text version)

In the rover build, final position error falls as checkpoints are added one at a time; the learner records the error after each integration step and investigates any step that makes it worse.

You can also open the interactive on the full site when you have a faster connection.

Understand

Integrate in increments

Order the connections so each step adds one subsystem or one link to a system that already works. Write the test for each step before you do it: what should improve, and by roughly how much? Do not move on until it passes.

Stubs and recordings

A stub stands in for a subsystem that is not ready: a fake planner that sends a fixed path, a fake sensor that replays recorded data. Stubs let each team test against the agreed interface early, and recorded data makes a test repeatable.

When a step fails

Undo the step, confirm the earlier state still passes, then re-add the new piece with more logging at its interface: units, timestamps, frames. Most failures at this point are contract mismatches, not bugs inside either subsystem.

Explain it another way

Intuitive

Assembling flat-pack furniture and checking it is square after each panel, instead of finding at the end that the first panel was upside down.

Technical

Incremental integration with regression tests at each step localises faults to the most recent change. Hardware-in-the-loop and log replay let steps be tested without the full system.

Applied

Space and automotive projects plan integration as a sequence of milestones with test procedures, often building up from simulation, through hardware-in-the-loop, to full system tests.

Worked example 1

Rover final errors after each step: no checkpoints 6.1 m; one checkpoint 2.4 m; three checkpoints 0.9 m; Kalman filter 1.7 m. What do you conclude?

The first three steps each helped. Switching to the Kalman filter made it worse, so investigate that step: check the noise settings it was given and the units of the camera fix, before blaming the filter itself.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. In the worked example, which step should you investigate?
Practice 2. What is a stub in integration testing?
Practice 3. Why is integrating everything at once usually slower overall?

ms

Practice 5. Why replay recorded sensor data when testing a new filter?

Apply it

Write an integration plan for your vacuum-cleaner robot with at least five steps. For each step, name the new connection, any stub used, and a test with a pass criterion.

Reflect

What would you log at an interface to make a failure easy to explain?

Write your answer on paper or in your own notes. Lite never stores what you write.

← The latency budgetChange one thing →