Skip to content

fix(navigation): support backtracking and route to nearest join - #2147

Merged
timohueser merged 15 commits into
developfrom
codex/route-backtracking-and-join
Sep 23, 2026
Merged

timohueser merged 15 commits into
developfrom
codex/route-backtracking-and-join

Conversation

@timohueser

@timohueser timohueser commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

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:

  • After merging develop RAM optimizations, cargo build --release --locked --features resource-report on head c3b83990c measures App at 57,920 B (+16 B against develop). resource_guard.py report --profile default passes with the updated inventory. RAM, stack and flash limits stay unchanged. No base rebuild.
  • The merged head passes 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.
  • The final missing-elevation marker change passes 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.
  • The final ride-save lifetime change also passes 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-uart in firmware/obc-fw-nrf54l: pass. The toolchain reports its existing strict-align warning.
  • obc shot --all /tmp/obc-route-merged-snapshots and obc 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, board cargo fmt, and python3 docs/build_docs.py --check-links: pass.
  • Earlier obc check-device passed. 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.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 0db4483c-d658-4f59-9406-43443ae24612


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timohueser
timohueser merged commit 7320944 into develop Sep 23, 2026
31 checks passed
@timohueser
timohueser deleted the codex/route-backtracking-and-join branch September 23, 2026 18:46
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