Files
pnkx_nav_core/CATKIN_BUILD_README.md
duongtd d40051df27 pnkx_nav_core 1.0 — every package is a submodule at its own pinned commit
A single commit on an orphan branch, so this is the whole tree as it should
land on a robot, with no history from the branch it grew out of.

Every package is now a git submodule - 26 of them, 15 registered here for the
first time. They were sitting in the tree as plain clones, which looks right
locally and is empty on the robot: a clone of this repository would have
carried the directory names and none of the contents. That failure reports
itself as "works on my machine, not on the robot", and it is the reason this
conversion happened at all.

Newly registered:

  src/Navigations/Packages/move_base2
  src/Algorithms/Packages/actions/dock_pattern_action
  src/Algorithms/Packages/global_planners/sbpl_lattice_planner
  src/Algorithms/Packages/local_planners/{hybrid,mppi,priest}_local_planner
  src/Libraries/{action_core,angles,depth_image_proc,dock_pattern_detector}
  src/Libraries/{mission_adapters,recovery_core,robot_line_extraction}
  src/Libraries/{robot_sensor_ports,sbpl}

.gitignore had a rule - **/[Pp]ackages/* - that hid move_base2 and
dock_pattern_action from git status entirely, so they would have been left out
without anything being said. The exception is written for those two paths only
rather than by loosening the rule.

Every submodule points at the tip of the branch it was already pinned to, not
blindly at main. costmap_2d stays on dev_cam_intel; that branch exists for a
reason, and this tree carries field calibration that does not belong to main.
The other 25 are at the tip of main.

config/ is flattened into config/runtime/, matching the layout the nav core
reads. The .zip snapshots of old package states are gone - they were manual
backups, not build inputs.
2026-08-27 10:09:25 +07:00

1.8 KiB

Catkin Build Instructions

Vấn đề

Thư mục này có CMakeLists.txt ở root để hỗ trợ standalone CMake build. Tuy nhiên, catkin workspace không được phép có CMakeLists.txt ở root.

Khi chạy catkin_make trong thư mục này, bạn sẽ gặp lỗi:

The specified base path contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace

Giải pháp

Option 1: Sử dụng script tự động (Khuyến nghị)

# Chạy script setup
./setup_catkin_workspace.sh

# Build trong workspace mới
cd ../pnkx_nav_catkin_ws
rm -rf build devel
catkin_make -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer" \
  -DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer" \
  -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"
source devel/setup.bash

Option 2: Tạo workspace thủ công

# Tạo workspace
mkdir -p ~/pnkx_nav_catkin_ws/src
cd ~/pnkx_nav_catkin_ws/src

# Link các packages có package.xml
ln -s /path/to/pnkx_nav_core/src/Navigations/Packages/move_base move_base
# ... link các packages khác nếu cần

# Build
cd ~/pnkx_nav_catkin_ws
catkin_make

Build Systems

Project này hỗ trợ 2 build systems:

  1. Standalone CMake (mặc định)

    • Build trực tiếp trong thư mục này: mkdir build && cd build && cmake .. && make
    • Không cần catkin workspace
  2. Catkin (cho ROS integration)

    • Cần tạo workspace riêng (xem hướng dẫn trên)
    • Packages tự động detect catkin mode khi build trong workspace

Chi tiết

Xem src/Navigations/Packages/move_base/BUILD_INSTRUCTIONS.md để biết chi tiết về cách build package move_base với cả hai hệ thống.