Theme
Stage 1 · project · 60 min

Project: Prove your environment, then break it on purpose

Before you trust a toolchain, watch it fail. You will bring the environment up, time the suite, then plant three faults and record which check catches each one, how quickly, and whether its message would have told you what to do.

This is the habit the rest of the course builds on: a check you have never seen fail is a check you are taking on trust.

Tasks

  1. Bring everything up and record how long each step takes.

    time make doctor
    time make setup
    time make test
    
  2. Fault 1 — an illegal name. Set model: in config/so101_follower.yaml to so-101_follower. Run make test, note the test that names the problem, revert.

  3. Fault 2 — a broken boundary. Give threevn_bringup a dependency on ros_gz_sim in its package.xml. Run make test, note the failing test, revert.

  4. Fault 3 — two servos, one id. In the same file's joints: block, give elbow_flex the bus id 2, which shoulder_lift already has. Run make test. Which test catches it, and what would two servos with one id do on a real bus? Revert.

  5. Write two sentences: which of the three messages was the most useful, and what would you change about the least useful one?

Done when

  • make test is green on your machine, and you have its time.
  • Each planted fault was caught by a test you can name.
  • git status shows a clean tree — every fault reverted.
Reverting cleanly

git checkout -- <file> restores a single file. git status before and after each fault tells you whether you left anything behind.

Fault 1 failed five tests, fault 3 only one

A model name flows into everything built from the profile, so three description builds fail beside the test that names the rule. A bus id is read only when the servos are addressed, so one test sees it. Its message is two lists of numbers, which is a good candidate for the message you would improve: a servo on a real bus answering for another servo is a collision, and the message could say so, and name both joints.

Going deeper