feat(evals): Habitat navigation benchmark: text-only arms, planner arm, video, parallel cases - #4216
Draft
spomichter wants to merge 16 commits into
Draft
spomichter wants to merge 16 commits into
spomichter wants to merge 16 commits into
Conversation
…m, video, parallel cases One launch (`habitat-nav mcp-server demo-objects nav-skills`) serves every arm of a go-to-object benchmark on Habitat scenes: the planner alone, the TypeSafe reactive agent, coding agents with dimOS (`go_to` / `stop_navigation` / `finish` tools) and without it (`world_state`, `cmd_vel`, `finished` over the raw bridge). - Habitat native publishes `odom` (PoseStamped) and a body-frame `lidar` scan, so TypeSafe and the raw bridge autoconnect without relays or remaps. - `nav-skills`: point-goal tools over the planner's `goal` / `goal_reached` topics; goals carry the robot's floor z (multi-level scenes snap a z=0 goal onto furniture). - `TopicAgent`: evaluate whatever is already running by sending the instruction on one topic and waiting on another; trajectory from a module's `set_trace_dir` trace. - Raw bridge `topics` allowlist plus `world_state/json` (the TypeSafe builder) and `finished/json`; ROBOT.md lists only the served topics. - `HabitatEnvironment`: navmesh `tour` driven before the task so the planner has a map, `task_start_ts`, `record_topics`, `latest_pose` from `odom`. - `nav_metrics`: reached, time to object, facing, bumps, path length, straightness, turn reversals. - `Sim`: `raw_topics`, `extra_env`, `--rerun-open none`, opt-in `rrd`, `video` capture on Xvfb. - `--case`, `--parallel`, `--container`, `--repeat`: one `dimos evals run` per case, in a container when given; `docker/eval/Dockerfile`. - Suite `habitat_nav` with an example HM3D scene file (boxes, cases, tour).
- `misc/habitat/nav_cases.py`: cases (spawn, end point beside each target, geodesic distance) and a navmesh mapping tour per scene, from a ground-truth file in the #4211 layout. - `dimos/simulation/habitat/navmesh.py`: HSSD ships no navmesh; compute one once (Go2-ish agent, static objects included), cache under `target/habitat/navmesh/`, used by the native and the generator. - Suite scene files may reference ground truth by path; scenes whose file is absent are skipped. Ten HSSD scenes, 5 to 6 cases each, plus the HM3D example. - `demo-objects` excludes labels matching `^wall` by default.
…benchmark targets - Goal snapping tries one step of z before the robot's height, so a goal at an object's centre at floor height lands on the floor beside it instead of on its top. - Local map and region bounds pair by stamp across the last four of each; with the cloud landing a tick after its bounds, latest-of-each never matched and the planner starved. - `nav_cases.py` picks isolated targets (0.6 m of clear floor from other furniture) with the end point on the object's centre; the grader then measures arrival to the object's box. - Metrics are also written beside the trajectory in the run directory.
…e distance, finished question - The state carries a `task` summary (TypeSafe has no system prompt; context goes in the state). - `distance_m` is measured to the object's nearest box edge; the centre of a large object is never reachable, so `touching` never fired and the agent jittered against the target. - A `finished` yes/no question; when it fires the agent publishes `finished`, stops and clears the goal. Stool case: 300 s timeout with 14 bumps -> finished in 15 s, 0 bumps, score 1.0.
…s with a task brief - `dimos evals run --video` captures the viewer per case; the runner moves `viewer.mp4` and any `viewer.rrd` next to the trajectory. - `dimos evals media <run>...`: captions each case video with arm, case, score and metrics; `--grid` tiles one case across arms. - Every case instruction opens with the task brief; the TypeSafe agent reads the last line as its goal (its own brief lives in the state). - `nav_cases.py` classifies targets easy / medium / hard from clearance, geodesic distance and detour, and picks a mix per scene: 80 cases over the ten HSSD scenes.
…ve; planner and zenoh fixes - Habitat native publishes the navmesh as `scene_map` + `scene_bounds`; `habitat-nav-gt` feeds it to the MLS planner in place of the ray-traced local map, so the planner has the whole floor at t=0 and no robot drives before the task clock. The tour is gone from the suite. - MLS planner: pairs a cloud with the nearest bounds within 0.5 s (bounds queue of 32) and warns when a goal is set without map updates. Goal snapping tries one step of z first. - dimos-module: `DIMOS_ZENOH_SHM=0` disables zenoh shared memory for the natives; with it on, the raycaster-to-planner link delivered nothing in most launches on this host. - `TopicAgent`: `done_when_still` ends a run once the robot moved and then stood still (the follower never reports goal_reached for a goal inside an object); goals at the robot's floor z. - Video: capture the viewer window when found within 90 s, keep the ffmpeg log; `--video` on the runner, `dimos evals media` captions and grids; suite case ids unique per label.
…ger scan, panels collapsed, pointer parked; recording path in case metrics
…finished flag, trace usage and edge distance re-applied on the typed agent
… per goal coordinates; eval lidar band and finished threshold; HM3D end points on the objects
…o finished threshold
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
…hed also when stopped near it
…ted, never a gate
…formed by the robot pose
…le or the viewer video
1 task
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution path
Draft. Stacked on
feat/typesafe-agent(the TypeSafe module this benchmark evaluates), so the diff is the benchmark only. The TypeSafe v2 rewrite is #4212; the eval needs onlyset_trace_dir,world_stateandagent_idlefrom the module and rebases onto whichever lands. Spec:engineering/typesafe-nav-benchmark/spec.mdin the agents repo.Problem
Compare the TypeSafe reactive agent, dimOS's planner, and coding agents with and without dimOS on long-horizon go-to-object navigation in real Habitat scenes, on an even text-only footing, with navigation-quality metrics, per-case video, and parallel execution.
Solution
One launch serves every arm:
habitat-nav mcp-server demo-objects nav-skills, plus the agent's own modules.odom(PoseStamped) and a body-framelidarscan, sotype-safe-agentandraw-robot-bridgeautoconnect by name. No relays, no remap blueprints.nav-skills:go_to(x, y, wait_s),stop_navigation,finishover the planner'sgoal/goal_reached/stop_movementtopics. Goals carry the robot's floor z: HM3D houses are multi-level and a z=0 goal snaps onto furniture.TopicAgent(dimos/evals/agents/topic.py): evaluate whatever is already running. Publishes the instruction (text, or its(x, y)as aPointStamped) on one topic and returns when another goes truthy; trajectory from a module'sset_trace_dirtrace. The planner arm and the TypeSafe arm are two configurations of it.topicsallowlist,world_state/json(the same builder TypeSafe reads) andfinished/json; ROBOT.md lists only the served topics.HabitatEnvironment: a navmeshtourfrom the scene file is driven before the task so the planner has a map (it plans only over observed surface, likedimsim_houseexplores first);task_start_ts;record_topics.nav_metrics: reached, time to object (run duration when never reached), facing, bumps (held command without displacement), path length, straightness, turn reversals; written asnav_metrics.jsonbeside the recording.Sim:raw_topics,extra_env,--rerun-open none, opt-inrrd,video(Xvfb + dimos-viewer + ffmpeg, viewer window only).dimos evals run --case --parallel --container --repeat: onedimos evals runper case, in a container when given;docker/eval/Dockerfile.dimos.evals.suites.habitat_navwith an example HM3D scene file (furniture-sized boxes, 4 cases, tour). The scene file layout is thedetection3d_array_to_dictone from Ruthwik/feat/dimsim object annotations #4208 pluscasesandtour.Since the first push
misc/habitat/nav_cases.pypicks targets with an easy / medium / hard mix (clearance, geodesic distance, detour) and writes cases plus a navmesh mapping tour per scene; 80 cases, end point on the object's centre. HSSD ships no navmesh:dimos/simulation/habitat/navmesh.pycomputes and caches one.local_map/region_boundspair across the last four messages (latest-of-each never matched when the cloud lagged a tick, the planner starved).taskbrief in the state,distance_mto the object's edge, afinishedquestion that stops and publishesfinished. Stool case: 300 s timeout with 14 bumps -> finished in 10 s, score 1.0.--videoper case,dimos evals mediacaptions and grids, every case instruction opens with a task brief.Matrix on one HSSD case (stool, 3 m): planner 0.91, TypeSafe 1.00 (10 s), Pi no-dimOS Astra 1.00 / Fable 1.00 / GPT-5.6 1.00 / Opus 0.91, dimcode Fable 0.91 / Astra 0.72.
How to Test
Verified on the example scene, chair case (score 0.8 each): planner reached in 10.9 s; Pi + Astra without dimOS wrote a Zenoh observer and navigator and reached in 34 s; dimcode + Astra with dimOS reached in 16 s with one
go_to.viewer.mp4captured headless. 285 unit tests, ruff, mypy and pre-commit pass.Not yet run: the TypeSafe arm (no key on the box) and the container path of
--parallel(Docker registry unreachable on the box; job command unit-tested).Checklist