fix(navigation): support backtracking and route to nearest join - #2147
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…acking-and-join # Conflicts: # firmware/ui-snapshots.sha256
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.
Route tracking loses riders who backtrack beyond its small backward search window. Join nearest also starts following the GPX without directions to the join point. Generated connections appear in Saved Routes.
This change searches in both directions. Recent position continuity keeps the current occurrence on repeated sections. Progress, climbs and waypoints can move backward. The first position search covers the whole route. Later searches stay bounded, even before the rider reaches the route.
Ride to start and Join nearest both plan a connection. The connection leads into the original route or its remaining tail. A failed plan offers Start anyway and keeps the other connection choice available. Join nearest keeps the existing tail behavior on circular routes.
Generated navigation routes carry a temporary flag. Saved Routes hides them on the device and simulator, including after a restart. Cleanup removes unused temporary directions after navigation releases them. It protects the active route, recovery checkpoint sources and the current connection's original route and a ride waiting for its save to finish. Saved GPX routes stay unchanged.
The statistics profile uses the supported
--marker for unknown elevation and grade. The em dash mapped to the font fallback question mark.Requirements: none
Public docs: the OBCR contract defines the temporary flag and cleanup rules in separate
docs:commits. User guides are unchanged. Route-following and start-away requirement suggestions are pending in the verification console.Validation:
cargo build --release --locked --features resource-reporton headc3b83990cmeasures App at 57,920 B (+16 B against develop).resource_guard.py report --profile defaultpasses with the updated inventory. RAM, stack and flash limits stay unchanged. No base rebuild.obc test fixtures -p obc-route -p obc-app -p obc-host-core -p obc-web-demo(1,571 tests including doctests) and the four-crate clippy command below.obc test fixtures -p obc-route: pass, including all four captured navigation tests. Their byte digests include the temporary flag.obc test -p obc-app(1,159 tests and one doctest). A headless Kandel Ride to start shows--on the connection and the original GPX profile after it.obc test -p obc-app -p obc-host-core -p obc-route -p obc-web-demo: 1,561 tests and one doctest pass after the merge from develop.obc test -p obc-app -p obc-host-core.cargo clippy -p obc-app -p obc-route -p obc-host-core -p obc-web-demo --all-targets -- -D warnings: pass.cargo check --locked --features debug-uartinfirmware/obc-fw-nrf54l: pass. The toolchain reports its existingstrict-alignwarning.obc shot --all /tmp/obc-route-merged-snapshotsandobc shot --check /tmp/obc-route-merged-snapshots: all 370 frames match. Changed start prompts and off-route statistics were visually checked. Peak fixtures were rendered again after their shared local package became available.obc suites check,cargo fmt --all, boardcargo fmt, andpython3 docs/build_docs.py --check-links: pass.obc check-devicepassed. Affected-test and ready selections were inspected with--dry-run. Full workspace tests and physical riding tests were not run.Tests cover 10 km forward then 2 km back, repeated laps, exact out-and-backs, both connection destinations, routing failures, catalog reload, and more than 64 successive temporary replacements with saved routes retained. The Kandel simulator is positioned 2.5 km from the start for manual testing.
Limits: exact geometric ambiguity needs a tie-break; turnarounds prefer forward route order. The existing 64-entry catalog limit still needs room to stage a replacement while the current route is active.
Adversarial review: GPT-5.6 Sol completed the review and the delta checks. It found repeated full scans before the first on-route fix, accumulation of hidden temporary routes, and cleanup during a pending ride save. All three findings are fixed. The reviewer reports no remaining actionable findings, including a delta review of the final merge with develop RAM optimizations.