Commit Graph

4 Commits

Author SHA1 Message Date
34c74cb541 feat: chan doan makePlan fail - audit goal/start, kiem tra 2D reachability, phan biet TIMEOUT/EXHAUSTED
Truoc day fail chi in "Solution not found" - khong biet goal bi chan, khong co duong 2D,
hay search chay het gio. Them audit goal (reject truoc khi search neu cell >= INSCRIBED
hoac footprint dinh vat can), audit start, kiem tra heuristic 2D truoc khi chay ARA* (h=INF
la khong co duong ke ca cho diem), va dong log NO SOLUTION/solved: bao ca ly do
(TIMEOUT|EXHAUSTED), so lan expand, h_2d, phase. Them debug_plan/debug_grid_window de bat/tat
nhom log info; dong LOI (goal REJECTED, 2D unreachable, NO SOLUTION) khong gan cong tac.
2026-09-18 13:32:33 +07:00
7456e99372 feat: preempt a running search via robot_nav_core::Preemptable + sbpl abort flag
- Implements Preemptable::preempt() (atomic store), checked between the up
  to 3 internal ARA* runs a single makePlan() can do (free_start_heading
  retry, realign) — the runs now share one time budget instead of each
  getting the full allocated_time, and a preempt between runs stops the
  next one from starting (kMinReplanBudget floor so a preempt right at the
  edge still gets a minimal attempt).
- Probes for the vendored sbpl's abort flag at runtime via
  dlsym(RTLD_DEFAULT, "sbpl_abort_flag_abi_version") before touching
  set_abort_flag() — logs an error if the header advertises the flag but
  the loaded .so doesn't (header/lib version mismatch), a warning if built
  against an sbpl without the flag at all (falls back to the old
  run-to-allocated_time behaviour, no crash).
- primitive_filename now resolves relative to PNKX_NAV_CORE_CONFIG_DIR
  instead of only working from one dev machine's absolute path.
- CMakeLists.txt: target_include_directories(... BEFORE PRIVATE
  ${SBPL_INCLUDE_DIRS}) so this package's own sbpl header wins over a
  same-named one pulled in transitively (apt ros-noetic-sbpl in
  /opt/ros/noetic/include has no abort flag and was winning silently);
  configure-time check for SBPL_HAS_ABORT_FLAG in the resolved header with
  a loud warning if missing.

Depends on Test/sbpl commit bd89924 (the abort flag itself) and
pnkx_nav_core commit 2b0993b (robot_nav_core::Preemptable header).

Measured on the dev machine (2026-09-12, apt ros-noetic-sbpl removed,
rebuilt): "preempted after N ms" with N in the tens of ms instead of
running to allocated_time (was up to 9 s). Full numbers:
Test/move_base2/docs/PLAN_LIFECYCLE_CANCEL_PAUSE_RESUME.md section 6.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 22:06:30 +07:00
6fbc29f6d8 update 2026-08-09 19:21:50 +07:00
84d4becbdf first commit 2026-07-28 23:44:14 +07:00