MeshRover

Robots that never need the internet, and stop safely when their AI is out of reach.

MeshRover

Created At

ETHGlobal Mumbai

Project Description

MeshRover is a fleet of warehouse rovers that never touch the internet. They talk to their base station only over an encrypted Offline Protocol mesh (MLS-sealed, peer to peer, Bluetooth for phones). Only the base goes online. At every junction a rover sends its camera frame over the mesh, and the base asks a TEE-attested 0G vision model what to do.

The problem: field robots in warehouses, farms, construction sites and disaster zones lose their link all the time. When their cloud brain is out of reach, most stacks carry on with a stale plan or fall back to a local guess nobody audited. Their local radio control is usually unauthenticated too, so anyone in range can send "go".

MeshRover fixes both:

  • No brain means stop. A rover moves only on a 0G decision that answers its pending sequence number before a 6.5 s deadline. A timeout, an answer that doesn't parse, an action it wasn't offered or a wrong seq all lead to SAFE_STOPPED. There's no local model, no default action and no cached plan. Turn off the base's Wi-Fi and the next rover to reach a junction stops and says why. The operator's phone still sees it over Bluetooth. Turn the Wi-Fi back on and the rover carries on.
  • A human signs off on risky moves. Before a rover enters the restricted zone C, the operator approves with World ID on their phone. The link reaches the phone over the mesh. The approval works once and expires after 10 s. Cancel, and the rover stays put.
  • Only the fleet's keys count. The fleet is an ENSv2 namespace (meshrover-demo.eth) with a subname for each robot, operator and the base. Each has a role, an expiry and its engine's mesh key. Both the base and the rover check every command and approval against this roster, offline too. When a contractor's subname expires, their approval is refused.
  • Every episode is on the record. Every decision (with its 0G request ID and the exact frame the model saw), safe-stop, approval and denial goes into one log file. When the episode ends, the log is uploaded to 0G Storage and its root is anchored on 0G Chain. The public dashboard at meshrover.app lists the anchored episodes, replays each one from 0G Storage and shows the ENS roster.

Rover A also has a real safety camera: the laptop's webcam is part of its checkpoint frame, and a hand over the lens makes 0G choose stop. A camera frame that is missing or stale also means stop. The rovers are simulated on a Mac for the demo, but each one already runs its own Offline Protocol engine and talks to the base only through it, never through the simulator. Moving to physical robots changes nothing in the mesh, the protocol or the safety checks: the robot runs the same engine with Bluetooth turned on (a config switch), and the simulator's motion and camera are swapped for the robot's own drivers.

Motion runs on the rover at 20 Hz and never waits on the network. 0G decides at checkpoints and keeps the record, and nothing a rover does waits on a blockchain.

How it's Made

Stack: one Node + TypeScript package (run with tsx, tested with node:test) for the base and the rover simulator, a Vite dashboard deployed as a Cloudflare Worker, Foundry for the contracts, and a React Native operator app for iOS and Android.

Offline Protocol (mesh): each rover and the base drive their own offline-protocol-service engine through its local JSON-RPC-over-WebSocket API. They share no memory, even though they all run on one Mac over loopback peer streams with no LAN. Rover B peers only with rover A, so its traffic is relayed. The base's engine also runs BLE, so the operator phones (React Native, @offline-protocol/mesh-sdk, Bluetooth only, internet off) join the mesh directly. The base exposes five mesh services: fleet.decide and fleet.approve (requests), and fleet.status, fleet.approvals and fleet.roster (subscriptions). Hacky bit: service bodies are only MLS-sealed once the two engines have a session, so each rover sends the base one direct message at startup to open it. Both sides then treat any unsealed body as doubt, which means a stop. The app shows each phone's hop count and how many frames it has relayed for others.

0G Compute: the base calls the 0G Router in verified trust mode (verify_tee: true, temperature 0, JSON output) with 0gm-1.0-35b-a3b, a TEE-attested (TDX) vision model. At startup the base checks that the model is listed, takes images and is TEE-attested, or it refuses to start. My spikes set a 6 s timeout on the base and a 6.5 s deadline on the rover. Turning thinking off cut the model's latency from 13-28 s to 1.6-2.6 s per frame. Every request ID and the response key are logged, so each move traces back to a 0G call.

0G Storage + 0G Chain: when the episode ends, the base uploads the JSONL log, which holds every frame, so the root covers the frames too. It then calls EpisodeAnchor.anchor() on Galileo, retrying every 15 s while offline. It checks rootOf() first, so a rerun can't anchor twice. The dashboard reads the anchor events with eth_getLogs straight from the browser, downloads the file from the storage indexer by its root and replays it frame by frame.

World ID: robots have no browser, so the base runs World's OAuth device flow. The link and code travel to the operator's phone over the Bluetooth mesh, the only place an approval can happen. The base validates the ID token itself, maps it to an enrolled fleet name and issues a single-use approval. World sub values are never logged or published.

ENSv2 (Sepolia): a Foundry script registers meshrover-demo.eth and a subname for each robot, operator and the base, each with its own PermissionedResolver. Text records hold the role, the member list and the engine's signed mesh invite, using ENSIP-5 keys in the fleet's own namespace plus ENSIP-26 agent-context and agent-endpoint on the robots. The base reads the roster with viem every 60 s, turns each invite into a mesh address through the engine's parse_invite and publishes the roster over the mesh. Rovers cache it, so expiries are enforced offline. authorize() checks expiry, then role, then mesh key, on both the base and the rover.

Safety camera: ffmpeg grabs the webcam at 2 fps, writing each frame atomically. A reader outside the motion loop decodes the newest one and composites it into the same 640x240 JPEG as the drawn view. The request format, the episode hash and the replay stay the same, and a frame older than 2s means a safe-stop.

Also notable: every safety check (parseDecision, acceptDecision, authorize, acceptApproval) has tests for its reject paths. I found a mesh SDK relay bug (each BLE phone counted as two neighbours and pushed rover B out of the base's relay fanout) and worked around it by raising the fanout on the base. I also built a local mock 0G Router for development, but its episodes are labelled and can never be recorded on chain.

background image mobile

Join the mailing list

Get the latest news and updates