feat: define full-direction EM planning scope

This commit is contained in:
梁薄云
2026-08-06 20:48:44 +08:00
parent fcf7df17d5
commit f4e89b4b4f
20 changed files with 183 additions and 33 deletions
@@ -20,7 +20,8 @@ public sealed class EmPlanningRequest
string outputTrajectoryId,
string referencePathId,
string previousTrajectoryId,
EmMotionModel motionModel)
EmMotionModel motionModel,
EmPlanningScope planningScope)
{
ReferencePath = referencePath;
Map = map;
@@ -35,6 +36,7 @@ public sealed class EmPlanningRequest
ReferencePathId = referencePathId;
PreviousTrajectoryId = previousTrajectoryId;
MotionModel = motionModel;
PlanningScope = planningScope;
}
public PathSmoothingResult ReferencePath { get; }
@@ -50,6 +52,7 @@ public sealed class EmPlanningRequest
public string ReferencePathId { get; }
public string PreviousTrajectoryId { get; }
public EmMotionModel MotionModel { get; }
public EmPlanningScope PlanningScope { get; }
}
// The request owns this DTO contract; Task 2 adds its request-bound settings.
@@ -0,0 +1,7 @@
namespace MultiWheelC.TrajectoryPlanning.EMPlanner;
public enum EmPlanningScope
{
RollingHorizon,
FullDirectionSegment,
}
@@ -19,5 +19,8 @@ public enum EmPlanningStatus
Cancelled,
ValidationFailed,
Superseded,
NoProgress,
TerminalPoseMismatch,
FullSegmentResourceLimitExceeded,
Failed,
}
@@ -16,7 +16,8 @@ public sealed class EmTrajectoryMetadata
int segmentIndex,
TravelDirection direction,
EmTerminalType terminalType,
EmLongitudinalMode longitudinalMode)
EmLongitudinalMode longitudinalMode,
EmPlanningScope planningScope)
{
if (string.IsNullOrWhiteSpace(trajectoryId))
throw new ArgumentException("A trajectory ID is required.", nameof(trajectoryId));
@@ -34,6 +35,8 @@ public sealed class EmTrajectoryMetadata
throw new ArgumentOutOfRangeException(nameof(terminalType));
if (!Enum.IsDefined(typeof(EmLongitudinalMode), longitudinalMode))
throw new ArgumentOutOfRangeException(nameof(longitudinalMode));
if (!Enum.IsDefined(typeof(EmPlanningScope), planningScope))
throw new ArgumentOutOfRangeException(nameof(planningScope));
TrajectoryId = trajectoryId;
GeneratedAtUtc = generatedAtUtc;
@@ -46,6 +49,7 @@ public sealed class EmTrajectoryMetadata
Direction = direction;
TerminalType = terminalType;
LongitudinalMode = longitudinalMode;
PlanningScope = planningScope;
}
public string TrajectoryId { get; }
@@ -59,4 +63,5 @@ public sealed class EmTrajectoryMetadata
public TravelDirection Direction { get; }
public EmTerminalType TerminalType { get; }
public EmLongitudinalMode LongitudinalMode { get; }
public EmPlanningScope PlanningScope { get; }
}