Skip to content

Nav pt2: Alfred#2100

Open
jeff-hykin wants to merge 29 commits into
mainfrom
jeff/feat/flowbase
Open

Nav pt2: Alfred#2100
jeff-hykin wants to merge 29 commits into
mainfrom
jeff/feat/flowbase

Conversation

@jeff-hykin
Copy link
Copy Markdown
Member

@jeff-hykin jeff-hykin commented May 15, 2026

New robot (wheeled base) Alfred: for nav stack data collection

Testing:

ssh onto Alfred:

dimos --rerun-host 0.0.0.0 run alfred-nav 

@jeff-hykin jeff-hykin requested a review from mustafab0 May 15, 2026 23:30
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 15, 2026

Greptile Summary

This PR introduces Alfred, a new wheeled-base robot, into the nav stack by adding a Portal RPC effector (AlfredHighLevel), a nav blueprint (alfred_nav), and robot config. It also refactors nav_stack_rerun_config to unconditionally apply max_hz rate-limiting to all visual entities (defaulting to 60 Hz scaled by vis_throttle), and makes model_path optional in RobotConfig so URDF-less robots can be configured.

  • Alfred effector: subscribes to cmd_vel, negates vy/wz for Alfred's inverted Y-axis, and forwards holonomic velocity to the Portal RPC server; a watchdog task auto-stops the platform if the stream stalls.
  • nav_stack_rerun_config refactor: rewrites the vis_throttle/max_hz logic to apply a per-entity Hz cap to every visualized entity — fixing the old bug where vis_throttle was silently ignored when max_hz wasn't in user_config, but also silently introducing new rate caps for all existing callers (e.g. G1 sim and G1 onboard blueprints).
  • RobotConfig relaxation: model_path is now None-able with a clear ValueError raised lazily when model-dependent accessors are called, enabling URDF-less robot configs like Alfred.

Confidence Score: 3/5

The Alfred effector carries several unresolved issues from earlier review rounds that affect real hardware safety; additionally, the nav_stack_rerun_config refactor silently changes visualization behavior for existing G1 blueprints.

The nav_stack_rerun_config refactor introduces an unintended side effect on existing G1 nav blueprints: callers that set vis_throttle but omitted max_hz previously received no Hz cap; they now silently receive one (6 Hz for G1 sim, 30 Hz for G1 onboard) without any change to those blueprints. The Alfred effector also still carries multiple open hardware-safety issues from prior review rounds (watchdog/state-tracking correctness, no timeout on Portal RPC, cmd_vel failures silently dropped).

dimos/navigation/nav_stack/main.py (vis_throttle behavioral change affects G1 blueprints) and dimos/robot/diy/alfred/effector_high_level.py (open hardware-safety issues from prior rounds)

Important Files Changed

Filename Overview
.github/workflows/ci.yml CI timeout increased from 30 to 45 minutes to accommodate the new Alfred blueprint's self-hosted test suite.
dimos/navigation/nav_stack/main.py Refactored max_hz/vis_throttle logic: now unconditionally populates max_hz for all visual entities using a default of 60 Hz scaled by vis_throttle, silently capping visualization for existing G1 blueprints that set vis_throttle but never supplied max_hz.
dimos/robot/all_blueprints.py Registers alfred-nav blueprint and alfred-high-level module in the global blueprint/module registries.
dimos/robot/config.py Makes model_path optional (default None) so robots without URDF/MJCF (like Alfred) can use RobotConfig; lazy-parse guard raises a clear ValueError if model-dependent methods are called on a config with no model_path.
dimos/robot/diy/alfred/blueprints/alfred_nav.py New nav blueprint for Alfred; wires FastLio2 → nav stack → AlfredHighLevel. Uses G1 precomputed local planner paths for a wheeled robot with a different kinematic footprint, and cmd_vel_timeout (0.2 s) exactly matches replan_rate (5 Hz), both flagged in prior review rounds.
dimos/robot/diy/alfred/config.py Defines Alfred's RobotConfig (no model_path) and re-exports G1 local planner paths; mount comment vs. z-value inconsistency was flagged in prior rounds.
dimos/robot/diy/alfred/effector_high_level.py New Portal RPC effector for Alfred; several issues flagged in prior review rounds: blocking future.result() without timeout, silently dropped cmd_vel failures, watchdog cancellation ordering, and _last_velocities state mismatch on stop failure.
dimos/robot/test_all_blueprints.py Adds alfred-nav to the SELF_HOSTED_BLUEPRINTS set so it is skipped on standard Ubuntu CI runners that lack LFS access.

Sequence Diagram

sequenceDiagram
    participant NavStack as Nav Stack (SimplePlanner)
    participant AlfredHighLevel
    participant PortalClient as Portal Client (172.6.2.20)
    participant Alfred as Alfred Controller (on-board)

    NavStack->>AlfredHighLevel: "cmd_vel (Twist @ 5 Hz)"
    AlfredHighLevel->>AlfredHighLevel: handle_cmd_vel → move()
    AlfredHighLevel->>AlfredHighLevel: cancel _stop_task (watchdog)
    AlfredHighLevel->>PortalClient: "set_target_velocity({vx, -vy, -wz})"
    note over AlfredHighLevel,PortalClient: asyncio.to_thread(future.result) — no timeout
    PortalClient-->>Alfred: RPC call
    Alfred-->>PortalClient: ack
    PortalClient-->>AlfredHighLevel: result
    AlfredHighLevel->>AlfredHighLevel: arm _stop_task (0.2 s watchdog)
    note over AlfredHighLevel: If next cmd_vel stalls beyond 0.2 s
    AlfredHighLevel->>PortalClient: set_target_velocity(0, 0, 0)
    PortalClient-->>Alfred: stop
Loading

Reviews (14): Last reviewed commit: "-" | Re-trigger Greptile

Comment thread dimos/robot/diy/alfred/effector_high_level.py Outdated
Comment thread dimos/robot/diy/alfred/effector_high_level.py
Comment thread dimos/robot/diy/alfred/config.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 47.54098% with 64 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/robot/diy/alfred/effector_high_level.py 35.48% 60 Missing ⚠️
dimos/robot/config.py 20.00% 3 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

mustafab0
mustafab0 previously approved these changes May 15, 2026
Comment thread dimos/robot/diy/alfred/config.py
Comment thread dimos/robot/diy/alfred/effector_high_level.py Outdated
Comment thread dimos/robot/diy/alfred/effector_high_level.py
mustafab0
mustafab0 previously approved these changes May 16, 2026
Comment thread bin/ci-check Outdated
@jeff-hykin jeff-hykin closed this May 16, 2026
auto-merge was automatically disabled May 16, 2026 06:29

Pull request was closed

@jeff-hykin jeff-hykin reopened this May 16, 2026
@jeff-hykin jeff-hykin closed this May 16, 2026
@jeff-hykin jeff-hykin reopened this May 16, 2026
@jeff-hykin jeff-hykin closed this May 16, 2026
@jeff-hykin jeff-hykin reopened this May 16, 2026
Comment thread dimos/robot/diy/alfred/effector_high_level.py
@jeff-hykin jeff-hykin changed the title Alfred Nav pt2: Alfred May 16, 2026
macOS arm64 runs tests in ~25min then needs ~5min for codecov upload,
hitting the 30min ceiling. Adds headroom so the codecov step finishes
without the job being cancelled and ci-complete going red.
Comment thread dimos/robot/diy/alfred/blueprints/alfred_nav.py
jeff-hykin and others added 3 commits May 16, 2026 10:13
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Restore missing dict-comprehension assignment target and opening brace
  (P0: previous code was a SyntaxError, broke import of the whole module).
- Iterate over union of visual_override and existing max_hz keys so
  caller-provided rate limits outside the default entity list survive
  (P1: previously silently dropped).
- Fix typo in comment 'preveting' -> 'preventing' (P2).

Addresses greptile comments on PR #2108.
@jeff-hykin jeff-hykin enabled auto-merge (squash) May 16, 2026 19:15
Comment thread bin/ci-check Outdated
Make bin/ci-check executable (chmod +x), matching peer scripts in bin/.
Comment thread dimos/robot/diy/alfred/blueprints/alfred_nav.py
Comment thread dimos/robot/diy/alfred/effector_high_level.py
Comment thread dimos/robot/diy/alfred/effector_high_level.py
Comment on lines +251 to +256
# scale/limit rendering (mostly preventing rerun from crashing)
resolved.setdefault("max_hz", {})
resolved["max_hz"] = {
each_entity: resolved["max_hz"].get(each_entity, default_max_hz) * vis_throttle
for each_entity in set(visual_override) | set(resolved["max_hz"])
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 vis_throttle now silently throttles all existing callers that omitted max_hz

The old guard (if vis_throttle != 1.0 and "max_hz" in resolved) meant that callers who set vis_throttle but didn't supply a max_hz entry in user_config received no Hz-capping at all. The new code unconditionally populates max_hz for every entity in visual_override, so callers that relied on that gap now get hard caps they didn't opt into: unitree_g1_nav_sim (vis_throttle=0.1) will have every visual stream capped at 6 Hz, and unitree_g1_nav_onboard (vis_throttle=0.5) at 30 Hz, without any change to those blueprints. A 6 Hz visualization cap on G1 sim will make navigation debugging significantly harder and is likely an unintended side-effect of this refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants