DonkeyCar for Pi-Calibrate DonkeyCar

From Waveshare Wiki
Jump to: navigation, search

Guide of DonkeyCar

Calibrate DonkeyCar

To make sure that the Donkeycar can turn around successfully, you need to calibrate the car both in hardware and software.
Keep the front wheels forward when assembling. You need to adjust the length of the pull-bars.
DonkeyCar for Jetson Nano 4-1.png.png
Adjust the steering servo
DonkeyCar for Jetson Nano 4-2.png.png
Open the terminal and use commands to calibrate
cd ~/mycar
donkey calibrate --channel 0 --bus=1
Type value 360 (or 300, 400) to check if the steering servo turns
DonkeyCar for Jetson Nano 4-3.png.png
Adjust the value to make the servo turns to the center place (keep forward) and remember the value. For example, if the value 330 could work and let the servo keep in the center, you can test if 230 and 430 can let the servo turns to the far left and the far right.
Then Once you get the far left data and the far-right data, you can modify the config.py file and change the STEERING_LEFT_PWM and STEERING_RIGHT_PWM.
DonkeyCar for Jetson Nano 4-6.png.png
Note that you cannot set the angle in which the steering servo turns too big or too small. You can adjust it as below (far right)
DonkeyCar for Jetson Nano 4-4.png.png
Finally, check if the throttle is set correctly as below
DonkeyCar for Jetson Nano 4-7.png.png