PlannerRunner truoc gio giu Costmap2D mutex suot makePlan() (giao thuc gen-1) - SBPL search
6-14s la costmap update thread bi block het tung do. Them capability boost::dll
"<alias>ExternalGrid" (cung mau sbpl_recovery dang dung) de planner nhan ban chup thay vi
lock song. threadBody(): planner co setter + costmap bat snapshot_for_readers thi
refreshSnapshot() + dua ban chup vao, khong lock; khong thi rot ve giu mutex nhu cu (rollback
khong build lai). SBPLLatticePlanner them setExternalGrid()/activeGrid(); sua luon check
size external_grid_ so voi grid (grid = activeGrid() nen so voi chinh no, khong bao gio bat
duoc lech) - so dung costmap_robot_->getCostmap() (luoi song).
Test: ReportsExternalGridCapabilityPerPlanner, ExternalGridIsNotCalledWhileTheCostmapLockIsDisabled.
config/runtime: bat snapshot_for_readers: true (cay sim). docs/THREADING.md: bang so sanh khoa
dai vs ban chup.
Bench and Gazebo settings only; the robot trees are untouched.
Planners: the position profile moves to PriestLocalPlanner, and the three
docking profiles all point at HybridDockingLocalPlanner instead of the Stanley
instances. Loop drops to 20 Hz, command_semantics back to twist for the sim
drive, max_vel_x to 1.20, recovery behaviours and the path monitor off while
the docking chain is under test.
PRIEST runs cem 3 with performance_metrics off and debug_level 0, which is the
configuration the CPU measurements were taken at. Metrics have to stay off for
any further benchmark.
The SBPL primitive path pointed into rl_ws, a workspace that is not on this
machine; it now points at the copy in sbpl_lattice_planner. sensor_store's
report_period goes to 0 to stop the periodic dump. The sim launch defaults
robot_type to T800 and re-enables depth_image_proc.
The VDA5050 charger flow replaces the pallet fixture: DetectCharger and the
charger marker, with the trailing back-off commented out. The rotate compound
action is renamed to lowercase to match what the config reader looks up.
controller_runner: 3 điểm khoá (setPlan/computeVelocityCommands/isGoalReached)
— snapshot bật thì refreshSnapshot() (lock ngắn bằng memcpy) thay cho giữ mutex
suốt lượt plugin chạy; snapshot tắt giữ nguyên lock dài cũ. Rollback bằng
config, không cần build.
config runtime: performance_metrics_enabled + debug_level 1 (key phải nằm TRONG
namespace local_costmap/global_costmap — bản root ở costmap_common là key chết);
snapshot_for_readers local=true, global=false (global planner chưa migrate);
update_frequency local 6 -> 10 Hz sau khi hết tranh chấp.
Số đo sim trước/sau: lock_wait local median 7.5 ms (max 53 ms) -> ~0 (max 13 us),
p99 cycle 21.4 -> 3.4 ms; 10 Hz chạy 0 lần rớt nhịp, thread costmap 1.2% một core.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>