查看“Detour软件架构”的源代码
←
Detour软件架构
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
管理员
您可以查看和复制此页面的源代码。
<languages/> == 概述 / Overview == Detour 是 MDCS 的定位系统:它整合 ''激光 SLAM''、''地纹 SLAM''、''天花板 SLAM''、''二维码导航'' 等多种定位手段,输出统一的 6-DoF 位姿给上层(Clumsy 自动驾驶 / SimpleComposer 调度)。Detour 不接受外部插件 —— 它通过 [[Special:MyLanguage/DObject|DObject]] 共享内存订阅 Medulla 发布的传感器数据,并通过 ''外部反馈接口''接收里程计 / IMU / RTK / UWB。 Detour is the MDCS positioning subsystem. It fuses laser SLAM, ground-texture SLAM, ceiling SLAM, QR navigation, and other localisation sources into a unified 6-DoF pose for the upper layers (Clumsy autopilot / SimpleComposer fleet). Detour does not accept plugins — it consumes Medulla sensor publications via DObject, and external poses (odometry / IMU / RTK / UWB) via the external-feed API. == 子模块 / Subsystems == {| class="wikitable" ! 模块 / Module !! 文件 / File !! 用途 / Use |- | Lidar consumer || `D:\src\Detour\DetourCore\CartDefinition\Lidar.cs:302-311` || 从 Medulla DObject 订阅雷达帧 |- | Tight coupler || `D:\src\Detour\DetourCore\Algorithms\TightCoupler.ExternalCoupler.cs` || 接收外部位姿、做紧耦合融合 |- | Laser SLAM || `D:\src\Detour\DetourCore\Algorithms\LaserSLAM*` || 见 [[Special:MyLanguage/Detour激光SLAM算法详解|Detour 激光 SLAM 算法详解]] |- | Ground-texture SLAM || `D:\src\Detour\DetourCore\Algorithms\GroundTexture*` || 见 [[Special:MyLanguage/Detour地面纹理SLAM算法详解|地面纹理 SLAM 算法详解]] |- | QR / fiducial || `D:\src\Detour\DetourCore\Algorithms\QR*` || 见 [[Special:MyLanguage/二维码识别导航|二维码识别导航]] |- | Multi-source fuser || `TightCoupler` || 见 [[Special:MyLanguage/多定位源的自动综合|多定位源的自动综合]] |} == 数据流 / Data flow == Medulla 传感器插件 │ output() → DObject(name) ▼ Detour 订阅: - LidarConsumer.ReadLidar() - CameraConsumer (ground-texture / ceiling / QR) │ ▼ 各 SLAM 后端 (laser / texture / ceiling / QR) │ 每个产生一组 ''观测约束'' ▼ TightCoupler (位姿图优化) │ + 外部反馈 (PostExternalFeed) ▼ 统一位姿 (x, y, z, th, pitch, roll, tick) │ 发布到 DObject "pose" ▼ Clumsy / SimpleComposer 订阅 == 外部反馈 / External feeds == 非传感器位姿(轮编里程计 / IMU / RTK / UWB / 二次定位源)通过 ''外部反馈''进入 Detour: Non-sensor poses (wheel odometry, IMU, RTK, UWB, secondary sources) enter Detour through the ''external-feed'' API: <syntaxhighlight lang="csharp"> TightCoupler.PostExternalFeed(new ExternalFeed { name = "wheel_imu", counter = tick++, hasTranslation = true, hasRotation = true, is2D = true, integrated = true, // 积分量 / cumulative x = odom_x, y = odom_y, th = odom_th }, "WheelOdom"); </syntaxhighlight> 字段含义见 `TightCoupler.ExternalCoupler.cs`:`hasTranslation/hasRotation`(包含的自由度)、`integrated`(积分量 vs 单帧量)、`toRemap`(绝对参考系下,需要全局重映射)、`startingTick`(首帧基准)。 Field semantics in `TightCoupler.ExternalCoupler.cs`: `hasTranslation/hasRotation` (DOFs), `integrated` (cumulative vs single-frame), `toRemap` (absolute, needs global remap), `startingTick` (reference baseline). == 多 SLAM 共存策略 / Multi-SLAM coexistence == * '''并行运行''': 默认每种 SLAM 后端都开,各产生自己的观测约束。 * '''置信加权''': TightCoupler 根据每个后端的协方差矩阵做加权融合。 * '''场景切换''': 某个后端连续 ''N 帧''置信度 < 阈值 → 临时禁用其约束。 * '''硬切换''': 用户可在 UI 中强制选择"单一定位源"模式(调试用)。 * All SLAM backends run in parallel by default. * TightCoupler weights by per-backend covariance. * A backend that's degraded for N frames is temporarily disabled. * A user can force single-source mode (debug). == 定位输出 / Positioning output == Detour 把当前最优位姿写到 ''pose'' 命名的 DObject: The current best pose is published to a DObject named `pose`: <syntaxhighlight lang="csharp"> public struct DetourPose { public double x, y, z; // mm public double th; // 偏航 / yaw rad public double pitch, roll; // rad public long tick; // 时间戳 / system tick public double cov_xy; // 平面协方差 / planar covariance public double cov_th; // 偏航协方差 / yaw covariance public string activeBackend; // 当前主用 SLAM 后端 } </syntaxhighlight> == 与 Medulla 的关系 / Relation to Medulla == Detour ''不是'' Medulla 的插件;它是独立的 .NET 进程,与 Medulla 同主机但不同进程,二者只通过 DObject 共享内存通讯。这种设计使得 Detour 可以独立部署 / 升级 / 切换 SLAM 算法而不影响 Medulla。 Detour is '''not''' a Medulla plugin. It's a separate .NET process on the same host, communicating with Medulla only via DObject shared memory. This decoupling lets Detour deploy / upgrade / swap SLAM algorithms independently. == DetourStandalone 与 DetourLite / Standalone & Lite variants == * '''DetourStandalone''': 完整 Detour,含全部 SLAM + UI。详见 [[Special:MyLanguage/DetourStandalonePluginGuide|DetourStandalonePluginGuide]]。 * '''DetourLite''': 精简版,只含必要功能 + 检查表自检。见 [[Special:MyLanguage/DetourLite检查表|DetourLite 检查表]]。 == 相关页面 / See also == * [[Special:MyLanguage/Detour|Detour]] * [[Special:MyLanguage/Detour简介|Detour简介]] * [[Special:MyLanguage/Detour-API|Detour-API]] * [[Special:MyLanguage/Detour激光SLAM算法详解|Detour激光SLAM算法详解]] * [[Special:MyLanguage/Detour地面纹理SLAM算法详解|Detour地面纹理SLAM算法详解]] * [[Special:MyLanguage/多定位源的自动综合|多定位源的自动综合]] [[Category:开发手册]]
返回
Detour软件架构
。
导航菜单
个人工具
中文(中国大陆)
创建账号
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息