JetRacer AI Kit Tutorial II: Teleoperation
From Waveshare Wiki
Teleoperations
- Enter http://<jetbot_ip_address>:8888 in the browser address bar to connect to the car, open /jetracer/notebooks/ at the left side. Open the teleoperation.ipynb file.
- Plug the gamepad receiver into the USB port of the computer. [Note] The receiver should be connected to the computer instead of the jetson nano. The gamepad needs to be connected to the device that opens the JupyterLab webpage.
- Open the https://html5gamepad.com/ webpage to see if the remote controller is detected. Write down the INDEX value of the corresponding device.
- The value corresponding to pressing the remote controller button will change. Press the name of the corresponding key a few times. (The handle needs to press the home button so that the two lights of the remote control handle are on).
- After running this code, the window will output the buttons corresponding to the gamepad. Note that the index in the program needs to be modified to the value corresponding to the actual remote control handle, and the corresponding INDEX can be seen on the web page just opened. The button icon corresponding to the button pressed will indicate that the button has been pressed.
- The maximum speed of the throttle is set to 0.2 here, in order to collect data later to limit the speed.
- Set the steering offset to 0.18, this value is adjusted according to the actual situation, until the car can drive in a straight line without steering.
- Modify the axes value to correspond to different buttons, here is set to axes[0], and axes[5] for the convenience of remote control.
- After running the program, you can control the car through the remote control handle. Asex[0] controls the front wheel steering, and Asex[5] controls the rear wheel speed.
- The left joystick controls the steering of the front wheel of the car in the left and right directions, and the right joystick controls the speed of the rear wheels in the up and down direction.