Commit Graph

12 Commits

Author SHA1 Message Date
84c83786ba feat: snapshot API cho reader — planner solve trên bản copy, hết chặn map-update
Costmap2D::copyFrom: copy metadata + grid, chỉ realloc khi size đổi (operator=
delete/new mỗi lần — không hợp copy định kỳ 30 Hz). Caller giữ mutex nguồn.

Costmap2DROBOT: key config snapshot_for_readers (mặc định false = nguyên trạng);
refreshSnapshot() khoá master mutex đúng bằng thời gian memcpy;
getCostmapForRead() trả snapshot khi bật / lưới live khi tắt. Object snapshot
ổn định địa chỉ, refresh tại chỗ — không tái tạo con trỏ (bài học
DOUBLE_FREE_BUG_FIX_REPORT). Hợp đồng single-consumer: refresh + đọc cùng
thread control loop.

Kèm: load debug_level (commit trước) + fix priv_nh(priv_nh, name) tự khởi tạo
từ chính nó — đổi thành (nh, name), cùng kết quả namespace, hết UB-adjacent.

Verify: test_costmap 10/10 (3 test copyFrom mới), sim mission — lock_wait local
53 ms max -> 13 us, p99 cycle 21.4 -> 3.4 ms, local costmap chạy được 10 Hz
với 1.2% một core.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 20:19:33 +07:00
bdbb03aa51 otimal deep coppy obj 2026-07-14 11:08:23 +07:00
b18aeb39ab replaced printf -> robot::console 2026-01-10 11:38:19 +07:00
384897b750 update from DuongTD 2026-01-08 10:35:27 +07:00
72b2f3c639 Hiep update 2025-12-30 10:24:18 +07:00
2c3d7d586d HiepLM update 2025-12-30 09:08:14 +07:00
11ff1baa79 fix core dumped err when loadplugin 2025-12-01 17:34:23 +07:00
49a72383c8 update file voxel_layer 2025-11-15 17:36:52 +07:00
5d8981eab6 first commit 2025-10-28 14:44:05 +07:00
63dc18f3f0 1726_24102025 2025-10-24 17:26:44 +07:00
6d86ad65a2 1723_23102025 2025-10-23 17:23:41 +07:00
ad906963f7 first commit 2025-10-23 16:55:46 +07:00