Restructure into DiffWheel/MultiWheel folders, add DiffWheelC and MultiWheelC with MovementTests, FleetRemote multi-vehicle manual sync, deploy templates, and documentation. Update dependency paths to D:\MDCS\Release and mirror motor feedback in MotorRoutine for simulation. Co-authored-by: Cursor <cursoragent@cursor.com>
3.3 KiB
3.3 KiB
运行与部署说明
1. 依赖
所有 Tutorial 插件引用 D:\MDCS\Release:
| 组件 | 路径 |
|---|---|
| Medulla | Release\Medulla\ |
| Clumsy | Release\Clumsy\ClumsyLite.exe |
| CommonUsage | Release\CommonUsage.dll |
| MDCSToolBox | Release\MDCSToolBox.dll(由 Products\mdcstoolbox 编译 PostBuild 输出) |
首次使用前编译 MDCSToolBox:
dotnet build D:\MDCS\Source\Products\mdcstoolbox\MDCSToolBox.csproj -c Release
2. 编译 Tutorial
cd D:\MDCS\Source\Tutorial
dotnet build Tutorial.sln
输出:
- M 插件 →
build\Medulla\plugins\ - C 插件 →
build\Clumsy\与build\Clumsy_AGV2\(PostBuild 复制运行时)
3. 目录结构
Tutorial/
DiffWheel/DiffWheelM/ DiffWheel/DiffWheelC/
MultiWheel/MultiWheelM/ MultiWheel/MultiWheelC/
deploy/ # 配置模板(入库)
build/ # 运行目录(gitignore)
4. 单车验证(多舵轮)
- 启动 Playground(若使用仿真)
- 启动 Detour(
DetourLite,detour.json中shareObjectTag=Multi1,端口 4321) build\Medulla\start_medulla_agv1.bat- 使用
deploy\start_clumsy_agv1.bat或手动复制:deploy\chassis.json→build\Clumsy\deploy\clumsy_agv1\clumsy.json→build\Clumsy\clumsy.jsondeploy\clumsy_agv1\clumsyconsole.json→build\Clumsy\clumsyconsole.json
- 在
build\Clumsy\运行ClumsyLite.exe
5. 双车手动联动(同机)
| 配置项 | AGV1(主车) | AGV2(从车) |
|---|---|---|
| Medulla | build\Medulla\ tag Multi1,web API 8007 |
build\Medulla_AGV2\ tag Multi2,web API 8108 |
| Detour | detour.json tag Multi1,HTTP 4321 / Web 4322 |
Detour_AGV2\detour.json tag Multi2,HTTP 4421 / Web 4422 |
clumsyconsole.json |
soTag=Multi1, port=8008, detourPort=4321 |
soTag=Multi2, port=8009, detourPort=4421 |
clumsy.json msConf |
MultiVehicleMasterEndpoint="/", CarNum=1 |
MultiVehicleMasterEndpoint="127.0.0.1:8008", CarNum=2 |
tag 一致性:Detour shareObjectTag = Clumsy soTag = Medulla SetShareObjectTag(见 startup.iocmd)。
- 启动 Playground + 两台 Detour + 两台 Medulla + 两台 ClumsyLite(工作目录
build\Clumsy/build\Clumsy_AGV2),或使用DetourLite\bin\Debug\net8.0\start_all_sim.bat一键启动全部 7 个进程 - 主车 Medulla 遥控器按 F 开启「车队联动」
- 用摇杆驱动:Y=纵向,X=编队转向
6. 双车自动联动
- 完成上一节双车启动
- 至少一台车
PosAvailable=true(Detour 定位有效) - 主车 Clumsy 触发自动联动或调度
AGV.FleetGo(..., multiVehicleSync:true)
7. 差速示例
使用 deploy\clumsy_diff\clumsy.json,工作目录 build\Clumsy_diff\。
8. 配置文件说明
| 文件 | 作用 |
|---|---|
detour.json |
shareObjectTag、guru.DetourPort、雷达 layout |
clumsyconsole.json |
soTag、port、allowMultiple、detourHost/detourPort |
clumsy.json |
msConf → PilotConfig(含 TestCarSyncDistance、主车端点) |
chassis.json |
四轮舵轮几何 |
startup.iocmd |
SetShareObjectTag Multi1/Multi2 |
详细算法见 MultiVehicleSync.md,修复清单见 BugFixes.md。