chore: save current workspace progress

This commit is contained in:
梁薄云
2026-08-09 22:13:18 +08:00
parent 650c2ab0e3
commit 2f4fd15e52
449 changed files with 76593 additions and 971 deletions
@@ -12,6 +12,7 @@ internal static class TrajectoryChecks
public static void Run()
{
VerifiesForwardFieldsExactTerminalAndHold();
VerifiesSegmentLocalReferenceStationIsPublished();
VerifiesReverseTravelVelocityAndUnwrappedYaw();
VerifiesPublishedListsAreImmutable();
VerifiesRollingTrajectoryHasNoSyntheticStopTail();
@@ -49,6 +50,30 @@ internal static class TrajectoryChecks
"reverse yaw interpolation unwraps across the pi boundary");
}
private static void VerifiesSegmentLocalReferenceStationIsPublished()
{
EmTrajectory trajectory = new EmTrajectoryAssembler().Assemble(
CreatePath(TravelDirection.Forward, 0d, 0d), CreateLongitudinalResult(),
CreateMetadata(TravelDirection.Forward, EmTerminalType.Goal));
EmTrajectoryPoint terminal = trajectory.Points[trajectory.Points.Count - 1];
Verification.NearlyEqual(1d, terminal.SegmentLocalS,
"published SegmentLocalS retains the lateral path reference station");
Verification.NearlyEqual(0.12d, terminal.PathS,
"published PathS remains the longitudinal actual path distance");
ValidationContext context = CreateValidationContext();
EmTrajectory validationTrajectory = CreateValidationTrajectory(TravelDirection.Forward);
EmTrajectoryValidationResult accepted = new EmTrajectoryValidator().Validate(validationTrajectory, context.EmptyMap,
context.Vehicle, context.Configuration, 2, 1d, 0.0055d, EmBoundaryType.Goal);
Verification.True(accepted.IsValid,
"publication validates reference and actual path bounds independently: " + accepted.Message);
EmTrajectoryValidationResult segmentExceeded = new EmTrajectoryValidator().Validate(validationTrajectory,
context.EmptyMap, context.Vehicle, context.Configuration, 2, 0.5d, 0.0055d, EmBoundaryType.Goal);
Verification.Equal(EmTrajectoryValidationFailure.SegmentBoundaryExceeded, segmentExceeded.Failure,
"segment-local reference bound is checked independently of PathS");
}
private static void VerifiesPublishedListsAreImmutable()
{
EmTrajectory trajectory = new EmTrajectoryAssembler().Assemble(