9、ROS_ APP mapping navigation

Note: This course takes Rosmaster-X3 as an example. Users need to modify according to their own motion model, which is different from the content of handheld laser radar mapping. This mapping adds odom data, so users need to have odom data in their own motion model.

Function package path: ~/oradar_ws/src/yahboomcar_nav

9.1、Mapping

9.1.1、Start

Input terminal

9.1.2、Usage

After the robot is started, click APP,

image-20221202152517363

Modify the corresponding topic name.

At this time, you can enter the map creation function without modifying it. Do not modify it during the presentation.

image-20221202152544220

Need ensure that the mobile phone and the robot are in the same network, enter the robot's [IP] in the [Master URI], and click [CONNECT] to log in.

image-20221202152612473

The drawing creation interface, as shown below.

image-20221202152643233

Click area【6】to switch with area【7】 interface.

Since there is no subscription topic for image, only YAHBOOM logo is displayed. If the camera node is enabled, view the image topic.

Select an image topic and fill it in.

image-20221202152904125

At this point, there is an image in the interface.

image-20221202152941611

Slide the rocker of part 【8】.

When sliding the rocker, the slower the speed, the better the effect (especially the rotation speed).

Control the robot to move until the map is created.

9.1.3、Save Map

After the map is created, click [3] to save the map.

image-20221202153050633

Click above the horizontal line, enter the name of the saved map 【my】, and click [Finish] (English only, no symbol).

image-20221202153114712

The map saved successfully dialog box pops up, and click [OK] to finish.

image-20221202153136994

9.2、Navigation avoid

9.2.1、Start

Input following command.

9.2.2 Usage

The login method is the same as that above. After login, you can directly enter the map creation interface. At this time, you need to click 【4】to enter the navigation interface and switch the screen.

image-20221202153357562

Enter the navigation interface.

image-20221202153426632

As can be seen in the above figure, the robot is at the origin when building the map, but we do not put the robot at the origin position, so the scanned point does not coincide with the map. At this time, we need to set the initial position and posture of the robot. First, click【9】, select the approximate position of the robot in the map, do not release, and continue to slide to the approximate position of the robot. Make the scanned points coincide with the map as much as possible.

image-20221202153526512

Click【10】, select the target position of the robot in the map, do not loosen it, continue to slide to the position that the robot wants to maintain, and after loosening, the robot will drive to the target position.

image-20221202153621442

app.launch

Code path:

~/oradar_ws/src/yahboomcar_nav/launch/library