8. APP mapping

Quick use

1. Rosmaster_R2 Power Up

Power up the R2 with the switch shown below flipped to the ON direction.

WechatIMG131_副本

Connecting to the network can be visualized through the touchscreen display that comes with the X3, and connecting to WiFi on the LAN.

2. Open the shell and connect to Rosmaster_R2.

Note: At the time of writing this tutorial, we are using the IP address 192.168.2.102, username is jetson, password is yahboom, and the actual IP address is based on the actual use.

Open a shell utility, in this case FinalShell, and enter your username, password, port and connection name.

image-20230428175429331

image-20230428180010378

image-20230428180238626

image-20230428180624535

image-20230428180827038

3. Starting ROSBridge and web services

Create a docker environment by entering commands in the terminal.

Then enter the command:

docker ps

to view the docker environment you just created.

image-20230428181948904

Find the docker environment you just created and find the CONTAINER ID's and enter the command in the terminal:

Note: The CONTAINER ID is the ID of the latest docker environment you just found.

After entering docker, start rosbridge by entering the following command

image-20230428182930282

Follow the steps above to reopen a terminal and enter the docker environment. The docker you are entering is freshly created, so you do not need to execute the command . /img/run_docker.sh command.

After entering the docker environment, enter the command:

Start cartographer to build a diagram

Or start gmapping to build a map

image-20230605174145496

Re-open a terminal and go into docker and enter the following command

Initiate release of robot location nodes

image-20230605181018602

Note: If the point cloud information does not show up after a full start, wait for the map building module to start and then restart the robot position node again.

Reopen a terminal again and go into docker and enter the following command

Initiates the release of the node for the laser data transit point.

image-20230605181118454

 

Re-open a terminal and go into docker and enter the following command

Launch Save Map Service node

image-20230605181156783

4. Open the APP and start the building mode.

Install the APP on your phone and open the APP, the following figure shows the interface of opening the APP:

Mi9 Pro 5G_ScreenShot_20230509_1

Enter the IP address in the input box, here the IP address is the IP address of the cart, such as 192.168.2.102, this address is the actual IP address of the cart, please enter it according to the actual situation in practice. Click on the Next button after you have finished entering the IP address.

Mi9 Pro 5G_ScreenShot_20230509_2

Once the map building mode is activated, you can see the current laser point cloud, as well as the map of the laser scan.

Screenshot_2023-06-05-17-30-59-994_plus.H51A91252

The right robot control area allows you to control the robot to move forward, backward, turn left, and turn right.

Screenshot_2023-06-05-17-29-59-225_plus.H51A91252When we are done controlling the robot to build the map, click on the Save Map button.

Screenshot_2023-06-05-17-31-12-771_plus.H51A91252Then enter the name of the save in the pop-up box and click Submit.Screenshot_2023-06-05-17-31-47-969_plus.H51A91252

After saving is complete, you can see the path to the map save file printed by the terminal.

image-20230605180125024

 

If saving the map gives an error, it could be a combination of the map path being incorrect in the code and the xgo.db file being missing from the folder.

Move the cursor to line 26 to see the two paths, and then press the key i , the two paths of the frame will be modified according to the path on the diagram.

image-20230605182339384

Press the ESC button after the modification is done and then type :wq to save the file.

Then enter the command:

Just resave the map.