feat(ui): localization-aware map view and auto nav-done state transition#128
feat(ui): localization-aware map view and auto nav-done state transition#128xiaolefang-dm wants to merge 13 commits intomainfrom
Conversation
map_node publishes Bool(True) to /mapping/nav_done once all POIs are reached (guarded by _nav_completed flag to avoid repeat fires); BackendNode subscribes and transitions state back to idle so the frontend POI button restores automatically without manual cancel. _nav_completed resets when new POIs arrive via pois_callback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Capture Navigator before await to avoid stale context; replace whenData (which doesn't await the returned future) with direct valueOrNull call so the async close actually runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add _MapToggleButton to switch between Local and Global map views when localized - Show selected POIs on global map after Go; clear them when nav ends or is cancelled - Add robot footprint rectangle (0.7m × 0.3m, Go2 config) to local planning view mirroring /planning/footprint topic data Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_on_relocalization now stores the pose dict so the PiP map can show the robot arrow immediately after localization, without waiting for POI navigation to start. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Increase stroke width 1.5→2.5 and fill opacity for better contrast on dark background. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously footprint was drawn before the arrow and got covered by the white fill. Now draws after as a yellow outline-only, always visible regardless of zoom level. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: at default 10m grid scale (40px/m), footprint fl=0.35m×40=14px coincided exactly with arrow tip=14px, making the rectangle completely hidden behind the arrow. Fix: use max(world_scale, min_pixels) so footprint always clearly surrounds the arrow (min 22px front, 18px rear, 12px half-w). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously drew a hardcoded rectangle (wrong). Now: - node_manager subscribes to /planning/footprint (PointCloud) - extracts x,y points and includes in planning snapshot - PlanningState.footprint parsed from WS payload - LocalPlanningPainter draws the actual footprint polygon using same world→canvas transform as trajectory Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused pose param from _PoiButton / _PoiSheet - Remove showFootprint toggle (footprint always drawn when data present) - Hide _LayerTogglePanel when global map view is active Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both features did not work reliably. Clean slate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pass activeNavPois from _CameraPanel to _MapPip so selected POIs appear as markers on the picture-in-picture map. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
@xiaolefang-dm it's cool to have something I want for long time. We need I'm not very sure how to do it. It would be great if we could publish:
|
1 its easy to do |
|
@xiaolefang-dm cool, let's go for it. |
after localizatin robot position to draw:
1.mov
auto nav-done:
2.mov