DonkeyCar for JetRacer ROS Tutorial IV: Joystick Control
From Waveshare Wiki
DonkeyCar for JetRacer ROS Tutorial
- DonkeyCar for JetRacer ROS Tutorial I: Install Jetson Nano
- DonkeyCar for JetRacer ROS Tutorial II: Setup Linux PC
- DonkeyCar for JetRacer ROS Tutorial III: Web Control
- DonkeyCar for JetRacer ROS Tutorial IV: Joystick Control
- DonkeyCar for JetRacer ROS Tutorial V: Collect Data
- DonkeyCar for JetRacer ROS Tutorial VI: Training Data
- DonkeyCar for JetRacer ROS Tutorial VII: Autonomous Driving
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
- 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
- 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.