Files
ParkingRobot/.superpowers/sdd/task-3-report.md
T

3.1 KiB

Task 3:统一几何导数与公平原始基线

完成内容

  • PathGeometryAnalyzer 在每个独立方向段内一次性计算车辆曲率数组、dκ/ds 数组和导数峰值;换挡重复点绝不参与同一次差分。
  • PathGeometryAnalysis 提供导数峰值和 CurvatureVariationCost 兼容别名;每个分析输出点携带有限导数。
  • PreparedDirectionSegment 可携带经验证的物理起始车辆曲率;预处理、重采样和现有平滑候选均保持该边界状态。
  • 原始路径基线改由与候选相同的几何分析器、输出间距和安全验证器构建,并从分析结果生成全部指标(含峰值导数)。
  • 净空复核要求导数有限,且重建输出时原样保留导数;粗路径回退也保留导数。

TDD 记录

RED

dotnet build ClumsyPilot/ClumsyPilot.csproj --no-restore
powershell -ExecutionPolicy Bypass -File ClumsyPilot/tests/verify_path_smoothing_geometry.ps1

构建成功(2 个既有 obsolete 警告);geometry 脚本按预期失败:

PathGeometryAnalysis must expose peak d-kappa/d-s.
powershell -ExecutionPolicy Bypass -File ClumsyPilot/tests/verify_path_smoothing_validation.ps1

按预期失败:

Clearance recomputation must preserve the first point curvature derivative. Expected=0.25 Actual=0

GREEN / 回归

dotnet build ClumsyPilot/ClumsyPilot.csproj --no-restore
powershell -ExecutionPolicy Bypass -File ClumsyPilot/tests/verify_path_smoothing_geometry.ps1
powershell -ExecutionPolicy Bypass -File ClumsyPilot/tests/verify_path_smoothing_validation.ps1
powershell -ExecutionPolicy Bypass -File ClumsyPilot/tests/verify_path_smoothing_service.ps1
powershell -ExecutionPolicy Bypass -File ClumsyPilot/tests/verify_path_smoothing_comparison.ps1

关键输出:

已成功生成。(2 个既有 obsolete 警告,0 个错误)
Path smoothing geometry checks passed.
Path smoothing validation checks passed.
Path smoothing service checks passed.
Path smoothing comparison checks passed.

文件

  • 计划列出的 geometry、preprocessor、raw-baseline、validator、facade 和两份验证脚本。
  • 为保证物理起点状态可从预处理一路传至候选分析,额外更新 ArcLengthResampler、三种现有平滑器和 SmoothingAlgorithmRunner;这些改动仅传递新增边界状态或导数指标,不改变算法几何。

自审

  • 单点段导数固定为 0;重复/零距离段继续沿既有拒绝路径失败;非有限起始边界、导数和计算结果均被拒绝。
  • 导数只以本方向段局部弧长差分;换挡的相同弧长重复点位于不同段,未用于分母。
  • 原始基线和候选均通过 PathGeometryAnalyzer 再通过 SmoothedPathValidator
  • CurvatureVariationEnergy 未删除;新增的 CurvatureVariationCost 是只读兼容别名。

风险

  • 公平基线会改变原始路径的重采样密度及因此产生的比较百分比;当前 comparison 回归脚本已通过。构建仍报告项目既有的两个 obsolete API 警告,未由本任务引入。