全部改为用Xmake,然后精简一下文档

This commit is contained in:
mzx committed 2026-11-18 16:45:06 +08:00
1 parent d8f1e2226d
commit 970b16f17f
34 files changed
+1903 -1133

No files matched your search

+11 -9
View File
@@ -1,6 +1,6 @@
# tools/
模型转换、调试、演示用的小工具(都是独立脚本,不参与 colcon 构建)。
模型转换、调试、演示用的小工具(都是独立脚本,不参与构建)。
## 模型相关
@@ -8,7 +8,7 @@
|---|---|
| `build_vehicle.py` | **整车装配体 STL → 仿真网格 + 布局 json**(主力工具) |
| `decimate.py` | 顶点聚类减面(纯 numpy,不依赖 MeshLab/Blender) |
| `gen_sdf.sh` | URDF(xacro) → Gazebo 的 `models/sentry/model.sdf` |
| `gen_sdf.sh` | URDF(xacro) → `models/sentry/model.sdf` + `generated/sentry.urdf` |
| `build_meshes.py` | 旧版:只处理「底盘」导出(已被 `build_vehicle.py` 取代) |
| `build_gimbal.py` | 旧版:只处理「云台」导出(已被取代) |
@@ -24,17 +24,19 @@
| `probe_all.py` | 检查 `/clock /odom /scan /tf` 有没有数据 |
| `probe_cmd.py` / `probe_cmd2.py` / `cmd_probe_all.py` | 统计各级 `/cmd_vel` 消息数 |
| `probe_sub.py` | 最小订阅示例 |
| `smoke_probe.py` | 全栈冒烟:等 Nav2 激活 → 收点云 → 发目标点验结果 |
| `check_stack.py` | ★ **只读体检**:生命周期状态 + 5 个话题有没有数据 + TF,一条命令问清"现在这套栈健康吗" |
## 构建 / 编辑器
| 脚本 | 用途 |
|---|---|
| `gen_compdb.sh` | ★ 重新生成工作区根的 `compile_commands.json`(clangd / VS Code 智能感知的数据源) |
**这里已经没有构建相关的脚本了。**
> **改了 CMakeLists、增删 `.cpp`、或改了 include 目录之后必须重跑 `gen_compdb.sh`**,
> 否则 VS Code 会报 `xxx.hpp file not found` + `Too many errors emitted`。
> 跑完还要在 VS Code 里 `Ctrl+Shift+P → clangd: Restart language server`。
> 详见 `../.vscode/README.md`。
`compile_commands.json` 由 xmake 在**每次构建后自动重写**
(根 `xmake.lua` 里的 `plugin.compile_commands.autoupdate` 规则),
以前那个 `gen_compdb.sh`(合并 colcon 分包产物)已随去 colcon 一起删除。
改了源码结构后只要跑一次 `xmake`,再在 VS Code 里
`Ctrl+Shift+P → clangd: Restart language server`。详见 `../.vscode/README.md`。
## 典型用法