feat: EvadeRecovery plugin (back up or turn to the free side)

- plugins/evade_core.h: pure geometry (polygon footprint, reverse sweep,
  rotation-arc sweep, free-side choice), tested with point lists
- plugins/evade_recovery.cpp: reads raw scans through
  RecoveryContext::sensors; holds on a short view loss, never drives on
  stale data
- RecoveryContext / behavior ABI additions for the sensor reader
This commit is contained in:
2026-11-27 22:06:59 +07:00
parent 0726abbe74
commit 001489c8a6
10 changed files with 1674 additions and 4 deletions

View File

@@ -60,6 +60,35 @@ recovery_partial:
wait:
wait_duration: 1.0 # [s]
# EvadeRecovery: nạp qua library_path + ABI. Fake của nav_test_harness không có local costmap,
# sensor store hay TF, nên test chỉ kiểm configure + từ chối start; lõi hình học test riêng.
recovery_evade:
behaviors:
- {name: evade, type: EvadeRecovery}
evade:
scan_topics: [/f_scan, /b_scan]
max_scan_age: 0.3 # [s]
backup_distance: 0.20 # [m]
backup_speed: 0.15 # [m/s] độ lớn
rotate_speed: 0.5 # [rad/s] độ lớn
acc_lim_x: 0.3 # [m/s^2]
acc_lim_theta: 0.8 # [rad/s^2]
heading_step_deg: 10.0 # [deg]
motion_margin: 0.05 # [m]
min_free_distance: 0.30 # [m]
max_probe_distance: 1.0 # [m]
timeout: 15.0 # [s]
debug:
decision: true
# Đường lỗi: min_free_distance > max_probe_distance -> configure phải từ chối, không dùng default.
recovery_evade_bad:
behaviors:
- {name: evade, type: EvadeRecovery}
evade:
min_free_distance: 1.5 # [m]
max_probe_distance: 1.0 # [m]
# Bảng symbol -> thư viện cho Boost.DLL. Thiếu khoá library_path là nguyên nhân phổ biến nhất của
# lỗi "plugin build xong nhưng runtime báo không tìm thấy".
WaitRecovery:
@@ -75,6 +104,9 @@ RotateRecovery:
BackUpRecovery:
library_path: librecovery_core_back_up_recovery
EvadeRecovery:
library_path: librecovery_core_evade_recovery
ClearCostmapRecovery:
library_path: librecovery_core_clear_costmap_recovery