Welcome to Muto RS Robot repository
11) APP mapping
11. APP mapping
1. Program function description
After the program is started, you can use the APP to remotely implement gmapping and cartographer mapping.
2. Program code reference path
After entering the docker container, the source code of this function is located at
xxxxxxxxxx/root/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/launch/root/yahboomcar_ros2_ws/yahboomcar_ws/src/robot_pose_publisher_ros2/root/yahboomcar_ros2_ws/yahboomcar_ws/src/laserscan_to_point_pulisher
3. Configuration before use
Note: Since the Muto series robots are equipped with multiple radar devices, the factory system has been configured with routines for multiple devices. However, since the product cannot be automatically recognized, the radar model needs to be manually set.
After entering the container: Make the following modifications according to the lidar type:
xxxxxxxxxxroot@ubuntu:/# cdroot@ubuntu:~# vim .bashrc
After the modification is completed, save and exit vim, and then execute:
xxxxxxxxxxroot@jetson-desktop:~# source .bashrc------------------------------------ROS_DOMAIN_ID: 26my_robot_type: Muto | my_lidar: a1------------------------------------root@jetson-desktop:~#
You can see the current modified lidar type.
4. Program startup
4.1. Start command
After entering the docker container, start the following nodes from the terminal:
#Start ROSBridge and web serviceros2 launch rosbridge_server rosbridge_websocket_launch.xml#--------------------------Choose one of the following mapping algorithms-----------------------------------ros2 launch yahboomcar_nav map_cartographer_launch.py #Start cartographer mapping#Orros2 launch yahboomcar_nav map_gmapping_launch.py #Start gmapping mapping-----------------------------------------------------------------------------#Start publishing robot location noderos2 launch robot_pose_publisher_ros2 robot_pose_publisher_launch.py#Start the node that publishes laser data transfer pointsros2 run laserscan_to_point_pulisher laserscan_to_point_pulisher#Start saving map service noderos2 launch yahboom_app_save_map yahboom_app_save_map.launch.py#Start the camera node to view the camera screenros2 run usb_cam usb_cam_node_exe --ros-args --remap /image_raw/compressed:=usb_cam/image_raw/compressed
4.2. Open the APP and start the mapping mode
For Android users, open the mobile browser and scan following QR code to download and install Yahboom ROS Robot APP.
For iOS users, please search [Yahboom ROS Robot] on App store, or open camera or brower, scan following QR code to download and install Yahboom ROS Robot APP.

Install the APP on your phone and open the APP. The picture below 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.11.203. This address is the actual IP address of the car. Please enter it according to the actual situation during actual operation. After completing the input, click the Next button.

After the mapping mode is started, you can see the current laser point cloud and the laser-scanned map.

The robot control area on the right side can control the robot to move forward, backward, turn left, and turn right.
After we control the robot to complete the map construction, click the Save Map button.
Then enter the saved name in the pop-up box and click Submit.

After submission is completed, the map will be saved in the following path:
/root/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/maps