Welcome to RDK X3 Robot repository
9. App mapping and navigation
9. App mapping and Navigation
9.1 Program function description
After the programs of the virtual machine side and the car side are started, the mobile phone downloads the ROS2 Robot software, and opens the IP on the connected car, you can control the car movement, drawing and navigation.
9.2. Program Launch
1. Startup process of app mapping code
After SSH connects to the car, terminal input,
ros2 launch yahboomcar_nav map_gmapping_app_launch.xml
Another terminal input
xxxxxxxxxxros2 launch yahboom_app_save_map yahboom_app_save_map.launch.py
Start drawing.
2. Mobile APP terminal operation (drawing)
- Connect the car and enter the car IP

Control robot movement, control area on the right

Save map

Then enter the name of the save in the pop-up box and click Submit

After the drawing is completed, click "Save map", and the map saving path is as follows:
xxxxxxxxxx/root/yahboomcar_ws/src/yahboomcar_nav/maps
3. Startup process of app navigation code
Assume that the map name input is [test], the terminal input
xxxxxxxxxxros2 launch yahboomcar_nav navigation_dwb_app_launch.xml map:=/root/yahboomcar_ws/src/yahboomcar_nav/maps/test.yaml
Replace [test] with the name you entered when saving.
4. Mobile APP operation (navigation)
- Connect the car and enter the car IP

After starting, you can see the current position of the car and the laser point cloud. The initialization point is set before navigation. Click the Set initialization point button.

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

To set the target point, click the Set Navigation Point button. After the interface is loaded, set a target point on the map interface, wait for the car to automatically plan the route, and run to the target point.
