# 5. Prediction 模块架构设计 本文描述 `autonomy/prediction` 的逻辑架构、核心组件关系与运行时数据流。 ## 5.1 设计目标 1. **插件化扩展**:各预测算法以 `PredictionInterface` 插件形式注册 2. **运动模型复用**:统一使用 `common/motion_model` 做轨迹前向传播 3. **多模态输出**:支持多条假设轨迹及概率,供规划器决策 4. **与 Perception 解耦**:通过标准消息接口接收检测/跟踪结果 5. **实时性**:预测频率 10–20 Hz,时域 3–8 s ## 5.2 实现状态 | 组件 | 实现度 | 说明 | |------|--------|------| | `PredictionServer` 声明 | ⏳ | 构造/析构未实现 | | `PredictionInterface` | ⏳ | 仅 `LoadOptions()` | | `PredictionOptions` proto | ⏳ | 空 message | | `common/motion_model` | ✅ | Linear, DiffDrive, Stationary | | 卡尔曼滤波 | ✅ | `state_estimation/kalman_filter` | | 系统启动集成 | ❌ | 未接入 `Autonomy` | ## 5.3 分层架构