feat(nav): per-POI navigation progress with dynamic ETA #129
Open
xiaolefang-dm wants to merge 20 commits intomainfrom
Open
feat(nav): per-POI navigation progress with dynamic ETA #129xiaolefang-dm wants to merge 20 commits intomainfrom
xiaolefang-dm wants to merge 20 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>
Publishes per-POI path progress on each keyframe update so the upper layer can show completion percentage and estimated remaining time. Speed is derived from covered/elapsed distance and carried over across POI transitions for a progressively better estimate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…card - map_node publishes percent=100 on POI arrival before incrementing index - backend subscribes /mapping/nav_progress and forwards via /ws/status - NavProgress model added to DeviceStatus - nav status card shows progress bar + remaining distance + ETA; flashes green 100% for 1.2s after nav completes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nate frame Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…for compatibility Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Socket Instead of polling via /ws/status every 1s, push progress events directly from the ROS callback so the UI updates at full topic rate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows POI index, remaining distance, ETA and progress bar as a floating overlay above the map bottom buttons. Flashes green Arrived!/100% for 1.2s when navigation completes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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.
Summary
/mapping/nav_progressROS topic —map_nodepublishes per-POI path progress on every keyframe: current POI index, completion %, remaining path distance, and estimated remaining time. Speed is derived dynamically from covereddistance / elapsed time and carried over across POI transitions for a progressively better estimate. Publishes 100% on arrival before moving to the next POI.
/ws/nav-progressWebSocket — backend subscribes to the ROS topic and forwards each message immediately via a new/ws/nav-progressendpoint, so the frontend updates at full topic rate instead of the 1 s status poll.→ <POI name> XX% · X.Xm · ~Xs. Flashes green "Arrived" for 1.2 s when all POIs are visited._GlobalMapViewwas passingglobalPath(odom frame) toMapOverlayPainter; corrected tomapGlobalPath(map frame) to match the coordinate system expected by_worldToImage.map_posewhen a relocalization message arrives so the PiP map has a robot position to draw immediately after localization.map_nodepublishes/mapping/nav_donewhen all POIs are visited; backend transitions statenavigation → idleand clears the active POI list in the frontend.3.mov