Skip to content

feat(blueprint): click-to-navigate for Go2 via rerun viewer#1392

Closed
spomichter wants to merge 8 commits intodevfrom
feat/click-to-nav-blueprint
Closed

feat(blueprint): click-to-navigate for Go2 via rerun viewer#1392
spomichter wants to merge 8 commits intodevfrom
feat/click-to-nav-blueprint

Conversation

@spomichter
Copy link
Contributor

wires rerun viewer /clicked_point (PointStamped via LCM) → planner goal_request (PoseStamped) with zero new modules.

what

ClickedPointTransport — a PubSubTransport[PoseStamped] that subscribes to /clicked_point PointStamped LCM, calls .to_pose_stamped(), and delivers PoseStamped to stream subscribers. the conversion lives entirely at the transport layer.

unitree_go2_click_nav blueprint — basic robot + voxel mapper + cost mapper + replanning a* planner, with the click transport on goal_request. click in rerun → robot navigates.

why

we explicitly decided no bridge module for this. LCM transport was chosen to avoid exactly that. the type conversion is one method call — a custom transport handles it cleanly.

files

  • _clicked_point_transport.py — the converting transport (~30 lines of logic)
  • unitree_go2_click_nav.py — blueprint definition
  • test_clicked_point_transport.py — 4 unit tests, all passing

tests

4 passed in 0.91s
  • lcm roundtrip: publish PointStamped → receive PoseStamped ✅
  • direct broadcast passthrough ✅
  • unsubscribe cleanup ✅
  • multiple sequential clicks ✅

note

depends on #1388 (feat/pointstamped-msg — PointStamped type + to_pose_stamped())

also: the planner has both goal_request and target as In[PoseStamped] feeding the same handler. an alternative is to wire clicks to target instead, which lets you keep frontier exploration + click nav simultaneously via unitree_go2.transports({("target", PoseStamped): ClickedPointTransport()}). went with goal_request for now as a standalone click-nav blueprint.

spomichter and others added 8 commits March 1, 2026 16:05
adds geometry_msgs.PointStamped following the PoseStamped pattern:
- inherits from dimos_lcm PointStamped + Timestamped mixin
- lcm_encode/lcm_decode for binary roundtrip
- to_rerun() → rr.Points3D
- to_pose_stamped() → PoseStamped with identity orientation
- plum.dispatch constructors (x/y/z, Vector3, list, kwargs)
- conforms to DimosMsg protocol
- 30 unit tests

enables the rerun viewer click-to-navigate pipeline: viewer publishes
PointStamped to /clicked_point via LCM, any module subscribes via
LCMTransport and converts to PoseStamped for navigation.

DIM-643
- replace multi-dispatch constructors with single __init__(x, y, z, ts, frame_id)
- inherit from Point(LCMPoint) instead of Vector3(LCMVector3)
- add Point wrapper class for geometry_msgs.Point
- simplify tests to focus on LCM roundtrip per review feedback

addresses review comments from leshy on PR #1388
3 focused tests: lcm roundtrip, Point inheritance, PoseStamped conversion
Point is a separate LCM message type, should have its own file
like Vector3, Quaternion, Pose, etc.
Wire Rerun viewer /clicked_point (PointStamped via LCM) to the
ReplanningAStarPlanner's goal_request stream (PoseStamped).

The conversion happens at the transport layer via ClickedPointTransport,
which subscribes to /clicked_point LCM, calls PointStamped.to_pose_stamped(),
and delivers PoseStamped to stream subscribers. No new DimOS Module needed.

New files:
- _clicked_point_transport.py: PubSubTransport that bridges PointStamped → PoseStamped
- unitree_go2_click_nav.py: Blueprint wiring basic + mapping + planner + click transport
- test_clicked_point_transport.py: 4 unit tests (all passing)

Closes DIM-643
@spomichter
Copy link
Contributor Author

slop

@spomichter spomichter closed this Mar 1, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 1, 2026

Greptile Summary

Implements click-to-navigate for Unitree Go2 by bridging Rerun viewer clicks to the planner's goal input. The PR adds:

  • PointStamped message type with LCM encoding/decoding and conversion to PoseStamped via identity quaternion
  • ClickedPointTransport - a custom PubSubTransport[PoseStamped] that subscribes to /clicked_point PointStamped on LCM, converts to PoseStamped using to_pose_stamped(), and delivers to stream subscribers
  • unitree_go2_click_nav blueprint - wires the transport to the replanning A* planner's goal_request input

The implementation is clean and follows existing codebase patterns. All tests pass (4/4 for transport, 3/3 for PointStamped). The type conversion lives entirely at the transport layer, avoiding the need for a bridge module.

Confidence Score: 5/5

  • This PR is safe to merge with no blocking issues
  • Well-tested implementation with comprehensive unit tests covering all key functionality. The code follows existing codebase patterns for transports and message types. Clean separation of concerns with type conversion at the transport layer. No security, logic, or architectural issues identified.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/msgs/geometry_msgs/PointStamped.py Well-structured message type with LCM encoding/decoding and to_pose_stamped() conversion
dimos/robot/unitree/go2/blueprints/smart/_clicked_point_transport.py Custom transport cleanly converts PointStamped → PoseStamped, supports both LCM subscription and local broadcast
dimos/robot/unitree/go2/blueprints/smart/test_clicked_point_transport.py Good test coverage for LCM roundtrip, broadcast, unsubscribe, and multiple clicks
dimos/robot/unitree/go2/blueprints/smart/unitree_go2_click_nav.py Blueprint wires ClickedPointTransport to planner goal_request for click-to-navigate functionality

Sequence Diagram

sequenceDiagram
    participant User
    participant Rerun as Rerun Viewer
    participant LCM as LCM Bus
    participant Transport as ClickedPointTransport
    participant Planner as ReplanningAStarPlanner
    participant Robot as Go2 Robot

    User->>Rerun: Click on map
    Rerun->>LCM: Publish PointStamped<br/>/clicked_point
    LCM->>Transport: Receive PointStamped(x, y, z)
    Transport->>Transport: to_pose_stamped()<br/>(add identity quaternion)
    Transport->>Planner: PoseStamped via goal_request
    Planner->>Planner: Plan path to goal
    Planner->>Robot: Navigate to clicked location
Loading

Last reviewed commit: b161663

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant