Module 6: Reproducing This Workshop, and What's Next
Reproducing every experiment here
Everything in Modules 1-4 was captured on a checkout with cereal and msgq already built and
tools/replay/replay already compiled. From a fresh checkout:
# Python environment (this repo is uv-managed)
uv pip install markdown beautifulsoup4 pygments # only needed to regenerate this workshop's HTML
source .venv/bin/activate
# Build cereal, msgq, and tools/replay (scons is already a project dependency)
scons -j$(nproc) tools/replay
Then, for Modules 1-2:
python3 sunnypilot-architecture/snippets/process_inventory.py
./tools/replay/replay --demo --no-vipc -c 3 -s 45 &
python3 sunnypilot-architecture/snippets/dump_msgs.py
and for Module 4:
./tools/replay/replay --demo --no-vipc -c 5 -x 3 --no-loop &
python3 sunnypilot-architecture/snippets/dump_state_transitions.py
--demo fetches a fixed, published route (5beb9b58bd12b691/0000010a--a51155e496) from comma's
servers the first time it's run and caches it locally after that — no comma account, car, or
hardware required. Module 5 has no reproduction steps of its own: it's read directly from
opendbc_repo/opendbc/safety/ against docs/SAFETY.md, both already in this checkout.
Where the series goes next
This workshop stayed deliberately narrow: the process architecture, the messaging layer, one traced instant, the engage/override state machine, and the safety boundary — enough to navigate the codebase and know where to look, not enough to make a change yet. Candidate follow-ons, each assuming everything above:
- Workshop 2 — Planning & control internals.
longitudinal_planner.py'smin(e2e, mpc)race from Module 3 was one instant; a full workshop onselfdrive/controls/lib/would trace the MPC solver itself, lateral control, and how actuator limits from Module 5 shape what the planner is even allowed to ask for. - Workshop 3 — Car ports & the CAN protocol. Module 5 stopped at the safety boundary; the
next layer down is
opendbc's per-brand CAN signal definitions and how a new car gets supported at all. This is also the most concrete path toward a first contribution: car support PRs are the most common entry point into this codebase. - Workshop 4 — sunnypilot's own feature layer. Module 4 traced one MADS transition; a full
workshop on
sunnypilot/would cover the rest of what's added on top of openpilot: sunnylink's cloud features, model management, and the settings/UI layer.
If you have a specific first contribution in mind already, that's a reasonable way to pick which of these to run next rather than taking them in order.