Files
pnkx_nav_core/examples/START_HERE.md
duongtd 4f1c86cc96 pnkx_nav_core 1.0 — every package with a remote is a submodule at its 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.

The rule applied: a package that has its own remote becomes a submodule; a
package that only ever lived inside this repository stays as ordinary files.
That comes to 27 submodules, 16 of them 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 why this conversion happened.

Newly registered:

  src/Navigations/Packages/move_base2
  src/Algorithms/Packages/actions/dock_pattern_action
  src/Algorithms/Packages/recoveries/sbpl_recovery
  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,
dock_pattern_action and sbpl_recovery from git status entirely, so they would
have been left out with nothing said about it. sbpl_recovery was found only by
walking the tree for .git directories and comparing against .gitmodules, not by
reading git status, which is the lesson worth keeping: an ignore rule makes a
missing package invisible to exactly the command you would use to look for one.
The exception is written for those three 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 on main.
The other 26 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:14:59 +07:00

2.0 KiB

🚀 Hướng dẫn chạy thử C API Navigation

Cách nhanh nhất (1 lệnh)

cd /home/robotics/AGV/Diff_Wheel_Prj/pnkx_nav_core/examples
chmod +x run_example.sh
./run_example.sh

Chi tiết các bước

Bước 1: Build C API Library

cd /home/robotics/AGV/Diff_Wheel_Prj/pnkx_nav_core/build
cmake ..
make nav_c_api

Library sẽ được tạo tại: build/src/APIs/c_api/libnav_c_api.so

Bước 2: Chạy C# Example

Script run_example.sh sẽ tự động:

  • ✅ Kiểm tra và build library nếu cần
  • ✅ Tạo C# project
  • ✅ Copy library và source code
  • ✅ Set LD_LIBRARY_PATH cho tất cả dependencies
  • ✅ Build và chạy example
cd /home/robotics/AGV/Diff_Wheel_Prj/pnkx_nav_core/examples
./run_example.sh

Kết quả mong đợi

Nếu chạy thành công, bạn sẽ thấy:

==========================================
Building and Running C# Navigation Example
==========================================
Library already exists: .../build/src/APIs/c_api/libnav_c_api.so
C# project already exists
Copying library...
Building C# project...

Running example...
==========================================
Robot pose: x=0, y=0, theta=0
State: PENDING, Feedback: 
==========================================
Done!

Yêu cầu

  1. .NET SDK 6.0+ (script sẽ kiểm tra và hướng dẫn nếu thiếu)
  2. Library đã được build (script sẽ tự động build nếu thiếu)
  3. Linux environment

Troubleshooting

Lỗi: "dotnet: command not found"

→ Script sẽ hiển thị hướng dẫn cài đặt .NET SDK

Lỗi: "Failed to create navigation instance"

→ Đảm bảo move_base đã được build:

cd build && make move_base

Lỗi: "Cannot load library"

→ Kiểm tra LD_LIBRARY_PATH đã được set đúng (script tự động set)

Xem thêm

  • README.md - Hướng dẫn chi tiết
  • QUICK_START.md - Quick start guide
  • run_example.sh - Script tự động