Welcome to ROSMASTER R2 repository
3. Handle remote control
3. USB wireless controller + mobile phone screen remote control tutorial
3.1. Startup steps
After booting up and entering the program, first close the big program. You can refer to the second section of "05. ROSMASTER Basic Control Tutorial" "2. Close the big program that starts automatically when the machine is turned on."
Raspberry Pi PI5, Jetson Nano master control, need to enter the docker container first, Orin master control does not need to enter,
Open the terminal, enter,
cd ~/Rosmaster/rosmasterpython3 rosmaster_no_control.py
Open another terminal,
xros2 launch yahboomcar_bringup yahboomcar_bringup_R2_launch.py
Refer to [7, Docker]-[5, Enter the robot's docker container] to enter the container and open multiple docker terminals
Refer to [9, Robot chassis and control]-[Robot control] Enter commands in the docker terminal to control the car
Refer to the "Mobile APP Remote Control Tutorial" in "03, Mobile Remote Control Tutorial", let the mobile phone connect to rosmaster, and then you can see the picture transmitted by rosmaster on the mobile phone screen,
Click here to enter the control screen

Click here to watch in full screen.

Fix the phone on the handle, press the start button on the handle, and you can control it after hearing a beep.
Notes on using the handle
When connecting the USB handle receiver, it is recommended to connect it to the outermost USB-HUB expansion board instead of directly connecting it to the motherboard or the middle USB-HUB expansion board (X3plus). If it is directly connected to the motherboard or the middle USB-HUB expansion board (X3plus), the handle signal reception will be seriously interfered with due to the aluminum alloy blockage above and below.
After plugging and unplugging the handle receiver, you need to restart the handle program, otherwise you will not be able to control the car.
After starting the handle control program, if the handle cannot control the car, it may be caused by the wrong handle control mode. You can press and hold the handle mode button for about 15 seconds to switch the mode. After the green indicator light is always on, press the start button again. If there is a buzzer, it means the switch is successful. If there is no response, you can press and hold the handle mode button for 15 seconds again.
Jetson series supports mode: PC/PCS mode
Raspberry Pi series supports mode: X-BOX mode

After re-plugging the handle receiver or restarting the motherboard, the handle will reset to factory mode. If it cannot be controlled, you need to re-switch the mode every time you plug or restart.