HiepLM fbc0c11be2
Some checks failed
Test / test (push) Has been cancelled
Test lần 2
2026-06-13 13:58:38 +07:00
2026-06-13 13:46:53 +07:00
2026-06-13 13:58:38 +07:00
2026-06-13 13:58:38 +07:00
2026-06-13 13:58:38 +07:00
2026-06-13 13:46:53 +07:00
2026-06-13 13:58:38 +07:00
2026-06-13 13:35:00 +07:00
2026-06-13 10:17:26 +07:00
2026-05-29 16:33:11 +07:00
2026-06-13 13:58:38 +07:00
2026-06-13 10:17:26 +07:00
2026-06-13 13:58:38 +07:00
2026-06-13 13:58:38 +07:00

LiDAR Manager Web (Test3)

Chức năng:

  • Đăng ký danh sách cảm biến LiDAR (tên, ip, port)
  • Đăng ký IMU (tên, frame_id, topic, nguồn) và pose trên robot
  • Kéo thả icon LiDAR/IMU trên canvas để set vị trí (robot frame)
  • Nhiều layout — mỗi layout lưu tại data/models/{id}.json; catalog trong data/state.json

Build

cd /home/robotics/RD/Test3
cmake -S . -B build
cmake --build build -j

Run

Chạy mặc định port 8080, phục vụ static từ www/, dữ liệu ở data/state.json:

./build/lidar_manager_web

Hoặc chỉ định:

./build/lidar_manager_web 8080 ./www ./data/state.json

Mở trình duyệt: http://localhost:8080/

Docker (giới hạn 2 CPU, 4 GB RAM)

Mô phỏng cấu hình controller tối thiểu SICK (Dual-Core, 4 GB) trên máy dev:

cd /home/robotics/RD/Test3
sudo docker compose up --build -d
# hoặc: sudo ./scripts/docker-up.sh

Kiểm tra giới hạn:

sudo ./scripts/docker-stats.sh

Dừng:

sudo docker compose down

Dữ liệu layout vẫn lưu tại data/ trên host (volume mount).

Kiểm tra tài nguyên trong container:

# Vào shell container
sudo docker exec -it lidar-manager-limited bash
# hoặc: sudo ./scripts/docker-shell.sh

# Trong container, thử:
htop          # CPU/RAM (q để thoát)
free -h       # RAM
nproc         # số CPU nhìn thấy
ps aux        # process
cat /proc/meminfo | head
sudo ./scripts/docker-htop.sh
sudo ./scripts/docker-stats.sh

Test tự động

Chạy toàn bộ: unit C++ (GTest), API smoke (curl), pytest integration.

cd /home/robotics/RD/Test3
chmod +x scripts/run-tests.sh scripts/api-smoke.sh
./scripts/run-tests.sh

Chỉ unit test C++:

cmake -S . -B build -DBUILD_TESTING=ON
cmake --build build -j
ctest --test-dir build --output-on-failure

Chỉ API smoke (server đang chạy, dùng fixture tests/fixtures/data/):

./build/lidar_manager_web 18080 www tests/fixtures/data/state.json &
./scripts/api-smoke.sh http://127.0.0.1:18080

Fixture mission id mặc định: testmission00001 (tests/fixtures/data/missions.json).

Benchmark hiệu năng trong container (cần docker compose up -d):

chmod +x scripts/docker-benchmark.sh
sudo ./scripts/docker-benchmark.sh

CI: GitHub Actions workflow .github/workflows/test.yml.

Description
No description provided
Readme 18 MiB
Languages
JavaScript 48.7%
C++ 24.8%
HTML 13%
CSS 10.1%
Shell 2.2%
Other 1.1%