24 lines
751 B
Plaintext
24 lines
751 B
Plaintext
还可以把底盘的失败原因暴露出来:
|
|
/// <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
|