Welcome to ROSMASTER X3 repository
10. Rosmaster_ X3 Navigation through APP
Rosmaster_ X3 Navigation Using APP
Quick to use tutorial
1、Rosmaster_ X3 power on
Turn on the power of X3, as shown in the following figure, and turn it to the ON direction.

Connecting to the network can be visualized through the X3's built-in touch screen display, connecting to WiFi within the local area network
2、Open the shell to connect to Rosmaster_ X3
Note: The IP address used during the writing of this tutorial is 192.168.2.102. The username is: Jetson, and the password is: yahboom. The actual IP address used in this tutorial shall prevail.
Open the shell tool, and the shell tool I am using here is FinalShell. Enter information such as username, password, port, and connection name.

After clicking on SSH connection, the information input box shown in the following figure will appear:

Find your own newly created connection configuration names:


3. Start ROSBridge and related node services
For Raspberry Pi PI5 master, you need to enter the docker container first. For Orin master, you do not need to enter docker and do not need to do these four steps. You can just run the command directly.
Enter the command in the terminal to create a docker environment.
~/run_docker.sh
Then enter the command:
xxxxxxxxxxdocker ps
View the docker environment just created.

Find the docker environment just created and find the CONTAINER ID. Enter the command in the terminal:
xxxxxxxxxxdocker exec -it CONTAINER ID bash
Note: CONTAINER ID is the ID of the latest docker environment just found.
Enter the following command to start rosbridge
xxxxxxxxxxros2 launch rosbridge_server rosbridge_websocket_launch.xml

Raspberry Pi 5 master control,Follow the above steps, reopen a terminal, and enter the docker environment. The docker you enter is newly created, so you don’t need to execute the ~/run_docker.sh command. Orin master control does not need to enter docker
Enter command:
Launch for navigation
xxxxxxxxxxros2 launch yahboomcar_nav navigation_dwa_launch.py
The map file directory for navigation startup is
~/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/maps/yahboomcar.yaml
Reopen a terminal and enter Docker, enter the following comman:
Start publishing robot position nodes:
xxxxxxxxxxros2 launch robot_pose_publisher_ros2 robot_pose_publisher_launch.py

Note: If the point cloud information is not displayed after full startup, wait for the mapping module to start before restarting the robot position node
Reopen a terminal and enter Docker, enter the following command:
Start the node for publishing laser data transfer points.
xxxxxxxxxxros2 run laserscan_to_point_pulisher laserscan_to_point_pulisher

Re-open a terminal and enter docker, enter the following command
Start chassis and radar nodes
xxxxxxxxxxros2 launch yahboomcar_nav laser_bringup_launch.py
Open another terminal and start the camera
xxxxxxxxxxros2 launch usb_cam demo_launch.py #pi5 motherboard
ros2 launch usb_cam camera.launch.py #orin motherboard4、Open the app and activate navigation mode
Install the app on your phone and open it. The following figure shows the APP opening interface:

Enter the IP address in the input box. The IP address here is the IP address of the car, such as 192.168.2.81. This address is the actual IP address of the car. Please enter it according to the actual situation during operation. After completing the input, click the Next button.

Click on the settings button (three horizontal lines) in the upper left corner to pop up an option and select navigation mode.

After startup, you can see the current position of the X3 car and the laser point cloud. Set the initialization point before navigation. Click the Set Initialization Point button.

Then click on a point on the map and rotate it in the desired direction to set it as the initialization point.

After the initial point setting is completed, the robot position and point cloud will move to the position of the set point. Then click on the Set Navigation Point button. After waiting for the interface to load, set a target point on the map interface, wait for the car to automatically plan the route, and run to the target point.
