Nav pt2: Alfred#2100
Conversation
Greptile SummaryThis PR introduces Alfred, a new wheeled-base robot, into the nav stack by adding a Portal RPC effector (
Confidence Score: 3/5The 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
Sequence DiagramsequenceDiagram
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
Reviews (14): Last reviewed commit: "-" | Re-trigger Greptile |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Pull request was closed
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.
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.
Make bin/ci-check executable (chmod +x), matching peer scripts in bin/.
| # 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"]) | ||
| } |
There was a problem hiding this comment.
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.
New robot (wheeled base) Alfred: for nav stack data collection
Testing:
ssh onto Alfred: