Navigation · Theory · M10
M10-T1 — Designing a Navigation System
A navigation system is not a planner plus a controller. It is a set of promises, a division of labour, numbers with reasons, and a plan to find out whether the promises hold.
The labs of this track each fix one piece. A real project starts earlier and ends later: what must Scout do on a shift, which part is responsible for each promise, where does every number come from, and how will anyone know it works? This lesson turns the whole track into one design process.
Learning objectives
After this lesson, you should be able to:
- Write navigation requirements that are measurable and can be checked by a named test.
- Allocate requirements to an architecture of planner, speed policy, safety layer and recovery.
- Derive parameters from requirements and physical limits instead of tuning them by feel.
- Plan validation with acceptance criteria and a count of trials that can support a claim.
The intuition
Imagine handing Scout to a night nurse. You would not say “it navigates”. You would say how fast it goes, which doors it can pass, what it does when somebody steps in front of it, when it gives up and calls for help, and what it cannot do (it cannot see glass). That list is the requirements. Who answers for each item is the architecture. The numbers behind each item are the parameter plan, and the evidence you would show the nurse is the validation plan.
Designing is going from the list to the evidence on purpose. If you tune parameters first and write the requirements afterwards, the requirements will describe what the robot happened to do. The track teaches the engineering concepts for each step. It does not replace the safety process that a real product in a real hospital must follow (lesson M10-T2).
The mathematics
1. Requirements
A good requirement says what, how much, under which conditions, and how it will be checked. “Avoid people” cannot be tested. “Stop with at least 0.30 m between robot and person when a person appears 1.5 m or more ahead at speeds up to the zone limit” can.
| ID | Requirement | Why | Checked by |
|---|---|---|---|
| R1 | At least 5 of 6 deliveries on time; urgent ones always | Medicines have deadlines | Hidden-shift simulation, field log |
| R2 | Zero contact with people or fixed obstacles | Harm to people is not traded for time | Simulation, bench stop tests, field trial |
| R3 | Stop within the free distance at any speed the system allows | Latency and braking are physical | Stopping-distance test on the real robot |
| R4 | Never wait for an obstacle that cannot clear; ask for help in 40 s | A stuck robot blocks a corridor | Recovery table review, scripted blockages |
| R5 | Return to the dock with at least 10 per cent battery | A dead robot is an obstacle | Energy budget, shift log |
2. Architecture
Give every promise one owner and one interface, so that when a test fails you know which part to open.
| Part | Owns | Interface | Typical failure it must contain |
|---|---|---|---|
| Dispatch | Order of stops, deadlines, battery plan | List of stops in, ordered list out | Urgent delivery served last |
| Global planner | Route on the map | Start, goal, grid in; cells out | Route through a closed door |
| Speed and control | Speed from free distance and zone | Distance and limit in; speed out | Too fast to stop |
| Safety layer | Stop on contact or violation | Independent of the planner | Planner fault turning into motion |
| Recovery | What to do when blocked | Reason, time waited, detour in; action out | Waiting for glass forever |
| Costmaps and perception | What is where | Sensor data in; layers out | Ghost obstacle, invisible glass |
3. Parameter plan
Every parameter gets a value, a source and a check. Many follow from physics. With reaction time tr, deceleration a and margin m, the speed at which the robot can stop in a free distance d is:
- tr
- time from detecting an obstacle to the brakes taking hold, in seconds.
- a
- deceleration the brakes can reliably deliver, in m/s².
- m
- margin kept between the robot and the obstacle after stopping.
- d
- free distance the sensors can vouch for, in metres.
| Parameter | Value | Source | Verified by |
|---|---|---|---|
| Inscribed radius | 0.22 m | Footprint plus localisation error (lesson M2-T3) | Costmap picture, door pass test |
| vmax, a, tr, m | 1.2 m/s, 0.8 m/s², 0.3 s, 0.3 m | Datasheet, bench measurement | Bench stop test |
| Zone limits | 0.6 m/s junction, 0.5 m/s glass atrium | Sensor range (0.8 m sonar for glass) | Stop test at the limit |
| Wait before detour | by cost: detour time vs time left | Door cycle 30 s, detour speed 0.8 m/s | Scripted door cycle |
4. Validation plan
- Unit tests for pure functions: planner optimality, safe speed, recovery decisions. Cheap and exact (labs M10-L1 stages 1 to 3).
- Simulation on hidden shifts with timings you did not tune on. Tells you about interaction between parts (stage 4).
- Bench and track tests that measure what the simulation assumes: stopping distance, sensor range, latency.
- Field trial in the real building, with a person responsible and a plan for stopping.
Acceptance criteria are fixed before the runs. For rare failures, the number of trials matters: with zero failures in n independent trials, the 95 per cent upper bound on the failure rate is about 3/n (the “rule of three”).
A worked example
Stopping distance. With tr = 0.3 s, a = 0.8 m/s² and m = 0.3 m:
The laser vouches for 4 m, so 1.2 m/s is acceptable in an open corridor. A sonar that sees glass only at 0.8 m allows v = 0.8 × (−0.3 + √(0.09 + 2 × 0.5 / 0.8)) = 0.69 m/s at most, so the atrium zone limit of 0.5 m/s has a margin of 0.69 − 0.5. That is a requirement-to-parameter derivation.
Shift budget. Suppose the requirement is 40 deliveries in an 8-hour shift on legs of 90 m, with out and back, 30 s at each handover and an allowance of 20 s per delivery for blockages.
If the speed policy cut the mean speed to 0.6 m/s, travel becomes 300 s, the cycle 350 s and the shift 3.9 h; energy grows to 142 Wh and the margin to 11 per cent. Slowing down for safety is paid for in margin, which is why the zone limits apply only where the reasoning says they are needed.
How many trials? To support “fewer than 1 contact per 1000 deliveries” with 95 per cent confidence and zero observed, you need about 3 / 0.001 = 3000 failure-free deliveries. Simulation counts only as far as the simulator is believed (lesson M10-T2).
Engineering implications and limitations
Trace every number
Keep a table from requirement to parameter to test, and keep it in the same repository as the configuration. When a test fails, the table tells you which requirement is at risk. When a parameter changes, it tells you which tests to repeat.
One configuration, versioned
The footprint, the limits and the thresholds should live in one versioned file read by every component, with a hash in the logs. Many “mysterious” field failures are two components running different values (lesson M2-T3).
Do not tune on the test set
If you adjust parameters until the hidden shifts pass, they are no longer hidden. Keep a set of timings you do not look at until the end, and generate new ones when you have looked.
Plan the unknowns
A design should say what it assumes (the map matches the building, doors cycle, people walk), what it does not handle (glass the sonar misses in the dark, a stuck brake), and what the robot does when an assumption fails. The last part is recovery, and it deserves as much design as the happy path.
Monitor after launch
Count blockages by cause, help calls, near misses and late deliveries. A requirement that was true on the day of the trial may drift as the hospital changes.
Common misconceptions
“Requirements are paperwork written after the system works.”
Written afterwards they describe the system you built. Written first they decide which tests you need and which parameters you may not trade away.
“Good tuning replaces a validation plan.”
Tuning finds numbers that pass the cases you looked at. Validation asks whether they pass cases you did not choose, and how many.
“A passing simulation shows the robot is safe.”
It shows the code behaves as intended in the simulator’s world. The world, the sensor models and the people are all assumptions that need their own evidence.
“Slower is always safer.”
Slower reduces stopping distance, but it also lengthens exposure, makes deadlines miss and drains the battery. Limits belong where the hazard is.
Engineering takeaways
- Write requirements that state a quantity, a condition and a check.
- Give every promise exactly one owner in the architecture, with a narrow interface.
- Derive parameters from physics and sensor limits, and record the source of each.
- Decide acceptance criteria before running, and count the trials a claim needs.
- This track teaches engineering concepts; it does not replace the safety process of a real product.
References and further reading
The Nav2 documentation and the standards that frame safety requirements for mobile robots, cited by title only.
- S. Macenski, F. Martín, R. White and J. Ginés Clavero, “The Marathon 2: A Navigation System”, IEEE/RSJ IROS, 2020.
- Nav2 documentation, “Navigation Concepts”, “Configuration Guide” and “Tuning Guide”, docs.nav2.org.
- ISO 3691-4, “Industrial trucks: Safety requirements and verification: Part 4: Driverless industrial trucks and their systems”.
- ISO 13482, “Robots and robotic devices: Safety requirements for personal care robots”.
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
A robot has tr = 0.3 s and a = 0.8 m/s². How far does it travel while stopping from 1.0 m/s, and how much free distance does it need with a 0.3 m margin?
Explanation
Reaction: 1.0 × 0.3 = 0.30 m. Braking: 1.0² / (2 × 0.8) = 0.625 m. Total 0.925 m, and 1.225 m with the margin.
Question 2
Why is “the robot shall avoid people” a poor requirement, and how would you rewrite it?
Explanation
It has no quantity, condition or check. Rewrite it with a distance, a speed range and a test, for example: “stop with at least 0.30 m to a person who appears 1.5 m or more ahead, at any speed up to the zone limit, verified by a bench stop test.”
Question 3
A field trial of 600 deliveries shows no contact with a person. What failure rate can you claim at 95 per cent confidence?
Explanation
About 3 / 600 = 0.5 per cent (one in 200) as an upper bound, assuming independent trials. It does not support a claim of one in 1000.
What’s next
Next: how to argue for the design, with evidence, and how to state what it does not cover.
Related content
Nothing below is required to finish this lesson.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.