Files
apirrone 66384dd6ba mapd: the onboard map as a service, map.* (API v42)
mapd subscribes to robot.state and tof.frame like any client, feeds the maploc
mapper on its own thread, keeps the map in /var/lib/mapd/map.json across
reboots, and answers map.status, map.stream, map.grid and map.wipe on
/run/mapd/map.sock. It commands nothing: the robot walks without it, and the
head moves by robotd's own idle glances.

The map file is replaced atomically, saved every autosave_s, when the pose has
moved 30 cm and on shutdown; a file it cannot read is set aside as
map.json.bad-<secs>, never overwritten.

[map] in robotd.toml (on by default); robotctl map / map show / map wipe;
routed over WebRTC by mediad, refused over BLE. Packaged in both release
workflows and dev-push, named in install.sh, configd's unit list and
updater.toml. docs/design/mapping-design.md owns the mechanism.

Checked end to end against a recorded living-room session served over real
sockets: same 21 stops as the offline replay, saved on SIGTERM, and after a
restart relocalized within four stops onto the first run's nodes (2-3 cm).

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:16:02 +02:00
..