Concepts
Every stop
One table of every way a bot stops: what starts it, what the motors do, whether it stays stopped, and how to drive again. The rules behind each are in the protocol reference, and why they’re built this way is on Safety.
Read this first
- An on-screen button is not an emergency stop. The e-stop on a page or in the driving tool is a message sent over Wi-Fi. If the Wi-Fi, the broker or the computer is down, it can’t arrive. What still stops the bot then is its own command timeout, half a second after commands stop coming. For a real bot, the stop to count on is your hand: pick it up or switch it off.
- Closing the tab isn’t a stop. Driving by hand, the bot stops because the commands stop: within half a second. A go-to keeps going, because the station steers it, not the page.
- The simulator acts out the same rules. The firmware’s stops are checked by its tests and acted out by the simulator. None has been tested on a finished car yet.
The stops
“Stays stopped” means it holds until someone does something about it. A stop that doesn’t stay stopped lets the bot drive again on the next command.
| Stop | What starts it | What the motors do | Stays stopped | To drive again | Decided by |
|---|---|---|---|---|---|
| E-stop | Anyone’s own e-stop (estop/<name>), from the driving tool or a page |
Stop at once; every command is ignored, identify included | Yes, until every e-stop that’s on is cleared. You clear your own; on the cluster’s broker an admin can clear anyone’s | Clear it, then send a fresh command | The bot, from the broker: not the station (rule 3) |
| An e-stop that names bots | A stop sent with a list of bots. Only a bot that says estop_bots in its hello understands the list: one that doesn’t refuses the whole message and wouldn’t stop, so a sender names bots only when every one it names said estop_bots, and otherwise stops every bot |
The named bots stop; the rest carry on | As above, for the named bots | As above | The bot (rule 3) |
| Stop | The holder’s stop request to the station | Stop now | No: the holder still holds the bot | Drive again | The station |
| Let go | The holder releases the bot | The station sends a stop and stops streaming | No | Anyone may take it and drive | The station |
| Command timeout | No command for 500 ms: the station stopped, or the network between it and the bot down | Stop; timeout_stop |
No | The next command drives | The bot (rule 2) |
| The station’s dead-man | A client driving by hand goes quiet for 500 ms: the page or tab closed, the computer asleep, its network down | The station sends a stop itself | No | Drive again | The station |
| A go-to ending | Arrived, lost (no position for 2 s), not there after 30 s, blocked for 3 s, an e-stop, the bot offline or its battery empty | Stop there; the holder is told why | No | Drive or send another go-to | The station |
| The reflex | The front sensor sees an obstacle or the desk’s edge ahead. A bot with a rear sensor too (tof-rear in its hello: Pirate Stage) does the same backwards; one without has no sensor behind it. A sensor that stops answering counts as the edge |
Drops only the part of a command that drives toward it: turning and backing away still work; obstacle_stop or edge_stop |
No: it lets go once the readings are normal again | Turn or back away | The bot (rule 9) |
| Stall cutoff | A motor driven but not turning: its encoder says so (Pirate Stage); the motor driver cuts out on overcurrent or heat, or the IMU doesn’t hear the motors turning (gl_zero) | That motor off on Pirate Stage, all four on gl_zero; stall_stop |
Yes, until that side is asked for nothing or the other way (Pirate Stage), or both sides for nothing (gl_zero) | Ask for nothing, then drive | The bot (rule 10) |
| Empty battery | The battery reads empty | Motors stop; battery_empty. The station won’t drive it, and a go-to ends |
Yes, until the battery reads charged | Charge it | The bot and the station (rule 10) |
| Low battery | The battery reads low | Nothing: a warning, battery_low |
No | Keep driving, and charge it soon | The bot |
| Loop watchdog (Pirate Stage only) | The firmware’s main loop doesn’t come round for 15 s | The board restarts: its pins let go and both motor drivers sleep | Until it has restarted and connected | Drive again once it’s online | The bot |
| More than eight e-stops at once | A ninth person’s e-stop while eight are on | Stays stopped | Yes, until the bot restarts | Clear the e-stops, then restart the bot | The bot (rule 3) |
Not on this page yet
The car’s own power switch and pulling its battery pack are the stops that don’t need anything else to work. They’re added here once a car is built and they’ve been tested on it.