Welcome to MicroROS Robot repository
2. VM handle remote control
Quickly Launch the Gamepad Control Using a Virtual Machine
Note: The virtual machine needs to be on the same local area network as the vehicle, and the ROS_DOMAIN_ID must match. Refer to the "Must Read Before Use" guide to configure the IP address and ROS_DOMAIN_ID on the board.
This example uses the PS2-2.4G wireless gamepad sold by Yabo Intelligent Technology Co., Ltd. to illustrate how to quickly launch the program and control the vehicle. The code here only applies to the aforementioned gamepad; other gamepads are not compatible.
1. Start and Connect the Agent
Taking the accompanying virtual machine as an example, enter the following command to start the agent:
xxxxxxxxxxsudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8090 -v4
Then, turn on the robot switch and wait for the robot to connect to the agent. A successful connection is shown in the image below:

Then, connect the controller's receiver to the virtual machine's host and select to connect to the virtual machine.
2. Launching the Handset Control Program
2.1 Code Paths
Virtual Machine Code Path:
xxxxxxxxxx/home/yahboom/yahboomcar_ws/src/yahboomcar_ctrl/yahboomcar_ctrl
Jetson Nano Code Path:
xxxxxxxxxx/root/yahboomcar_ws/src/yahboomcar_ctrl/yahboomcar_ctrl
Raspberry Pi Code Path:
xxxxxxxxxx/root/yahboomcar_ws/src/yahboomcar_ctrl/yahboomcar_ctrl
2.2 Running Commands
Taking the accompanying virtual machine as an example, enter the following in the terminal:
xxxxxxxxxxros2 run joy joy_node ros2 run yahboomcar_ctrl yahboom_joyFor Raspberry Pi desktop and Jetson Nano desktop versions, you need to enter Docker first. Enter the following in the terminal:
xxxxxxxxxxros2_humble.shThe following interface indicates successful Docker entry:

Then, in Docker, enter the following: (See the "Docker Environment" section for how to enter the same Docker terminal)
xxxxxxxxxxros2 run joy joy_noderos2 run yahboomcar_ctrl yahboom_joy
After that, in Docker, enter the following: After the program starts, observe the indicator light on the handle. A solid light indicates a successful connection. Press "START," and the car's buzzer will sound. Press the R1 button to activate the controller. You can use the left joystick to move the car forward and backward; the right joystick to turn the car left and right; and the left and right joysticks to control the car's linear and angular velocity.