Guides
Run the acceptance run
Milestone 1’s last check (the roadmap, “The car alone”): one script drives the car and passes or fails on how far off it ends up. It drives through the station, as any client does.
- A go-to to the corner of a square centred on the desk (or
--goto X,Y). It passes if the car stops within 5 cm of the point. - A square, 0.30 m a side (
--side). The car turns to face along the desk, then drives each leg by its own odometer, holding its heading by its gyro, and turns each corner by the gyro: anticlockwise if the square fits on the desk, else clockwise. It passes if the car ends within 5 cm of where the square began, facing within 10°. - The encoders: the odometer’s length for the four legs against the length the position service saw. It passes within 5%.
The limits are proposed, to tighten once the car’s real numbers are in. Each check’s line says what it measured.
In the simulator
scripts/broker up
scripts/station up
scripts/sim up 1 --type pirate-stage
scripts/accept --bot sim-1
acceptance run: sim-1 on fleet desk, a go-to and a 0.30 m square (passes when each ends within 5 cm)
go-to: x 0.450 y 0.250
square: 0.30 m a side, anticlockwise, from x 0.466 y 0.263
go-to PASS ended 2.1 cm from its point (5 allowed)
square PASS ended 0.4 cm from where it began (5 allowed), facing 1.0° off (10 allowed)
encoders PASS its odometer read 1.225 m over the four legs, the position service saw 1.225 m: +0.0% (±5% allowed)
PASSED
It exits 0 if every check passes, 1 if not. The page shows the run as it goes.
What it needs from the bot
Encoders and a gyro, in its hello, and odo_l_m, odo_r_m and heading in its telemetry. gl_zero’s firmware counts
its encoders but sends no odometer, so it’s refused. On Pirate Stage the odometer appears once its encoders’ counts a wheel turn are measured
(Pirate Stage). Measure its gyro’s scale first too
(The gyro’s scale): a gyro as read can be 3 % off, up to 10.8° on the
square’s corners, past the 10 it allows.
It also needs a position service publishing the bot’s pose: the simulator does. A real desk’s is the overhead
camera (Set up the overhead camera): until one’s set up, run it by hand.
By hand
scripts/accept --bot BOT --by-hand
No position service: you’re it, with a tape measure and something to mark the desk with (masking tape and a pen). The car steers itself the whole way by its odometer and gyro, the go-to too, still through the station. It stops and asks at each step:
- A straight. Mark the desk at the middle of the car’s nose; it drives 50 cm by its odometer. Type how far the nose is from the mark, in cm. That’s the encoders’ check: its odometer against your tape, within 5%.
- The square. Mark the nose again; it drives the square, to the left (
--clockwise: to the right). It needs about 50 cm clear ahead and to that side. Type how far the nose ends from the mark, in cm, and how many degrees it’s turned from the way it started. Within 5 cm and 10°. - A go-to. Mark a point 30 cm ahead of the nose and 20 cm to its left. It turns to face the point and drives until its nose should be on it. Type how far the nose ends from the point. Within 5 cm.
It holds the car still while it waits, however long you take. Answers are numbers (1.5); anything else, it asks
again. Ctrl-C stops the car and ends the run.
encoders PASS its odometer read 0.506 m, you measured 0.500 m: +1.2% (±5% allowed)
square PASS you measured 1.0 cm from where it began (5 allowed), 2.0° off (10 allowed)
go-to PASS you measured 1.5 cm from its point (5 allowed)
PASSED
The go-to allows for the nose being ahead of the car’s middle, the point it turns about: half its length, from its
type (9.6 cm on Pirate Stage). --nose M says otherwise.
When it stops early
It stops the car, lets go of it, and says why:
| It says | Means |
|---|---|
has no encoders or an odometer in its telemetry |
Not a bot it can run, or its encoders aren’t measured yet |
nothing heard from BOT in 10 s |
No hello, telemetry or pose for that bot: is it online, and is something publishing its pose? (By hand, no pose is needed.) |
the station refused: ... |
The station’s notice: held (another client is driving it), estop, battery_empty, offline |
its odometer isn't counting forward |
It drove a leg for 1.5 s and the odometer didn’t go up: an encoder counting the wrong way (encSign) |
no room for a 0.30 m square |
The go-to ended too near an edge for the square, either way round: a smaller --side, or another --goto |
a 0.30 m leg not done in 20 s, a turn not done in 20 s |
Too little power to move it: the powers in accept/gunkaccept/run.py are starting points |
scripts/accept options lists the options; scripts/accept test runs its tests, which play it on the simulator and
station code.