Unit 07 · overview

Unit 7: Programming Robot Behavior

Code is only useful if the physical meaning survives the trip

A line such as motor = 0.5 looks simple. It hides units, limits, ownership, timing, and an assumption about what the actuator will do.

This Unit connects software structure to observable robot behavior.

From Command to Motion traces values through software and hardware boundaries. Timing, Loops, and Nonblocking Code shows why a correct command can still arrive too late. Program a Behavior You Can Explain turns requirements into test cases and an execution trace.

Your program needs a contract

Produce a behavior specification, pseudocode or code, and boundary test table.

At minimum, define inputs, outputs, units, legal ranges, invalid-data behavior, and one stop condition. Then test edge values rather than only the comfortable middle.

The code is not the evidence by itself

A source file proves what you wrote. A trace, simulation, log, or observed result helps prove what executed.

Keep both when possible. Later Units on feedback and autonomy depend on this distinction between command and behavior.