A bike-lane-sized robot sweeper that runs NYC's lanes between 4 and 6 a.m., sees broken glass with Google DeepMind's Gemini Robotics models, sweeps it, and logs every cleared spot to a shared map.
Who it's for
The park is the reward. The ride in from the Bronx is the problem: over the Willis Avenue Bridge, down 1st Ave through East Harlem, across 111th St to the park's north end. Bottles get smashed overnight outside bars and bodegas, swept into the lane by street cleaning, and ground into small shards by morning delivery traffic.
"Central Park is my haven. Getting there is the hell."Persona: daily commuter, Bronx → Willis Ave Bridge → 1st Ave → E 111th St → park at 110th
What a flat costs this rider (persona estimate)
| Replacement tube, once a week | ~$9 × 52 |
| Tire replaced early from cuts, 3× a year | ~$55 × 3 |
| Roadside time, 15 min a flat | 13 hrs/yr |
| Rides skipped after a flat morning | uncounted |
| Direct cost before time | ≈ $633 / yr |
Illustrative numbers for the persona, not survey data. The demo's first success metric is flats per 1,000 rider-miles on swept corridors versus unswept ones.
Today vs. Lanekeeper
New York's Sanitation Department sweeps protected lanes with small staffed machines, aiming for every lane once a week. Glass that lands the night after a pass waits for the next one unless someone reports it to 311.
Every staffed mini-sweeper needs a person in the cab for the whole shift.
Routes run on a fixed timetable whether or not glass has landed.
Riders file a request; in 2025 the median broken-glass report took 22 hours to close.
| TodayStaffed mini-sweeper | ProposedLanekeeper | |
|---|---|---|
| Who drives | An operator in the seat, every shift | No one; one remote supervisor watches about 10 robots |
| Where it sweeps | Every lane on the route, glass or not | Lane cells ranked by recent glass and rider reports |
| How often | Goal of once a week per lane | Every night, 4–6 a.m., on the worst cells |
| Reporting glass | 311 form or call, 2–4 min est. | Text a photo to GLASS (45277), under 30 s est. |
| Report to cleared | 311 broken-glass reports: 22 h median, 70 h for the slowest tenth (2025) | Target: next night's run, under 24 h |
| Proof it's clean | The 311 request shows closed | Public run report with time and lane cell, by QR code |
The machine
It has to fit inside a protected lane with room for an early rider to pass, so the design envelope is 0.8 m wide and 0.55 m tall. The camera sits low and looks forward and down, which is the angle that makes glass flash.
How it sees glass
A sweeper moving at walking pace can't wait on a round trip to the cloud before it brushes. So it splits the job: a small on-board detector reacts in real time, and Google DeepMind's Gemini Robotics-ER model verifies, points, counts and decides whether a second pass is needed.
The strobe fires in alternating polarized frames. Glass returns a hard specular flash that asphalt, paint and leaves don't. A compact edge detector flags candidate patches and drops the brooms immediately.
~30 fps · <50 msFlagged frames go to gemini-robotics-er-2-preview with a prompt to point at every shard, returning [y, x] points normalized 0–1000 plus a shard estimate. It rules out ice, clear plastic, reflectors and wet leaves.
Points become a sweep path: the robot shifts its line toward the cluster, slows, and widens the brooms. Through function calling, the model can also call request_second_pass or skip_cell when a parked car blocks the lane.
The rear camera re-checks the patch. If Gemini finds nothing left, a remediation row is written to Supabase with time, cell and shard count, and the live map updates for every subscribed app.
1 write per cleared spotAs of October 2026, Google lists gemini-robotics-er-2-preview and a streaming variant for live video. The earlier gemini-robotics-er-1.6-preview was deprecated on Aug 31, 2026, so the build should target ER 2. Pin the model ID in config and re-check before field trials; preview IDs change.
These are two street photos of broken glass. Checking sends each one through the deployed verify-glass function to Gemini, which points at every glass cluster and estimates the shard count. Add your own photo in the third slot.
Checks run through your Supabase connection. Results are also saved to the frame_checks table.
Map data strategy
Glass is a point problem, but riders and routing engines think in streets. The fix is a stable middle unit: the lane cell. Everything the sweeper sees, clears or misses is keyed to one.
Import NYC DOT's bike routes from NYC Open Data (dataset mzxg-pwib, GeoJSON) into PostGIS weekly. Keep the DOT segment ID and facility type so protected lanes, painted lanes and greenways can be planned differently.
Split each segment into 25 m pieces with ST_LineSubstring and give them stable IDs like MN-1AV-0412. When DOT redraws a segment, cells are re-matched by geometry, so history survives.
Join signals that predict glass: 311 street-condition complaints, Saturday and Friday nights, nearby bars and venues, DOT street closures and construction. These raise a cell's score before the robot has ever seen it.
Detections and remediations as points, snapped to the nearest cell with ST_ClosestPoint. Raw frames stay in storage with faces and plates blurred on board.
Each evening the planner ranks cells by hazard H and builds the night's route: the highest-hazard cells on commuter corridors first, finished before 6 a.m., within one battery.
Schematic outline with approximate lane lines. Colored hotspots are simulated; green-ringed markers are real cleanups read live from Supabase.
| Cell | Cleared | Shards | Passes | Gemini point | Location |
|---|
| Cell | Street | H | Tonight's priority |
|---|
Supabase
Supabase gives the project Postgres with PostGIS for geometry, Storage for frames, Edge Functions to call Gemini with the key kept server-side, Realtime to push every cleared spot to apps, and row-level security to separate public data from fleet data.
create extension if not exists postgis; -- L1: NYC DOT bike routes (Open Data mzxg-pwib) create table lane_segments ( id bigint primary key, street text, facility text, -- protected, painted, greenway borough text, geom geography(LineString, 4326) not null, source_ver date not null ); -- L2: stable 25 m cells create table lane_cells ( id text primary key, -- MN-1AV-0412 segment_id bigint references lane_segments, seq int, geom geography(LineString, 4326) not null ); create index on lane_cells using gist (geom); create table sweepers (id text primary key, name text, depot text); create table runs ( id uuid primary key default gen_random_uuid(), sweeper_id text references sweepers, started_at timestamptz, ended_at timestamptz, planned_cells text[] ); -- L4: what the robot saw create table detections ( id uuid primary key default gen_random_uuid(), run_id uuid references runs, cell_id text references lane_cells, seen_at timestamptz not null, location geography(Point, 4326) not null, edge_conf real, er_verdict text check (er_verdict in ('glass','not_glass','unsure')), er_point int[], -- [y, x] normalized 0-1000 est_shards int, frame_path text -- Storage, blurred on board ); -- what it fixed create table remediations ( id uuid primary key default gen_random_uuid(), detection_id uuid references detections, cell_id text references lane_cells, cleared_at timestamptz not null, passes int default 1, confirmed boolean, after_path text ); -- push every clear to apps and partner maps alter publication supabase_realtime add table remediations; -- hazard ranking for tomorrow night's route create materialized view cell_hazard as select c.id, coalesce(sum(d.est_shards * exp( -extract(epoch from now() - d.seen_at) / (3*86400))), 0) as decayed, count(d.id) filter (where d.seen_at > now() - interval '30 days') as recur_30d from lane_cells c left join detections d on d.cell_id = c.id and d.er_verdict = 'glass' group by c.id; -- public can read clears; only the fleet's service role writes alter table remediations enable row level security; create policy "public reads clears" on remediations for select using (true);
// supabase/functions/verify-glass/index.ts import { GoogleGenAI } from "npm:@google/genai"; import { createClient } from "npm:@supabase/supabase-js@2"; const ai = new GoogleGenAI({ apiKey: Deno.env.get("GEMINI_API_KEY")! }); const db = createClient( Deno.env.get("SUPABASE_URL")!, Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")! ); const PROMPT = `Ground-level frame from a bike-lane sweeper. Point to every piece of broken glass. Ignore ice, clear plastic, road reflectors and wet leaves. Answer as JSON: [{"point": [y, x], "label": "broken_glass", "shards": n}] Points are [y, x] normalized to 0-1000.`; Deno.serve(async (req) => { const { detectionId, frameB64 } = await req.json(); const res = await ai.models.generateContent({ model: "gemini-robotics-er-2-preview", contents: [{ role: "user", parts: [ { inlineData: { mimeType: "image/jpeg", data: frameB64 } }, { text: PROMPT }, ]}], config: { responseMimeType: "application/json" }, }); const pts = JSON.parse(res.text ?? "[]"); await db.from("detections").update({ er_verdict: pts.length ? "glass" : "not_glass", er_point: pts[0]?.point ?? null, est_shards: pts.reduce((n, p) => n + (p.shards ?? 1), 0), }).eq("id", detectionId); return Response.json({ points: pts }); });
Who else wants this data
The sweeper's real product may be the dataset. Nobody else knows, cell by cell, where glass lands, how often, and when it was last cleared.
A push at 5:45 a.m.: your route is clear, or one cell on 1st Ave still has glass, take 2nd.
Realtime · remediationsA hazard penalty for bike routing in apps like Google Maps, Apple Maps or Strava, so routes avoid fresh glass.
Tile API · cell_hazardHotspot reports that show where to add bins, change sweep schedules, or harden a buffer.
Weekly export · GeoJSONFewer flats across thousands of fleet bikes, and a way to measure it against swept corridors.
Partner API · per-corridorPrivacy by default. Faces and license plates are blurred on the robot before any frame leaves it. Public feeds carry only cell, time and counts. Raw frames are kept 30 days for model quality review, then deleted.
Riders report glass
No app to install. A rider texts a photo to GLASS (45277) or sends it on WhatsApp. Gemini checks the photo, the location comes from the photo or a quick reply, and the spot joins tonight's sweep queue.
Twilio receives the MMS or WhatsApp message and calls the sms-glass function, which rejects anything without a valid Twilio signature.
Location comes from the photo's GPS metadata when it survived the trip. If not, the reply asks for a WhatsApp location pin or the nearest cross streets, matched with NYC Planning's GeoSearch.
Gemini Robotics-ER confirms glass, counts pieces, rates severity and notes whether it's on a bike lane, so litter and ice don't fill the queue.
The report snaps to the nearest 25 m lane cell, raises that cell's hazard score, and is queued for the next 4–6 a.m. run. Phone numbers are stored only as salted hashes.
| Channel | How it reaches Lanekeeper | Photo location |
|---|---|---|
| SMS / MMS | Text 45277. iPhones send texts to a short code as MMS, not iMessage, so iPhone and Android users both work. | Kept if the phone and carrier leave GPS in the photo; otherwise asked for |
| WhatsApp can't use short codes, so it needs a regular number registered as a WhatsApp Business sender. | Usually stripped; riders send a location pin instead |
After every run
When a sweeper finishes, the database writes a public report for that run: when it ran, how many glass spots it cleared, how many shards, and where. A QR code on lane signs, the sweeper's back panel and the depot door opens it on any phone.
runs.ended_at when it docks.run_reports with the run's cleanups.2026-10-10-lk-01 · 3 spots · 43 shards
The pilot ask
Lanekeeper sweeps the 1st and 2nd Ave protected lanes from E 14th St to E 125th St every night, with an attendant on every run, on top of DSNY's weekly pass. Robots sweep only after two weeks of detect-only runs prove 90% accuracy.
What we ask of the city