docs: plan EM planner controller handoff guide
This commit is contained in:
@@ -100,7 +100,7 @@ README 逐项说明:
|
||||
|
||||
必须明确:
|
||||
|
||||
- 只有成功结果中的完整非空轨迹可以交给控制适配器;
|
||||
- 只有 `Success` 或 `SuccessWithFallback` 结果中的完整非空轨迹可以交给控制适配器;
|
||||
- `VelocityX`/`VelocityY` 是世界坐标预测分量,不能直接当底盘命令;
|
||||
- 前进速度为正、倒车速度为负;
|
||||
- 控制适配器使用世界位姿、车辆曲率和带符号纵向速度,并按世界位置重建从零开始的控制弧长;
|
||||
@@ -152,7 +152,9 @@ Trajectory2D trajectory = TestTrajectoryFactory.CreateStraight4Meters(
|
||||
|
||||
// 替换后:从规划服务结果索取并适配
|
||||
EmPlanningResult result = planningService.Plan(request, cancellationToken);
|
||||
if (result.Status != EmPlanningStatus.Success || result.Trajectory == null)
|
||||
bool succeeded = result.Status == EmPlanningStatus.Success ||
|
||||
result.Status == EmPlanningStatus.SuccessWithFallback;
|
||||
if (!succeeded || result.Trajectory == null)
|
||||
throw new InvalidOperationException(result.FailureReason);
|
||||
|
||||
Trajectory2D trajectory = adapter.Create(result.Trajectory);
|
||||
|
||||
Reference in New Issue
Block a user