Commit Graph

90 Commits

Author SHA1 Message Date
af66991a3e build: bỏ dependency PCL không dùng
Gói không include một header pcl/ nào — đây là di sản từ thời còn dùng pcl_ros.

Trên robot aarch64 có VTK 9.1 build kèm MPI, chuỗi PCL -> VTK -> VTK::mpi ->
MPI::MPI_C làm CMake gãy ở generate step: root project khai LANGUAGES CXX nên
find_package(MPI COMPONENTS C) không bao giờ thành công và target MPI::MPI_C
không được tạo. Component io là chỗ kéo VTK vào. Máy dev không dính vì không
cài VTK cmake package, find_VTK() tìm không thấy rồi bỏ qua trong im lặng.

Bỏ find_package, DEPENDS PCL, PCL_INCLUDE_DIRS, PCL_LIBRARIES,
link_directories(PCL_LIBRARY_DIRS) và PCL_DEFINITIONS.
2026-08-25 12:38:48 +07:00
d60e1e8db7 feat: đặt tên thread map-update (cm_<tên costmap>) cho top -H / pidstat -t
Đo CPU thật của costmap ở mức OS không cần bật metrics nội bộ: thread hiện ra
là cm_local_costma / cm_global_costm thay vì lẫn vào amr_control_node.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 10:24:04 +07:00
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
37eece7a11 feat: debug metrics updateMap — lock_wait/lock_hold, window cells, empty cycles
debug_level (0/1/2) trên báo cáo performance định kỳ: 0 giữ nguyên output cũ;
1 thêm lock_wait (tranh chấp mutex với planner) tách khỏi lock_hold (việc của
chính costmap), kích thước window update và số cycle rỗng — cycle rỗng giờ vẫn
được đếm + report nên costmap idle (global) không còn biến mất khỏi log;
2 thêm per-layer bounds_grow [m^2] chỉ mặt layer nào nở vùng update.

Số đo sim: lock_wait chiếm 75-90% cycle local costmap khi PRIEST solve
(median 7.5 ms, max 53 ms) trong khi lock_hold chỉ ~1.8 ms — căn cứ trực tiếp
cho snapshot API ở commit sau.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-20 20:19:18 +07:00
3196a19040 build: look up GTest quietly instead of requiring it
GTest is only used by the test executables, which the robot deployment build
does not produce. Requiring it at the top of the file made cmake fail to
configure on a machine without GTest installed even with the tests off.
2026-08-15 12:43:50 +07:00
678874e1c9 build: default the test executables to the build mode instead of always on
The standalone CMake build is the robot deployment path and must not pull in
GTest or produce test executables. A catkin workspace is a development machine
and keeps the tests. -DBUILD_COSTMAP_TESTS=ON still forces them on standalone.
2026-08-15 12:37:12 +07:00
bb74601f09 update 2026-08-14 14:25:00 +07:00
9f7e2f82f1 :optimal test NUC 27/7 15:14 2026-07-27 15:14:39 +07:00
c17ac9fc06 :optimal test NUC 27/7 14:52 2026-07-27 14:52:19 +07:00
c2944f7a98 :optimal 27/7 14:45 2026-07-27 14:45:26 +07:00
ffe2f77c1b :optimal 27/7 13:48 2026-07-27 13:48:17 +07:00
5da5421ec7 :optimal 27/7 12:11 2026-07-27 12:11:14 +07:00
e3b52765c1 :optimal 2026-07-27 11:22:49 +07:00
e2ee28bd63 :optimal 2026-07-27 10:09:38 +07:00
c888af3b7c otimal 2026-07-23 16:12:55 +07:00
0e84ac53cb otimal 2026-07-23 14:47:27 +07:00
03b13f6936 add file readme 2026-07-14 11:37:35 +07:00
bdbb03aa51 otimal deep coppy obj 2026-07-14 11:08:23 +07:00
6a9834d3a8 add multi camera depth 2026-07-14 09:42:35 +07:00
a2a021c114 add function computeCost file layer.h 2026-07-10 11:27:20 +07:00
2fcd211ccf update 2026-03-03 07:26:47 +00:00
3d621de809 fix bugs 2026-02-26 14:54:23 +07:00
1f9e9f1398 update 2026-02-26 14:52:33 +07:00
9208c8bcdc WIP: fix costmap_2d_robot 2026-02-26 14:49:45 +07:00
6c6e5b44f8 update copyParentParameters 2026-02-26 14:43:17 +07:00
eb52edc6e8 update tf3 2026-02-07 11:00:46 +07:00
ed43912c33 delete console_brigde 2026-02-06 10:14:35 +00:00
9026c03e1e update 2026-01-13 14:30:13 +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
b66bd7c751 DuongTD gui zalo 2026-01-10 10:16:51 +07:00
384897b750 update from DuongTD 2026-01-08 10:35:27 +07:00
f052dac142 update for ROS 2026-01-07 16:55:01 +07:00
80bde38f4d ros 2026-01-07 09:26:36 +07:00
03c151afd2 update 2026-01-06 17:49:14 +07:00
a8fc8cb9a4 Merge branch 'main' of https://git.pnkr.asia/DuongTD/costmap_2d into main 2026-01-06 17:37:52 +07:00
800e5c1735 update obstacle_layer 2026-01-06 17:33:13 +07:00
b6733ae04c update 2025-12-31 15:43:07 +07:00
ae469e3271 add function getTypeLayer 2025-12-31 10:11:12 +07:00
6c682712fe hiep update 2025-12-30 10:42:34 +07:00
72b2f3c639 Hiep update 2025-12-30 10:24:18 +07:00
4246453ae6 hiep sua ten file 2025-12-30 09:56:35 +07:00
2c3d7d586d HiepLM update 2025-12-30 09:08:14 +07:00
71adf1390f hiep sua 2025-12-29 18:01:03 +07:00
59b0b1a806 update 2025-12-29 17:43:03 +07:00
ed54b7b8db Hiep sua file 2025-12-29 17:42:32 +07:00
a28f05c6d5 update 2025-12-29 10:22:16 +07:00
0344c31e5b update 2025-12-25 11:06:15 +07:00
10521c1629 update 2025-12-24 17:16:05 +07:00