29 lines
978 B
Markdown
29 lines
978 B
Markdown
# 舵轮转向响应处理
|
|
|
|
此工具读取 M 层 `StartWheelSpeedDiagnostic` / `StopWheelSpeedDiagnostic` 生成的 `*_snapshot.csv`,用于分析正常、蟹行、自转模式切换时四个舵轮的响应。
|
|
|
|
首次使用时安装依赖:
|
|
|
|
```powershell
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
在本目录运行:
|
|
|
|
```powershell
|
|
python .\plot_steering_response.py
|
|
```
|
|
|
|
默认选择 `MyParking\logs\wheel-speed` 中最新的快照 CSV,并在同级 `plots` 文件夹生成:
|
|
|
|
- `*_steering_angles.png`:四轮目标角、实际角和 ±120°机械限位;
|
|
- `*_steering_error_pid.png`:四轮转角误差与 PID 输出;
|
|
- `*_motor_command_feedback.png`:八个电机的最终命令速度与 CAN 反馈速度;
|
|
- `*_mode_speed_limit.png`:正常/蟹行/自转模式变化和 `SendThresSpeed`。
|
|
|
|
也可以指定一个文件或局部时间范围:
|
|
|
|
```powershell
|
|
python .\plot_steering_response.py --input "D:\\xxx_snapshot.csv" --from-seconds 2 --to-seconds 15
|
|
```
|