DonkeyCar for JetRacer ROS Tutorial IV: Joystick Control

From Waveshare Wiki
Jump to: navigation, search

DonkeyCar for JetRacer ROS Tutorial

Joystick Control

  • Plug the gamepad receiver into the jetson nano, 【Note】The receiver should be connected to the jetson nano instead of the USB port of the computer.
  • Run the following command to start the joystick control car.
cd ~/mycar
python manage.py drive --js

Donkeycar Joystick Control.png

  • If you want to boot the joystick by default, or add "--js" to modify "myconfig.py" every time, you can modify the value of "USE_JOYSTICK_AS_DEFAULT" to "True".
  • Joystick control

Donkey Joystick Control03.png

    • Left stick - control steering left and right
    • Right stick - controls the throttle front and rear
    • A key - select toggle mode "User, Local Angle, Local(angle and throttle)"
    • Whenever the throttle is not zero, driving data will be recorded as long as you are in user mode!
    • B key - Press and hold this key to not record driving data, release it to resume recording data.
    • X key - delete the last 100 driving data records
    • R1 - Increase throttle ratio
    • L1 - Decrease throttle ratio
    • Start key - toggles constant throttle. Set to max throttle (modified by X and Triangle)
  • Open the ~/mycar/config.py file and find the following sections to set gamepad-related parameters, such as similar to the gamepad, maximum throttle, maximum steering angle, etc.

Donkeycar Joystick Control07.png