Commit Graph

19 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
e2ee28bd63 :optimal 2026-07-27 10:09:38 +07:00
bdbb03aa51 otimal deep coppy obj 2026-07-14 11:08:23 +07:00
81e7874274 Duong update 2026-01-12 15:48:43 +07:00
9d3d31a4f9 include <robot/console.h> 2026-01-10 14:10:41 +07:00
b18aeb39ab replaced printf -> robot::console 2026-01-10 11:38:19 +07:00
72b2f3c639 Hiep update 2025-12-30 10:24:18 +07:00
2c3d7d586d HiepLM update 2025-12-30 09:08:14 +07:00
af43332b28 replace std::shared_ptr to boost::shared_ptr 2025-12-04 14:32:22 +07:00
f37bccd02f update function load foot print 2025-12-03 14:04:26 +07:00
4fb2554291 update file costmap_2d_robot and file config params 2025-12-03 11:36:06 +07:00
2e0a4348dd update file costmap_2d_robot 2025-11-26 15:00:26 +07:00
0c61984d3e update to tf3 2025-11-17 15:04:11 +07:00
49a72383c8 update file voxel_layer 2025-11-15 17:36:52 +07:00
bd98bf4e08 update folder plugins 2025-11-13 17:39:09 +07:00
c94de60a7b update file obstacle_layer and file test plugin 2025-11-12 17:38:38 +07:00
19683269c3 update function dataCallBack and file test static layer 2025-11-11 14:28:20 +07:00
498b606e15 them file test static_layer 2025-11-07 17:44:42 +07:00
5d8981eab6 first commit 2025-10-28 14:44:05 +07:00