docs: document trajectory execution contracts

This commit is contained in:
梁薄云
2026-08-04 14:21:13 +08:00
parent fda84ce148
commit 4a7dd875a4
14 changed files with 149 additions and 18 deletions
@@ -2,7 +2,7 @@ using System;
namespace MultiWheelC.TrajectoryPlanning.EMPlanner;
/// <summary>Immutable trajectory-execution outcome without controller or hardware coupling.</summary>
/// <summary>不耦合控制器或硬件的不可变轨迹执行状态,组合选中点和换向状态机的安全语义。</summary>
public sealed class TrajectoryExecutionState
{
internal TrajectoryExecutionState(EmTrajectoryPoint selectedPoint, GearSwitchStateUpdate gearSwitchUpdate)
@@ -19,14 +19,17 @@ public sealed class TrajectoryExecutionState
Reason = gearSwitchUpdate.Reason;
}
/// <summary>按调用方时刻选中或插值得到的轨迹点;位置为 m、航向为 rad、速度为 m/s。</summary>
public EmTrajectoryPoint SelectedPoint { get; }
public GearSwitchState GearSwitchState { get; }
/// <summary>是否要求保持零速度和零 yaw rate。</summary>
public bool HoldZero { get; }
public bool RequestDirectionChange { get; }
/// <summary>状态机是否允许跟随选中点的非零轨迹运动。</summary>
public bool AllowsTrajectoryMotion { get; }
public bool IsTrajectoryComplete { get; }