# Week 1 — Systems, Python, frames, and safety

DIS OpenLab · Foundations of Autonomous Systems · v0.1.0-prepilot · 2026-10-15
Track: simulation-first; optional de-energized hardware inspection
License proposal: CC BY 4.0 for original text, pending rights review

## Learning objectives

By the end, a learner can:

1. describe a robot as sensing, computation, actuation, power, structure, and environment;
2. distinguish world, robot, and sensor coordinate frames;
3. write and test a small Python function with named inputs and outputs;
4. attach units to physical quantities and logs;
5. explain why invalid input, lost updates, or disabled operation must produce a safe stop.

## Required resources

- Python 3.11 and the supplied starter folder; Webots is optional this week.
- Text editor and terminal, or printed code/listing if computers must be shared.
- Student lab record. Do not connect a motor or battery for this lesson.

## Safety boundary

Simulation has no physical motion hazard, but students must still practice stop-state reasoning. Hardware inspection is de-energized and adult-supervised. Never connect a motor directly to a microcontroller GPIO. Do not handle swollen, damaged, hot, or unprotected cells.

## Session A — map the system

1. Draw blocks for sensor, controller, motor driver, motors/wheels, power, chassis, environment, and human stop action.
2. Add arrows and label each as measurement, command, power, or mechanical force.
3. Mark the boundary between controller logic and platform adapter.
4. Define axes: world +x/+y, rover forward +x, yaw positive counter-clockwise.
5. Identify three faults. For each, state the detected symptom and safest output.

Instructor check: learners should not claim that a sensor “knows” distance unless its conversion and limits are defined. A raw value, normalized obstacle signal, and metres are different quantities.

## Session B — run a bounded function

Open `controller_core.py`. Locate `Measurements`, `ControllerState`, and `step_controller`. Run:

```text
python -m unittest discover -s tests -p "test_*.py"
python run_scenarios.py --output week-01-telemetry.csv --steps 12
```

Record the exact Python version, command, pass/fail result, and output filename. Open the CSV and answer:

- Which columns are inputs, state, commands, and estimated pose?
- What units are attached to time, speed, distance, and angle?
- Why is `obstacle_level` unitless and not a metric range?
- Which input causes an explicit zero command?

Change only `--steps` and repeat. Do not edit expected test results to obtain a pass.

## Student lab sheet

Name or pseudonymous assessment ID: ______  Date: ______  Team: ______

| Item | Record |
|---|---|
| Python version | |
| Controller version/hash | |
| Command used | |
| Tests passed/failed | |
| Telemetry row count | |
| First mode and reason | |
| Identified safe-state trigger | |

System diagram attachment/reference: ______

Three fault → response pairs:

1. ______ → ______
2. ______ → ______
3. ______ → ______

## Evidence to submit

- the exact first program/command and terminal result;
- annotated system and coordinate-frame diagram;
- 12-row telemetry file;
- one paragraph separating controller core from simulator/firmware adapters;
- completed safety preflight.

## Instructor notes and misconceptions

- A coordinate value without a frame and unit is incomplete.
- “The test passed” means only the named automated assertions passed; it is not a hardware or Webots result.
- Desktop Python source is not automatically valid MicroPython or embedded C/C++.
- A software zero command is necessary but does not replace a physical isolation mechanism.

Formative check: give a stale sensor update and ask for the commanded state. Expected reasoning: a watchdog limit is exceeded, so wheel targets are zero.

## Low-bandwidth and accessibility option

Print this file and the first 120 lines of `controller_core.py`. Learners may trace two calls by hand using a calculator. Read column headers aloud and provide a text description of every diagram. All required responses can be typed; no color-only distinction is required.

## Exit ticket

Write one sentence containing a value, unit, frame, and timestamp, then name the adapter that would obtain it in Webots and the different adapter that would obtain it on a physical board.
