Car Calibration
Calibrating your car's steering and throttle pwm values are important so that it can drive correctly
Calibrating the Cars
Connect your personal computer to the car and go into the donkeycar container:
open the terminal application on your computer
connect to the car using ssh
Run the following command to calibrate the steering:
This will prompt you to input pin values for steering. Test out 360 and then 300 and 400 (etc.) in order to test the optimal number, it can be different for every car, note the optimal number for left and right turns.
Make sure that the numbers remembered for left and right turns are not causing the car to “whine.”
Remember which values correspond to the wheels turning all the way to the right and all the way to the left
For reference, our value for maximum left steering was 520 and maximum right steering was 260
Run the following command to calibrate the throttle:
This will prompt you to input pin values for the throttle. Test out 360 and then 300 and 400 in order to test the optimal number, it can be different for every car, not the optimal number for throttle speed. For reference, our throttle pwm values were 410 for forward, 370 for stopped, and 300 for reverse. Yours might be different depending on what you want the max speed of your car to be.
Change the pwm steering values within the myconfig.py with the optimal ones found in steps 1 and 2:
nano myconfig.py
The variable is named PWM_STEERING_THROTTLE and various steering parameters can be modified.
example:
Last updated