拆分MultiWheelC并新增轨迹投影、Detour状态估计与Stanley跟踪控制
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+26
-21
@@ -1,23 +1,28 @@
|
||||
还可以把底盘的失败原因暴露出来:
|
||||
/// <summary>
|
||||
/// 获取最近一次底盘运动分解失败原因。
|
||||
/// </summary>
|
||||
public string LastFailureReason =>
|
||||
_chassis.LastMotionDecomposeFailureReason;
|
||||
这样调用方可以打印:
|
||||
if (!adapter.Send(command))
|
||||
{
|
||||
Console.WriteLine(
|
||||
$"底盘命令执行失败:{adapter.LastFailureReason}");
|
||||
}
|
||||
|
||||
|
||||
需要注意,Detour 差分速度会有噪声,建议在 Python 中:
|
||||
按固定频率重新采样。
|
||||
对位置做轻微滤波或使用 Savitzky–Golay 求导。
|
||||
再计算速度,避免直接逐点差分产生尖峰。
|
||||
Stanley 和 LQR 必须使用相同的滤波和采样参数。
|
||||
|
||||
|
||||
编译命令:
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File .\build-and-package.ps1
|
||||
|
||||
|
||||
|
||||
1. TrajectoryPoint.cs 已完成
|
||||
2. Trajectory2D.cs 下一步
|
||||
3. TrajectoryProjection.cs 定义一次投影结果
|
||||
4. TrajectoryProjector.cs 实现连续线段投影
|
||||
5. TrajectoryBuilder.cs 原始离散点转标准轨迹
|
||||
|
||||
1. VehicleState.cs
|
||||
↓
|
||||
2. FirstOrderLowPassFilter.cs
|
||||
↓
|
||||
3. VelocityEstimator2D.cs
|
||||
↓
|
||||
4. IVehicleStateProvider.cs
|
||||
↓
|
||||
5. DetourVehicleStateProvider.cs
|
||||
|
||||
|
||||
|
||||
private const double LinearVelocityFilterTimeConstantSeconds =
|
||||
0.10;
|
||||
|
||||
private const double AngularVelocityFilterTimeConstantSeconds =
|
||||
0.10;
|
||||
Reference in New Issue
Block a user