The purpose of vehicle calibration is to find the throttle and brake commands that accurately produce the amount of acceleration requested from the control module.
Preparation consists of the following task sequence:
- Gain access to the relevant code.
- Change the driving mode.
- Select the testing site.
- Canbus, which includes modules for:
- GPS Driver
- Localization
Set the driving mode in modules/canbus/conf/canbus_conf.pb.txt
to AUTO_SPEED_ONLY
.
The preferred testing site is a long flat road.
After preparation, complete the following task sequence from modules/tools/vehicle_calibration
:
- Collect data.
- Process data.
- Plot results.
- Convert results to
protobuf
.
- Run
python data_collector.py
for different commands, commands like x y z, where x is acceleration command, y is speed limit(mps), z is decceleration command,Positive number for throttle and negative number for brake.Run each command multiple times. - Adjust the command script based on the vehicle response.
- Run
python plot_data.py
to open recorded data and visualize collected data.
like 15 5.2 -10
, will create and record a file named t15b-10r0.csv
.
Run process_data.sh
on each recorded log individually. data log is processed to t15b-10r0.csv.result
.
Run python plot_results.py t15b-10r0.csv.result
to visualize final results. Check for any abnormality.
If everything looks good, run result2pb.sh
to move calibration results to protobuf
defined for the control module.