Path planning method, device, computer equipment and storage medium

By segmenting the robot operation map and determining the path point set, a full coverage path is constructed, which solves the problems of low efficiency and unnecessary coverage of path planning in the existing technology, and achieves more efficient and safe robot operation.

CN114779779BActive Publication Date: 2025-05-23SHENZHEN PUDU TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210445324.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2025-05-23
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

In environments with many obstacles, the existing full coverage operation method requires a lot of time to go backtracking paths, resulting in low path planning efficiency and unnecessary coverage.

Method used

By segmenting the robot's job map, at least two local maps are obtained, and the set of path points for the robot's job is determined in each local map. Finally, a full coverage path is constructed based on the starting point of the robot's job and the set of path points corresponding to each local map.

Benefits of technology

It reduces the amount of data processing during the path planning process, improves the generation efficiency of robot job paths in local maps, avoids unnecessary coverage, and ensures safe passage of robots in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114779779B_ABST
    Figure CN114779779B_ABST
Patent Text Reader

Abstract

The present application relates to a path planning method, device, computer equipment and storage medium. The method includes: obtaining a robot's work map; based on a preset map segmentation rule, segmenting the work map to obtain at least two local maps; in each local map, determining a set of path points when the robot is working, the set of path points represents the robot's work path in the local map; according to the robot's work starting point and the path point set corresponding to each local map, constructing a full coverage path of the robot in the work map. In this way, after planning the robot's work path in the local map, the robot's full coverage path in the entire work map can be quickly constructed according to the robot's work starting point, and the full coverage path generation efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of path planning, and in particular to a path planning method, device, computer equipment and storage medium. Background Art

[0002] With the development of artificial intelligence technology, various robots are used to replace manual labor to perform full-coverage operations such as cleaning, mowing, and mine sweeping.

[0003] In related technologies, when a robot performs full-coverage operations, it moves along the boundaries of the wall, gradually expanding its search range in circles to search for the grids to be cleaned around the robot. If it encounters an infeasible obstacle area, it will trace back to the uncovered area and continue exploring new moving paths. Finally, the robot completes the cleaning work and stops at the center of the environment.

[0004] However, in an environment with many obstacles, a lot of time needs to be spent on the backtracking path, resulting in a lot of unnecessary coverage, making the full coverage operation mode inflexible and the path planning efficiency low. Summary of the invention

[0005] Based on this, it is necessary to provide a path planning method, device, computer equipment and storage medium that can flexibly and effectively plan a robot's full coverage path to address the above technical problems.

[0006] In a first aspect, the present application provides a path planning method for use in a robot. The method comprises:

[0007] Get the robot's operation map;

[0008] Based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps;

[0009] In each local map, a set of path points for the robot to operate is determined, and the set of path points represents the operating path of the robot in the local map;

[0010] Based on the robot's operation starting point and the set of path points corresponding to each local map, a full coverage path of the robot in the operation map is constructed.

[0011] In one embodiment, obtaining a robot's operation map includes:

[0012] Obtain an initial environment map of the robot's operating environment;

[0013] The initial environment map is searched for traversable areas to obtain the robot's operation map; there are no obstacle areas in the operation map.

[0014] In one embodiment, based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps, including:

[0015] Searching for local areas from the operation map according to a preset traversal order, and performing a split operation on each local area found, until the operation map is searched through, obtaining at least two local maps; wherein each local area corresponds to one local map;

[0016] The segmentation operation includes: if the area of ​​the local area reaches a preset segmentation area threshold, the local area is segmented in the work map.

[0017] In one embodiment, a full coverage path of the robot in the operation map is constructed according to the operation starting point of the robot and the set of path points corresponding to each local map, including:

[0018] According to the set of path points corresponding to each local map, the operation path of the robot in each local map is obtained;

[0019] According to the robot's operation starting point and the operation path corresponding to each local map, the connection order of each local map is determined; the operation starting point is determined according to the robot's current position;

[0020] According to the connection order of each local map, the preset map connection algorithm is used to connect the operation paths of two adjacent local maps to generate a full coverage path of the robot in the operation map.

[0021] In one of the embodiments, if there are multiple path point sets corresponding to the local map, and the multiple path point sets represent the return path circle of the robot when operating in the local map;

[0022] According to the path point set corresponding to each local map, the robot's operation path in each local map is obtained, including:

[0023] For each local map, in the order of the circular path circle from the outermost circle to the innermost circle, the moving path construction step is performed for each path circle in the circular path circle to obtain the operation path of the robot in each local map;

[0024] The mobile path construction step includes:

[0025] Determine the moving starting point of the current path circle, and determine the moving path of the current path circle according to the moving starting point of the current path circle and the path point set corresponding to the current path circle; the moving path includes the moving end point;

[0026] According to the moving end point of the current path circle, the moving starting point of the robot in the next path circle is determined; the next path circle is a path circle in the circular path circle that is adjacent to the current path circle and located inside the current path circle.

[0027] In one embodiment, determining the moving path of the current path circle according to the moving starting point of the current path circle and the path point set corresponding to the current path circle includes:

[0028] According to the moving starting point of the current path circle and the path point set corresponding to the current path circle, all the moving path points included in the moving path of the current path circle are determined, and all the moving path points are arranged in order on the moving path;

[0029] According to the preset first connection strategy, all moving path points are connected to obtain the moving path of the current path circle.

[0030] In one embodiment, the method further comprises:

[0031] Perform curvature detection on the robot's operating path in each local map, and remove moving path points with sudden curvature changes;

[0032] According to the preset second connection strategy, the trajectory smoothing process is performed on the robot's operating path in each local map.

[0033] In one embodiment, the connection order of each local map is determined according to the operation starting point of the robot and the operation path corresponding to each local map, including:

[0034] Obtain the path starting point and path ending point of the operation path corresponding to each local map;

[0035] According to the robot's operation starting point and the path starting points of each local map, the local map to which the path starting point closest to the robot's operation starting point belongs is taken as the first local map, and the local map among other path starting points closest to the path end point of the first local map is taken as the second local map, and so on, until the order of each local map is determined and the connection order of each local map is obtained; among which, the other path starting points are the path starting points of the local maps other than the first local map.

[0036] In one embodiment, in each local map, determining a set of path points for the robot to operate includes:

[0037] Filter out multiple target pixels from each local map;

[0038] Performing distance transformation processing on the pixel values ​​of multiple target pixel points in each local map to obtain the distance value of each target pixel point;

[0039] According to the distance values ​​of multiple target pixel points in each local map, a set of path points for the robot to operate in each local map is determined.

[0040] In one of the embodiments, if there are multiple path point sets corresponding to the local map, and the multiple path point sets represent the return path circle of the robot when operating in the local map;

[0041] According to the distance values ​​of multiple target pixel points in each local map, the set of path points for the robot to operate in each local map is determined, including:

[0042] According to the distance value of each target pixel point, multiple target pixel points in the local map are classified to obtain multiple pixel point sets; the distance values ​​of the target pixel points included in each pixel point set are equal;

[0043] According to the size relationship between the distance values ​​of the target pixel points included in each pixel point set, the distribution order of the multiple pixel point sets is determined to obtain multiple path point sets;

[0044] Each path circle in the circular path circle corresponds to a path point set, and the distance values ​​of the target pixel points included in the multiple path point sets decrease in a direction from the outer circle to the inner circle of the circular path circle.

[0045] In a second aspect, the present application also provides a path planning device. The device includes:

[0046] A map acquisition module is used to obtain the robot's operation map;

[0047] A map segmentation module, used to segment the operation map based on a preset map segmentation rule to obtain at least two local maps;

[0048] A path point determination module is used to determine the path point set of the robot when operating in each local map; the path point set represents the operation path of the robot in the local map;

[0049] The path planning module is used to construct a full coverage path of the robot in the operation map based on the robot's operation starting point and the set of path points corresponding to each local map.

[0050] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any method embodiment in the first aspect are implemented.

[0051] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method embodiment in the first aspect are implemented.

[0052] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of any method embodiment in the first aspect are implemented.

[0053] The above-mentioned path planning method, device, computer equipment and storage medium obtain the robot's work map; based on the preset map segmentation rules, the work map is segmented to obtain at least two local maps; in each local map, a set of path points when the robot is working is determined, and the set of path points represents the robot's work path in the local map; according to the robot's work starting point and the set of path points corresponding to each local map, a full coverage path of the robot in the work map is constructed. In this method, the work map when the robot performs the work task is divided into at least two local maps, so that the work path planning operation is performed in each local map, which can reduce the amount of data processing in the path planning process, so that the generation efficiency of the robot's work path in the local map is higher. In addition, since all movable path points of the robot in the local map are determined first, when planning the robot's work path based on the mobile path points in the path point set, there is no need to re-explore or plan the safe path points for the next move, which avoids the time consumption of exploring the path points during the robot's operation, thereby improving the path planning efficiency. Moreover, there is no moving dead zone in the work path planned based on the path point set, which ensures the safe movement of the robot while improving its ability to pass in a complex environment. That is, after planning the robot's working path in each local map, this application quickly constructs the robot's full coverage path in the entire working map based on the robot's working starting point and the working path in each local map, which is more efficient in generating a full coverage path. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic diagram of a process flow of a path planning method in one embodiment;

[0055] Figure 2 A schematic diagram of a process for determining a set of path points in one embodiment;

[0056] Figure 3 is a schematic diagram of a local map in one embodiment;

[0057] Figure 4 is a schematic structural diagram of a local mask in one embodiment;

[0058] Figure 5 is a schematic structural diagram of another local mask in one embodiment;

[0059] Figure 6 is a schematic diagram of the distribution of a set of path points in an environment image in one embodiment;

[0060] Figure 7 A schematic diagram of a process of constructing a moving path in an embodiment;

[0061] Figure 8 A schematic diagram of a construction process of another moving path in an embodiment;

[0062] Fig. 9 A schematic diagram of a process for determining a moving path point in one embodiment;

[0063] Fig.10 A schematic diagram of a flow chart of a path optimization method in an embodiment;

[0064] Fig.11 A schematic diagram of a flow chart for determining a connection order of local maps in one embodiment;

[0065] Fig.12 A schematic flow chart of a path planning method in another embodiment;

[0066] Fig.13 is a structural block diagram of a path planning device in one embodiment;

[0067] Fig.14 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0069] With the application of robots in covering work areas such as cleaning, mowing, and mine sweeping, autonomous mobile robots need to plan their own movement paths based on the environment when working to achieve safe movement and full coverage operations.

[0070] Generally, the covering path planning adopts the arch strategy and the spiral strategy. Among them, the spiral covering strategy is to let the robot follow the boundary of the wall, gradually expand the search range in circles, and search whether there is a grid to be operated closest to the robot, and then move clockwise or counterclockwise along the U-shaped path. When the sensor carried by the robot detects an obstacle or wall in front, it will turn 90 degrees to avoid the obstacle or wall. After the operation is completed, the robot will stop at the center of the environment.

[0071] Although the algorithm of the U-shaped coverage path planning model is simple and the logic is simple and easy to implement, every time an infeasible area is encountered, the robot needs to backtrack to the uncovered area and continue to explore new paths, resulting in an inflexible coverage method. Moreover, in a complex environment with many obstacles, when there is a dead zone that prevents the robot from moving forward, it takes a lot of time to backtrack to the uncovered area, and there are uncovered areas, and many unnecessary repeated coverages are generated in the backtracking process.

[0072] In addition, most of the time, the environment map in which the robot performs its tasks is relatively large. During planning, the entire environment map is covered in a one-time spiral. This not only increases the difficulty of the loop algorithm in performing one-time path planning in a complex large environment map, but also makes it difficult to ensure the uniformity and passability of the generated full coverage path. The efficiency of generating a full coverage path is low, resulting in low overall work efficiency of the robot and poor motion status.

[0073] Based on this, the present application provides a path planning method, device, computer equipment and storage medium, which first divides the operation map and plans the operation path, then connects the operation paths of each local map to generate a global coverage path for the entire operation map. While ensuring the quality of the operation path in the local map, the generation efficiency of the robot's overall full coverage path is higher and the motion planning strategy is better.

[0074] The path planning method provided in the present application can be applied to any computer device, so that the computer program stored in the memory is called by the processor in the computer device, and the path planning method provided in the present application is implemented when the computer program is executed. The computer device can be a terminal or a server, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server.

[0075] As an example, the terminal may be, but is not limited to, a sweeping robot, a lawn mower, a minesweeping device, various personal computers, laptops, smart phones, tablet computers, portable wearable devices, etc., and the server may be implemented as an independent server or a server cluster consisting of multiple servers.

[0076] Next, the technical solutions of the embodiments of the present application and how the technical solutions of the embodiments of the present application solve the above-mentioned technical problems will be described in detail through embodiments and in combination with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that a path planning method provided in the embodiments of the present application, the execution subject of which can be a computer device, a robot, or a path planning device, can be implemented as part or all of the processor by software, hardware, or a combination of software and hardware. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments.

[0077] In one embodiment, Figure 1 As shown, a path planning method is provided, and the method is applied to a robot for example, comprising the following steps:

[0078] Step 110: Obtain the robot's operation map.

[0079] The operation map is a map of areas without obstacles.

[0080] In a possible implementation, the implementation process of step 110 may be: obtaining an initial environment map of the robot's operating environment; searching the initial environment map for traversable areas to obtain the robot's operating map.

[0081] As an example, the initial environment map can be a map constructed in real time after the robot collects environmental information through the environmental information collection device carried by itself during the actual process. The environmental information collection device can be any sensor that can detect the distribution of obstacles in the environment, such as a camera, RGBD camera, binocular camera, radar, infrared sensing device, etc. The initial environment map can also be a ready-made map directly obtained from other devices, for example, obtaining the floor plan of the building from the property office of the building where the robot is working, and using it as the initial environment map. This embodiment does not limit this.

[0082] In addition, when searching for a traversable area in the initial environment, the A* algorithm search may be used, or the Boustrophedon Cellular Decomposition (BCD) and / or ox-ploughing decomposition method may be used, which is not limited in this embodiment.

[0083] Step 120: Based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps.

[0084] Among them, the preset map segmentation rules can be based on equal area segmentation, based on traversable area segmentation, or based on map feature segmentation, etc. This embodiment does not limit the segmentation strategy, and aims to reduce the planning scope of the operation path through segmentation processing, reduce the data processing volume and the complexity of the global planning algorithm.

[0085] Specifically, segmentation based on equal area means dividing the work map into multiple local maps according to the overall area size to ensure that the area of ​​each local map is equal; segmentation based on traversable area means determining the traversable area in the work map according to whether the pixel point is an obstacle point, and each traversable area is regarded as a local map; segmentation based on map features means dividing the work map into multiple local maps according to the distribution of obstacles in the map or the road conditions of the moving plane in the map, and the road conditions of each local map are consistent and the obstacles are evenly distributed.

[0086] Optionally, when the computer device has parallel data processing capabilities, for at least two local maps, multiple threads can be used to plan the robot's operating path in each local map in parallel. That is, the operating path planning tasks of multiple local maps are assigned to multiple threads of the computer device, so that each thread generates the operating path of the corresponding local map after executing the corresponding operating path planning algorithm.

[0087] Step 130: In each local map, determine a set of path points for the robot to operate; the set of path points represents the operating path of the robot in the local map.

[0088] It should be noted that if the number of path point sets corresponding to the local map is one, then the path point set represents the robot's working path in the local map; if the number of path point sets corresponding to the local map is multiple, then the multiple path point sets represent the robot's working path in the local map as a circular path circle, and each path point set corresponds to a path circle in the circular path circle.

[0089] It should be understood that if the working path in the robot's local map is a circular path circle, the robot can move from the outer circle to the inner circle or from the inner circle to the outer circle when performing the working task along the circular path circle.

[0090] In one possible implementation, step 130 may be implemented by traversing the pixel points in each local map, screening out target pixel points that meet the robot's safe movement conditions, and determining a set of path points for the robot to operate based on the screened target pixel points.

[0091] Step 140: Construct a full coverage path of the robot in the operation map based on the robot's operation starting point and the set of path points corresponding to each local map.

[0092] The operation starting point is determined based on the current position of the robot. For example, in the set of path points corresponding to each local map, the moving path point with the shortest distance to the current position of the robot is determined as the operation starting point. For another example, the operation starting point is the moving path point with the shortest distance to the current position of the robot determined in the first local map; the first local map is the local map where the robot first starts to perform the operation task.

[0093] In a possible implementation, the implementation process of step 140 may be: based on the set of path points corresponding to each local map, obtain the robot's operating path in each local map; determine the connection order of each local map based on the robot's operating starting point and the operating path corresponding to each local map; based on the connection order of each local map, use a preset map connection algorithm to connect the operating paths of two adjacent local maps to generate a full coverage path of the robot in the operating map.

[0094] As an example, the map connection algorithm may be a hybrid A* algorithm (hybrid astar), or a jump point search algorithm (Jump Point Search, JPS), or other algorithms that can achieve mobile path point connection, which is not limited in this embodiment.

[0095] In the above path planning method, after obtaining the robot's work map, the work map is segmented based on the preset map segmentation rules to obtain at least two local maps; in each local map, a set of path points when the robot is working is determined, and the set of path points represents the robot's work path in the local map; according to the robot's work starting point and the set of path points corresponding to each local map, a full coverage path of the robot in the work map is constructed. In this method, the work map when the robot performs the work task is divided into at least two local maps, so that the work path planning operation is performed in each local map, which can reduce the amount of data processing in the path planning process and make the generation efficiency of the robot's work path in the local map higher. In addition, since all movable path points of the robot in the local map are determined first, when planning the robot's work path based on the mobile path points in the path point set, there is no need to re-explore or plan the safe path points for the next move, which avoids the time consumption of exploring the path points during the robot's work, thereby improving the path planning efficiency. Moreover, there is no moving dead zone in the work path planned based on the path point set, which ensures the safe movement of the robot while improving its ability to pass in a complex environment. That is, after planning the robot's working path in each local map, this application quickly constructs the robot's full coverage path in the entire working map based on the robot's working starting point and the working path in each local map, which is more efficient in generating a full coverage path.

[0096] In one embodiment, the present application further provides a map segmentation method, which can be used in the above step 120 to segment the work map based on a preset map segmentation rule to obtain at least two local maps.

[0097] In a possible implementation, local areas are searched from the operation map according to a preset traversal order, and a segmentation operation is performed on each local area searched until the operation map is searched and at least two local maps are obtained; wherein each local area corresponds to one local map;

[0098] The segmentation operation includes: if the area of ​​the local area reaches a preset segmentation area threshold, the local area is segmented in the work map.

[0099] As an example, the preset traversal order may be from left to right and from top to bottom, or from bottom to top and from right to left.

[0100] In addition, the area of ​​the local area reaches the segmentation area threshold, that is, the area of ​​the local area is equal to the segmentation area threshold. The segmentation area threshold can be determined based on the operation path planning time. Under the condition that the robot can move normally in the local map, the smaller the local map, the shorter the time required for planning the operation path, and the higher the planning rate.

[0101] That is, when the work map is segmented, each grid in the work map can be searched in a preset traversal order, and the area of ​​the searched grid can be calculated in real time. When the area of ​​the searched area reaches the segmentation area threshold, the search of the first local area is completed, a segmentation operation is performed, and the first local map is obtained. The area of ​​the searched area is reset to zero, and the next grid in the work map is traversed, and the area of ​​the searched grid is calculated. When the area of ​​the searched area reaches the segmentation area threshold again, the search of the second local area is completed, a segmentation operation is performed, and the second local map is obtained. By analogy, after traversing and searching the entire work map, at least two local maps are obtained.

[0102] It should be noted that if the grid area of ​​the entire operation map is smaller than the segmentation area threshold after traversing the entire operation map, the operation map is directly segmented into two local maps of equal area according to the grid area of ​​the operation map.

[0103] In this embodiment, the operation map is traversed and searched, and the operation map is segmented in the local area search process, so the operation map segmentation method is more flexible. At the same time, segmentation is performed based on a preset segmentation area threshold, which balances the time required for planning the robot operation path in each local map to a certain extent, thereby minimizing the time required to generate a full coverage path of the entire operation map.

[0104] Based on the above embodiments, in one embodiment, Figure 2 As shown, the implementation method of determining the set of path points when the robot is working in each local map may include the following steps:

[0105] Step 210: Filter out a plurality of target pixels from each local map.

[0106] The target pixel point may be determined based on a preset safety distance, that is, the pixel points in each local map are traversed according to the safety distance, and a plurality of target pixel points are determined in each local map.

[0107] It should be understood that after executing the pixel traversal operation on each local map, a plurality of target pixel points are obtained, and the plurality of target pixel points corresponding to each local map are used to construct the operation path of the local map.

[0108] Furthermore, the distances between the screened target pixel points are all greater than or equal to the safety distance. When the robot is at the target pixel point determined based on the safety distance, it will not collide with surrounding obstacles and can achieve safe movement.

[0109] In a possible implementation, the safety distance is determined based on the geometric information of the robot. The geometric information of the robot can reflect the space occupied by the robot when operating. The geometric information at least includes the center point position, length, width, height, etc. of the robot body.

[0110] As an example, the safety distance can be achieved by the following formula (1).

[0111]

[0112] Where I(d) is the safety distance, d is the diameter / width of the robot, Mapmin is the minimum resolution of the work map (i.e., image resolution, measured in pixels per inch), and n is the preset number of pixels, n ≥ 1. For example, the preset number of pixels n can be 1.

[0113] It should be noted that when calculating the safe distance, not only the geometric information of the robot is fully considered to ensure that when the robot moves according to the safe distance, full coverage of the local map can be achieved. This application determines the coverage range of the robot body according to the diameter / width of the robot and the minimum resolution of the environmental map, and then subtracts the preset number of pixels. This can ensure that every time the robot moves a safe distance, n pixels are repeatedly covered.

[0114] Optionally, in order to reduce the amount of calculation in the subsequent process of determining the set of path points, the pixel value of each pixel point in the local map may be pre-processed by using a binarization process.

[0115] As an example, see Figure 3 In the local map shown, the pixel value of each pixel in the local map is set to 1, wherein the pixel values ​​are all 1, indicating that there is no obstacle area in the local map, and all of them are the robot's working area.

[0116] However, which pixel points in the working area can ensure the safe operation of the robot and which pixel points will cause the robot to easily collide with obstacles during operation still need to be screened through steps 210 to 230 in this embodiment to determine the set of path points for the robot when operating in each local map.

[0117] Step 220: Perform distance transformation processing on the pixel values ​​of multiple target pixel points in each local map to obtain the distance value of each target pixel point.

[0118] In a possible implementation manner, the implementation process of step 220 may be: performing distance transformation processing on the pixel value of each target pixel point through the first local mask and the second local mask to obtain the distance value of each target pixel point.

[0119] The distance value represents the distance between each target pixel in the local map and the local map boundary. The pixel value of the target pixel is subjected to distance transformation processing by the first local mask and the second local mask, and the pixel value of the target pixel can be updated in combination with the distance values ​​of the eight pixels around the target pixel, so that the distance value can reflect the accurate distance between the target pixel and the local map boundary.

[0120] In one embodiment, the process of distance transformation processing can be: through a first local mask, according to a first traversal path, the pixel value of each target pixel is updated to obtain a first updated value of each target pixel; through a second local mask, according to a second traversal path, the first updated value of each target pixel is updated to obtain a second updated value of each target pixel; the second updated value of each target pixel is used as the distance value of each target pixel.

[0121] Among them, the first traversal path and the second traversal path are diagonally symmetrical to each other. For example, the first traversal path may be starting from the upper left corner of the local map, and traversing the entire local map in a moving order from left to right and from top to bottom, and the second traversal path may be starting from the lower right corner of the local map, and traversing the entire local map in a moving order from right to left and from bottom to top. For another example, the first traversal path may be starting from the lower right corner of the local map, and traversing the entire local map in a moving order from right to left and from bottom to top, and the second traversal path may be starting from the upper left corner of the local map, and traversing the entire local map in a moving order from left to right and from top to bottom. This embodiment does not limit this.

[0122] In a possible implementation, using a local mask to perform distance transformation on each target pixel point to update its pixel value can be implemented by the following formula (2).

[0123] F(k) ij =max{F(k) ij , D(k,o) ij +F(o) ij} (2)

[0124] Where i and j represent the number of rows and columns of pixels in the local map; k represents the current pixel (any target pixel), and F(k) ij is the distance value of the current pixel; o is the pixel adjacent to the current pixel in the mask, F(o) ij is the distance value of the pixel points adjacent to the current pixel point; D(k, o) ij Represents the Euclidean distance between the current pixel k and the nearest pixel o.

[0125] As an example, Figure 4 A first local mask is given (see Figure 4 a) and the second local mask (see Figure 4 Schematic diagram of b).

[0126] In adopting Figure 4 When the first local mask shown in a in the figure updates the pixel value of each target pixel in the local map, it starts from the upper left corner of the local map and scans along the traversal path from left to right and from top to bottom with I(d) as the moving interval, and updates the pixel value of the target pixel in the area covered by the first local mask according to the following formula (3).

[0127]

[0128] Similarly, when using Figure 4 When the second local mask shown in b updates the pixel value of each target pixel in the local map, it starts from the lower right corner of the local map and scans along the traversal path from right to left and from bottom to top with a moving interval of I(d), and updates the pixel value of the target pixel in the area covered by the second local mask according to the following formula (4).

[0129]

[0130] It should be noted that, in the above formulas (3) and (4), mask1 represents the first local mask, mask2 represents the second local mask, rows represents the total number of rows of pixels in the local map, and cols represents the total number of columns of pixels in the local map. The meanings of other letters can be found in the above formulas (1) and (2), which will not be repeated here.

[0131] For ease of understanding, as another example, based on Figure 5 The local mask structure shown in FIG. 1 and the process of calculating the distance value of the target pixel using formula (3) or (4) can be as follows: the mask structure covers the pixels d1, d2, d3, d4 and k, and assuming that k is the target pixel, the pixel values ​​corresponding to d1, d2, d3, d4 and k are 1. When updating the pixel value of k, according to the pixel value 1 of d1 and the Euclidean distance value between d1 and k, Determine the distance value of d1 after update Similarly, after the update, the distance value of d2 is 2, and the distance value of d3 is After updating, the distance value of d4 is 2.

[0132] Further, according to the relationship between the pixel value 1 of k and the distance values ​​of d1, d2, d3, and d4 after the update, the value with the largest value is determined as the distance value of k after the update. In this example, the local mask structure is used to update the pixel value of k through the distance values ​​of d1, d2, d3, and d4 adjacent to k. The distance value of k after the update is

[0133] Furthermore, using Figure 4 The local mask shown is moved at a preset distance, and the above formulas (3) and (4) are used to perform distance transformation on the pixel value of the target pixel point in the local map to obtain the distance value F(k) of the target pixel point covered by the k-region in the mask structure. Figure 6 The path point sets shown, F(k1) and F(k2) both represent the distance values ​​of the target pixel points in the local map after the distance transformation processing.

[0134] Step 230: Determine a set of path points for the robot when operating in each local map according to the distance values ​​of multiple target pixel points in each local map.

[0135] Among them, for each local map, if the distance values ​​of multiple target pixel points corresponding to the local map are the same, then a path point set is obtained, and this path point set represents the path circle when the robot operates in the local map. If the distance values ​​of multiple target pixel points corresponding to the local map are not exactly the same, then multiple path point sets are obtained, and these multiple path point sets represent the circular path circle when the robot operates in the local map.

[0136] It should be noted that if there are multiple path point sets corresponding to the local map, when determining the path point set when the robot works in the local map, it is necessary not only to divide the target pixel points into multiple path point sets according to the distance values ​​of the target pixel points, but also to determine the arrangement order of the multiple path point sets, that is, the path circle order corresponding to the multiple path point sets in the circular path circle.

[0137] In a possible implementation, there are multiple path point sets corresponding to the local map, and the multiple path point sets represent the circular path circles of the robot when operating in the local map. The implementation process of step 230 can be: according to the distance value of each target pixel point, the multiple target pixel points in the local map are classified to obtain multiple pixel point sets; according to the size relationship between the distance values ​​of the target pixel points included in each pixel point set, the distribution order of the multiple pixel point sets is determined to obtain multiple path point sets.

[0138] Among them, the distance values ​​of the target pixel points included in each pixel point set are equal; each path circle in the circular path circle corresponds to a path point set, and the distance values ​​of the target pixel points included in multiple path point sets decrease from the outer circle to the inner circle along the circular path circle.

[0139] As an example, see Figure 6 In the path point set shown, the distance values ​​of F(k1) and F(k2) are different, then all the target pixel points corresponding to F(k1) are taken as one path point set, and all the target pixel points corresponding to F(k2) are taken as another path point set, and two path point sets are obtained. Furthermore, since the value of F(k1) is greater than the value of F(k2), the path point set corresponding to the outer circle in the circular path circle includes all the target pixel points corresponding to F(k1), and the path point set corresponding to the inner circle in the circular path circle includes all the target pixel points corresponding to F(k2).

[0140] In this embodiment, the distance transformation is performed on the pixel values ​​of each target pixel point in the operation area in a diagonally symmetrical manner by using the first local mask and the second local mask to obtain an updated distance value. Furthermore, since the distance value reflects the distance between the target pixel point and the local map boundary, the set of path points corresponding to each path circle when the robot is operating can be determined according to the size of the distance value. In this way, the safe path points that the robot can move during operation can be accurately determined to ensure that the robot will not collide with obstacles when it is located at any path point, and the safety is relatively high.

[0141] Continuing from the previous embodiment, after determining the path point set corresponding to each local map, the robot's operation path in each local map can be generated according to the path point set. Here, there are two cases:

[0142] (1) If the path point set corresponding to the local map is one, when generating the operation path, it is only necessary to determine the arrangement order of each path point in the path point set, and then connect all the path points in the path point set according to the arrangement order to obtain the robot's operation path in the local map.

[0143] (2) If there are multiple path point sets corresponding to the local map, and the multiple path point sets represent the circuitous path circles of the robot when operating in the local map, then when generating the operating path on the robot's circuitous path circle, it is necessary to first generate the robot's moving path in a path circle based on each path point set, and then connect the moving paths corresponding to the multiple path circles to obtain the robot's operating path in the local map.

[0144] The idea of ​​generating the moving path of the robot in a path circle according to each set of path points is the same as that in the above case (1).

[0145] In other words, generating the robot's operating path in the local map based on a single set of path points can be regarded as generating a moving path of a path circle in a circular path circle.

[0146] With respect to the above situation (2), in one embodiment, based on the set of path points corresponding to each local map, the implementation process of obtaining the robot's operating path in each local map can be as follows: for each local map, in the order of the circular path circle from the outermost circle to the innermost circle, the moving path construction step is performed for each path circle in the circular path circle to obtain the robot's operating path in each local map.

[0147] The mobile path construction process is as follows: Figure 7 As shown, the following steps are included:

[0148] Step 710: determine the moving starting point of the current path circle, and determine the moving path of the current path circle according to the moving starting point of the current path circle and the path point set corresponding to the current path circle; the moving path includes the moving end point.

[0149] In actual application, the path point in the outermost circle that is closest to the current position of the robot can be used as the starting point of the current path circle; or, based on the undulation of the moving plane and the current position of the robot, the path point with the shortest moving time required for the robot can be determined from the current path circle as the starting point of the robot's movement; or, a path point can be arbitrarily specified in the current path circle as the starting point of the robot's movement, and this embodiment does not impose any restrictions on this.

[0150] That is, after determining the moving starting point of the current path circle, the next moving path point is determined in sequence from the path point set corresponding to the current path circle until the moving end point of the current path circle is determined, so that the moving path corresponding to the current path circle can be obtained by connecting multiple moving path points.

[0151] In one possible implementation, Figure 8 As shown, the implementation process of step 710 includes the following steps:

[0152] Step 711: Determine all movement path points included in the movement path of the current path circle according to the movement starting point of the current path circle and the path point set corresponding to the current path circle, and all movement path points are arranged in order on the movement path.

[0153] As an example, the implementation process of determining all the moving path points included in the moving path of the current path circle may be: according to the moving starting point of the current path circle, the path points in the path point set are screened by constructing a quadtree of the current path circle to obtain multiple continuous moving path points. After the multiple continuous moving path points are connected through the following step 713, the moving path of the current path circle can be obtained.

[0154] As another example, the implementation process of determining all the moving path points included in the moving path of the current path circle may be: according to the moving starting point of the current path circle, all the path points in the path point set are traversed, and the path point closest to the moving starting point is used as the next moving path point, and so on, to determine multiple continuous moving path points. After the multiple continuous moving path points are connected through the following step 713, the moving path of the current path circle can be obtained.

[0155] Since the amount of calculation is small and the determination rate is fast when all the moving path points in the moving path of the current path circle are determined by constructing a quadtree, the quadtree method can be used to determine all the continuous moving path points in the moving path. Of course, all the continuous moving path points in the moving path can also be determined by traversing all the path points in the path point set to avoid the time-consuming construction of the quadtree. It should be understood that this embodiment is intended to illustrate two possible implementation methods, and is not intended to be limiting. Other methods or algorithms can also be used to determine all the continuous moving path points in the moving path.

[0156] See also Fig. 9 If all continuous moving path points are determined from the path point set corresponding to the current path circle in a quadtree manner, the specific implementation process may include the following steps:

[0157] Step 910: construct a quadtree of the path point set corresponding to the current path circle; the root node of the quadtree represents the area where the path point set corresponding to the current path circle is located, and the path points included in each child node of the quadtree are determined based on the area where the path points in the parent node are located.

[0158] Among them, the quadtree is a data structure, specifically a data structure in which each node has at most four subtrees. The quadtree is the only suitable algorithm for locating pixels in a two-dimensional image. This algorithm continuously divides the search range into 4 parts for matching and searching until only one record is left.

[0159] It should be noted that when dividing the child nodes one by one according to the root node of the quadtree, the capacity of each child node can be set in advance. When the capacity of the divided child nodes is not greater than the preset capacity threshold, the quadtree index area division is completed and the constructed quadtree is obtained.

[0160] The capacity threshold is preferably 1-2 points. The smaller the capacity threshold, the deeper the quadtree is, and the fewer times the matching needs to be traversed when subsequently screening the moving path points. The purpose of this setting is to divide the path points included in the small area of ​​each child node into smaller areas for easy indexing.

[0161] Step 920: Obtain the path point closest to the moving starting point of the current path circle in the quadtree as a new moving path point, and continue to obtain the path point closest to the new moving path point in the quadtree after removing the starting point of the current path circle, and so on, until the path point in the quadtree is empty, and all the moving path points included in the moving path are obtained.

[0162] In one possible implementation, the implementation process of step 920 may be: determining the adapter node of the moving starting point of the current path circle in the quadtree; obtaining the distance information between all path points in the adapter node and the moving starting point of the current path circle; and according to each distance information, determining the path point closest to the moving starting point of the current path circle as the new moving path point.

[0163] The adapting subnode includes the subnode of the moving starting point of the current path circle in the quadtree, or the adapting subnode includes the subnode and the adjacent subnode of the subnode. The distance information can be a Manhattan distance value, a Euclidean distance value, or a straight-line distance value, which is not limited in this embodiment.

[0164] That is, according to the moving starting point of the current path circle, the search starts from the root node of the quadtree, and the direction of the sub-node area intersecting with the query point area in the four node areas is found, and the recursive search is performed in the intersecting sub-node area until the sub-node of the smallest four-equal area is reached, that is, the index area closest to the moving starting point of the current path circle is reached. Further, the path point closest to the moving starting point of the current path circle is determined in the index area as the new moving path point. And so on, no further description is given.

[0165] Optionally, in order to reduce the number of traversal matches, each moving path point needs to be deleted from the quadtree after it is determined.

[0166] Step 713: According to a preset first connection strategy, all movement path points are connected to obtain a movement path.

[0167] The first connection strategy includes the relationship between the unit distance between adjacent moving path points and the preset distance, or the collision judgment between adjacent moving path points.

[0168] In one possible implementation, step 713 is implemented as follows: obtaining the unit distance between adjacent moving path points in all moving path points; if the relationship between the unit distance and the preset distance satisfies the preset relationship, the corresponding adjacent moving path points are connected by a straight line connection method; if the relationship between the unit distance and the preset distance does not satisfy the preset relationship, a connection path for the corresponding adjacent moving path points is generated by a preset path planning algorithm; and a moving path is obtained based on all connected moving path points.

[0169] As an example, L is the unit distance between adjacent moving path points, and specifically can be the Manhattan distance between two moving path points; the preset relationship is shown in the following formula (5).

[0170]

[0171] As an example, the preset path planning algorithm may be any one of the A* algorithm, the D* algorithm, the Rapidly-exploring Random Tree algorithm (RRT), the RRT* algorithm, the B-RRT*, the RRT*-Smart algorithm or the SRRT* algorithm.

[0172] In another possible implementation, step 713 is implemented as follows: adjacent moving path points are connected. If the paths between the adjacent moving path points collide after the connection, the RRT* algorithm is used to reconnect the adjacent moving path points; if the paths between the adjacent moving path points do not collide after the connection, a straight line is used directly for quick connection.

[0173] When performing straight line connection, the connection of adjacent moving path points is achieved by using an equidistant uniform interpolation method.

[0174] Step 720: Determine the moving starting point of the robot in the next path circle according to the moving end point of the current path circle; the next path circle is a path circle in the circular path circle that is adjacent to the current path circle and located inside the current path circle.

[0175] In one possible implementation, the implementation process of step 720 may be: determining at least one candidate moving path point from an adjacent inner circle of the current path circle based on the distance from the moving end point of the current path circle, and then determining the moving starting point of the adjacent inner circle from at least one candidate moving path point.

[0176] Among them, the distance value between the candidate moving path point and the moving end point of the current path circle is the smallest. When there are multiple candidate moving path points in the next path circle with the same distance value as the moving end point of the current path circle, a candidate moving path point can be randomly designated as the moving starting point of the next path circle, or the moving starting point of the next path circle can be selected based on some algorithms or rules. This embodiment does not impose any restrictions on this.

[0177] In this embodiment, starting from the robot's operating starting point, a corresponding moving path is constructed for each path circle in the circular path circle in the order from the outermost circle to the innermost circle, thereby obtaining the robot's operating path in the local map. In this way, based on the determined path point set, the robot's operating path in the local map can be quickly and effectively determined, thereby improving the planning efficiency of the robot's operating path in the local map.

[0178] In one embodiment, Fig.10 As shown, the present application also provides a path optimization method, which is also illustrated by applying the method to a computer device, and includes the following steps:

[0179] Step 1010: Perform curvature detection on the robot's working path in each local map, and remove moving path points with sudden changes in curvature.

[0180] It should be noted that the operation path of the robot in the local map includes a moving path of at least one path circle, and the curvature detection is performed on all moving path points on the operation path of the robot in the local map.

[0181] In a possible implementation, the implementation process of step 1010 may be: in each local map, curvature detection is performed on the moving path corresponding to each path circle, and moving path points with sudden changes in curvature are eliminated.

[0182] The local map includes n path circles (n≥1), and each path circle corresponds to a moving path, which is expressed as:

[0183] PATH(i)={p1, p2, p3,..., pm}, 1≤i≤n

[0184] Among them, p1, p2, p3, ..., pm represent multiple continuous moving path points on the moving path.

[0185] Taking the path point set PATH(1) as an example, the curvature detection process is as follows: take a moving path point P from the path point set PATH(1) i , then from P i Start the trajectory check. If the number of moving path points in PATH(1) reaches 3, remove the moving path points with sudden changes in curvature through the following steps S1-S3.

[0186] S1: previous moving path point P i-1 With the current moving path point P i Constructing direction vector Let p1=P i-1 , p2=P i ,but Set the current moving path point P i and the next moving path point P i+1 Constructing direction vector Let p3=P i+1 ,but Furthermore, the direction vector is calculated With direction vector The angle θ between them is shown in the following formula (6):

[0187]

[0188] That is, when curvature detection is performed through three moving path points, p2 represents the current curvature detection point, p1 represents the previous moving path point, and p3 represents the next moving path point for detecting a sudden change in curvature.

[0189] Furthermore, it is determined whether there is a sudden change in curvature at the current curvature detection point p2 according to the angle θ.

[0190] S2: If the angle θ is less than the preset angle value, it means that the current moving path point P i The curvature at the point is relatively smooth for the robot and does not require any processing.

[0191] Furthermore, the current moving path point P i The next moving path point P in the path point set PATH(1) is retained in the path point set PATH(1).i+1 It will become the starting point of the next cycle of curvature detection and judgment, and the above step S1 will be executed.

[0192] The preset angle value is an angle value preset based on the robot performance and moving path requirements. For example, the preset angle value can be set to 120°.

[0193] S3: If the angle θ is greater than or equal to the preset angle value, it means that the current moving path point P i It may be a sudden change point of curvature. It is necessary to make further judgment through the following formula (7) to determine whether the vertical distance d between point p3 projected to the direction vectors of p2 and p1 is greater than the minimum turning radius r of the robot:

[0194]

[0195] If d<r, then the next moving path point P i+1 It cannot be used to construct the robot's moving path, so it is removed from the path point set PATH(1). Then, skip P i+1 , take the moving path point P in the path point set PATH(1) i+2 , and let p3=P i+2 ; At the same time, retract the current point p2 one point back so that p2 = P i-1 , so that p1=P i-2 .

[0196] When p1=P i-2 、p2=P i-1 、p3=P i+2 In the case of, repeat the above step S1 again to calculate the direction vector composed of p1 and p2 and the direction vector composed of p2 and p3 The angle θ between them, and the perpendicular distance d between the projection of point p3 to the direction vectors of p2 and p1.

[0197] If the condition d<r is not met, continue to skip P i+2 Take the moving path point P from the path point set PATH(1) i+3 , so that p3=P i+3 , and retract the current point p2 by one point so that p2 = P i-2 , so that p1=P i-3 .

[0198] Similarly, the moving paths corresponding to each path circle are trimmed by jumping forward and backtracking to find points until the corresponding conditions are met, and all p3 points that meet the rules are screened out.

[0199] In this way, after the curvature detection is performed on the operation path in the local map in step 1010, the p3 points that do not meet the rules can be eliminated and the p3 points that meet the rules can be retained.

[0200] Step 1020: According to the preset second connection strategy, the operation path of the robot in each local map is smoothed.

[0201] The second connection strategy may be a hybrid A* algorithm, a JPS algorithm, or other algorithms that can achieve connection of moving path points, which is not limited in this embodiment.

[0202] That is, a collision-free path is generated between points p2 and p3 through the hybrid A* algorithm, and the collision-free path connecting p2 is used to replace the original moving path between p2 and p3 to smooth the trajectory of the original moving path.

[0203] In this embodiment, when the robot encounters a moving path point that does not comply with the rules, it cuts the illegal moving path by simultaneously jumping forward and backtracking to find points, and combines the hybrid A* algorithm to smoothly connect the moving path points after curvature detection, so that the robot can make smooth turns and reduce the generation of moving dead zone paths.

[0204] In one embodiment, Fig.11 As shown, according to the operation starting point of the robot and the operation path corresponding to each local map, the connection order of each local map is determined, including the following steps:

[0205] Step 1110: Obtain the path start point and path end point of the operation path corresponding to each local map.

[0206] It should be understood that if the local map corresponds to a set of path points, the planned operation path is a path circle. In this case, the starting point of the operation path is the moving starting point of the moving path corresponding to the path circle, and the end point of the operation path is the moving end point of the moving path corresponding to the path circle.

[0207] Similarly, if the local map corresponds to multiple path point sets, the planned operation path is a circular path circle. In this case, the starting point of the operation path is the moving starting point of the moving path corresponding to the outermost circle of the circular path circle, and the end point of the operation path is the moving end point of the moving path corresponding to the innermost circle of the circular path circle.

[0208] Optionally, after generating the operation path corresponding to each local map, the path start point and the path end point may be bound to the corresponding local map, so as to quickly determine the relationship between each local map and the moving path point on the operation path.

[0209] As an example, see the binding relationship between the local map and the operation path shown in Table 1 below.

[0210] Table 1

[0211]

[0212] From Table 1 above, we can see that locally Figure 1 Corresponding to 3 sets of path points, the circular path circle determined by these 3 sets of path points includes 3 path circles, each path circle corresponds to a moving path, and each moving path includes n moving path points arranged in the moving order. Figure 1 The starting points and ending points of the three corresponding moving paths PATH(11), PATH(12) and PATH(13) are obtained to obtain the starting point p1101 and the ending point p1320 of the operation path corresponding to the local map. Figure 2 and locally Figure 3 The method of obtaining the starting point and end point of the path is similar to this and will not be repeated here.

[0213] Step 1120: According to the robot's operation starting point and the path starting points of each local map, the local map to which the path starting point closest to the robot's operation starting point belongs is used as the first local map, and the local map among other path starting points closest to the path end point of the first local map is used as the second local map, and so on, until the order of each local map is determined and the connection order of each local map is obtained.

[0214] Among them, other path starting points are path starting points of local maps other than the first local map.

[0215] As an example, see Table 1 above, based on the robot's operation starting point and the path starting point of the operation path corresponding to each local map, due to the local map Figure 3 The path starting point P3101 is closest to the robot's operation starting point, so the local Figure 3 Determine as the first local map. Further, according to the local map Figure 3 The path end point p3315 of the operation path is local Figure 2 and locally Figure 1 The distance between the starting points of the path is from the local Figure 2 and locally Figure 1 Select the second local map. Figure 2 The path starting point P2101 and the local Figure 3 The distance between the path end points p3315 is the shortest, then the local Figure 2 As the second local map, local Figure 1 Then it is the third local map. Therefore, in this example, the local Figure 1 , locally Figure 2 and locally Figure 3 The connection order between them is: locally Figure 3 , locally Figure 2 , locally Figure 1 .

[0216] In this embodiment, based on the operation paths planned in each local map and the operation starting point of the robot, the connection order of each local map can be determined. In this way, according to the operation starting point of the robot and the connection order between each local map, the full coverage path of the robot in the entire operation map can be quickly generated.

[0217] Based on the above method embodiments, Fig.12 As shown, the present application also provides another path planning method, which is also illustrated by applying the method to a computer device, and includes the following steps:

[0218] S1: Get the initial environment map.

[0219] Optionally, the initial environment map may be preprocessed, and the preprocessing may include one or more of dilation processing, corrosion processing, binarization processing, smoothing processing, image enhancement, and the like.

[0220] S2: Search the initial environment map for a traversable area to obtain an operation map; wherein the operation map does not contain any obstacle area.

[0221] S3: Based on a preset segmentation area threshold, the operation map is searched and the operation map is segmented into multiple local maps.

[0222] S4: For each local map, based on the distance transformation process of the moving distance and the pixel value, determine the path point set corresponding to each local map.

[0223] The safety distance can be determined by the above formula (1), and the distance transformation processing is implemented by the above formulas (2)-(4).

[0224] S5: Generate a moving path corresponding to the path circle according to the path point set.

[0225] Among them, one set of path points can generate the moving path of the robot in a path circle; multiple sets of path points can generate the moving path of the robot in a circular path circle.

[0226] In a possible implementation, a quadtree is constructed based on the set of path points, and the ordered arrangement result of all the moving path points on the moving path is determined by the quadtree. Furthermore, different path connection methods are selected to connect the adjacent moving path points according to the unit distance between them. Finally, after connecting all the moving path points in the arrangement order, the moving path corresponding to the path circle is obtained.

[0227] It should be noted that it is necessary to perform the operations of constructing a quadtree and connecting adjacent moving path points on all path point sets corresponding to the local map, so as to obtain the operation path of the robot in the local map.

[0228] S6: Generate the robot's operating path in each local map according to the moving path of each path circle.

[0229] S7: Perform curvature detection and trajectory smoothing on the operation paths in each local map to optimize each operation path.

[0230] S8: Generate a full coverage path of the robot in the operation map based on the operation paths in each local map.

[0231] That is, according to the connection order of each local map, the operation paths in each local map are fully connected to obtain the full coverage path of the robot in the entire operation map.

[0232] When the computer device provided in this embodiment implements the steps of the above path planning method, its implementation principle and technical effects can refer to the relevant steps in any of the above embodiments, which will not be repeated here.

[0233] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0234] Based on the same inventive concept, the embodiment of the present application also provides a path planning device for implementing the path planning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more path planning device embodiments provided below can refer to the limitations of the path planning method above, and will not be repeated here.

[0235] In one embodiment, Fig.13 As shown, a path planning device is provided, the device 1300 includes: a map acquisition module 1310, a map segmentation module 1320, a path point determination module 1330 and a path planning module 1340, wherein:

[0236] A map acquisition module 1310 is used to acquire a robot's operation map;

[0237] A map segmentation module 1320 is used to segment the operation map based on a preset map segmentation rule to obtain at least two local maps;

[0238] The path point determination module 1330 is used to determine the path point set when the robot is operating in each local map; the path point set represents the operation path of the robot in the local map;

[0239] The path planning module 1340 is used to construct a full coverage path of the robot in the operation map according to the operation starting point of the robot and the set of path points corresponding to each local map.

[0240] In one embodiment, the map acquisition module 1310 includes:

[0241] A map acquisition unit, used to acquire an initial environment map of the robot's operating environment;

[0242] The traversable area search unit is used to search the traversable area of ​​the initial environment map to obtain the robot's operation map; there is no obstacle area in the operation map.

[0243] In one embodiment, the map segmentation module 1320 is specifically configured to:

[0244] Searching for local areas from the operation map according to a preset traversal order, and performing a split operation on each local area found, until the operation map is searched through, obtaining at least two local maps; wherein each local area corresponds to one local map;

[0245] The segmentation operation includes: if the area of ​​the local area reaches a preset segmentation area threshold, the local area is segmented in the work map.

[0246] In one embodiment, the path planning module 1340 includes:

[0247] A path planning unit, used to obtain the robot's operating path in each local map according to the set of path points corresponding to each local map;

[0248] A connection sequence determination unit is used to determine the connection sequence of each local map according to the operation starting point of the robot and the operation path corresponding to each local map; the operation starting point is determined according to the current position of the robot;

[0249] The local map connection unit is used to connect the operation paths of two adjacent local maps according to the connection order of each local map using a preset map connection algorithm to generate a full coverage path of the robot in the operation map.

[0250] In one of the embodiments, if there are multiple path point sets corresponding to the local map, and the multiple path point sets represent the return path circle of the robot when operating in the local map;

[0251] According to the path planning unit, it is specifically used for:

[0252] For each local map, in the order of the circular path circle from the outermost circle to the innermost circle, the moving path construction step is performed for each path circle in the circular path circle to obtain the operation path of the robot in each local map;

[0253] The mobile path construction step includes:

[0254] Determine the moving starting point of the current path circle, and determine the moving path of the current path circle according to the moving starting point of the current path circle and the path point set corresponding to the current path circle; the moving path includes the moving end point;

[0255] According to the moving end point of the current path circle, the moving starting point of the robot in the next path circle is determined; the next path circle is a path circle in the circular path circle that is adjacent to the current path circle and located inside the current path circle.

[0256] In one embodiment, determining the moving path of the current path circle according to the moving starting point of the current path circle and the path point set corresponding to the current path circle includes:

[0257] According to the moving starting point of the current path circle and the path point set corresponding to the current path circle, all the moving path points included in the moving path of the current path circle are determined, and all the moving path points are arranged in order on the moving path;

[0258] According to the preset first connection strategy, all moving path points are connected to obtain the moving path of the current path circle.

[0259] In one embodiment, the apparatus 1300 further includes:

[0260] The path detection module is used to detect the curvature of the robot's operating path in each local map and remove the moving path points with sudden curvature changes;

[0261] The trajectory smoothing module is used to perform trajectory smoothing processing on the robot's operating path in each local map according to a preset second connection strategy.

[0262] In one embodiment, the connection order determination unit includes:

[0263] An acquisition subunit is used to acquire the path start point and path end point of the operation path corresponding to each local map;

[0264] A determination subunit is used to, based on the operation starting point of the robot and the path starting points of each local map, take the local map to which the path starting point closest to the operation starting point of the robot belongs as the first local map, and take the local map among other path starting points that is closest to the path end point of the first local map as the second local map, and so on, until the order of each local map is determined to obtain the connection order of each local map; wherein the other path starting points are the path starting points of the local maps other than the first local map.

[0265] In one embodiment, the waypoint determination module 1330 includes:

[0266] A screening unit, used for screening out a plurality of target pixels from each local map;

[0267] A distance transformation unit is used to perform distance transformation processing on the pixel values ​​of multiple target pixel points in each local map to obtain the distance value of each target pixel point;

[0268] The set division unit is used to determine the path point set of the robot when operating in each local map according to the distance values ​​of multiple target pixel points in each local map.

[0269] In one of the embodiments, if there are multiple path point sets corresponding to the local map, and the multiple path point sets represent the return path circle of the robot when operating in the local map;

[0270] The set partitioning unit includes:

[0271] The classification subunit is used to classify multiple target pixel points in the local map according to the distance value of each target pixel point to obtain multiple pixel point sets; the distance values ​​of the target pixel points included in each pixel point set are equal;

[0272] A sorting subunit, used to determine the distribution order of multiple pixel point sets according to the size relationship between the distance values ​​of the target pixel points included in each pixel point set, so as to obtain multiple path point sets;

[0273] Each path circle in the circular path circle corresponds to a path point set, and the distance values ​​of the target pixel points included in the multiple path point sets decrease in a direction from the outer circle to the inner circle of the circular path circle.

[0274] Each module in the above-mentioned path planning device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0275] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.14 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a path planning method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0276] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0277] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0278] Get the robot's operation map;

[0279] Based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps;

[0280] In each local map, a set of path points for the robot to operate is determined, and the set of path points represents the operating path of the robot in the local map;

[0281] Based on the robot's operation starting point and the set of path points corresponding to each local map, a full coverage path of the robot in the operation map is constructed.

[0282] When the computer device provided in this embodiment implements the above steps, its implementation principle and technical effects are similar to those of the method embodiment executed by the above robot, and will not be repeated here.

[0283] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0284] Get the robot's operation map;

[0285] Based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps;

[0286] In each local map, a set of path points for the robot to operate is determined, and the set of path points represents the operating path of the robot in the local map;

[0287] Based on the robot's operation starting point and the set of path points corresponding to each local map, a full coverage path of the robot in the operation map is constructed.

[0288] When the computer-readable storage medium provided in this embodiment implements the above steps, its implementation principle and technical effects are similar to those of the above method embodiments, and will not be repeated here.

[0289] In one embodiment, a computer program product is provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0290] Get the robot's operation map;

[0291] Based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps;

[0292] In each local map, a set of path points for the robot to operate is determined, and the set of path points represents the operating path of the robot in the local map;

[0293] Based on the robot's operation starting point and the set of path points corresponding to each local map, a full coverage path of the robot in the operation map is constructed.

[0294] When the computer program product provided in this embodiment implements the above steps, its implementation principle and technical effects are similar to those of the above method embodiments, and will not be repeated here.

[0295] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0296] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0297] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A path planning method, applied to robots, It is characterized in that The method comprises: Obtaining a work map of the robot; Based on a preset map segmentation rule, the operation map is segmented to obtain at least two local maps; Filter out multiple target pixels from each local map; Performing distance transformation processing on the pixel values ​​of multiple target pixel points in each local map to obtain the distance value of each target pixel point; According to the distance values ​​of the target pixel points, the multiple target pixel points in each local map are classified to obtain multiple pixel point sets; the distance values ​​of the target pixel points included in each pixel point set are equal; Determine the distribution order of the plurality of pixel point sets according to the size relationship between the distance values ​​of the target pixel points included in each of the pixel point sets, and obtain a plurality of path point sets corresponding to each of the local maps; the plurality of path point sets represent the circular path circle when the robot operates in the local map; According to the operation starting point of the robot and a plurality of path point sets corresponding to each local map, a full coverage path of the robot in the operation map is constructed.

2. The method according to claim 1, It is characterized in that The obtaining of the operation map of the robot comprises: Acquire an initial environment map of the robot's operating environment; The initial environment map is searched for a traversable area to obtain an operation map of the robot; and no obstacle area exists in the operation map.

3. The method according to claim 1 or 2, It is characterized in that The operation map is segmented based on a preset map segmentation rule to obtain at least two local maps, including: Searching for local areas from the operation map according to a preset traversal order, and performing a segmentation operation on each local area found, until the operation map is searched through, and obtaining the at least two local maps; wherein each local area corresponds to one local map; The segmentation operation includes: if the area of ​​the local area reaches a preset segmentation area threshold, segmenting the local area in the operation map.

4. The method according to claim 1 or 2, It is characterized in that The step of constructing a full coverage path of the robot in the operation map according to the operation starting point of the robot and a plurality of path point sets corresponding to each local map includes: Acquire the operation path of the robot in each of the local maps according to a plurality of path point sets corresponding to each of the local maps; Determining a connection order of the local maps according to the operation starting point of the robot and the operation paths corresponding to the local maps; the operation starting point is determined according to the current position of the robot; According to the connection sequence of each of the local maps, a preset map connection algorithm is used to connect the operation paths of two adjacent local maps to generate a full coverage path of the robot in the operation map.

5. The method according to claim 4, It is characterized in that The step of obtaining the operation path of the robot in each of the local maps according to the plurality of path point sets corresponding to each of the local maps comprises: For each of the local maps, in the order of the circular path circles from the outermost circle to the innermost circle, a moving path construction step is performed for each path circle in the circular path circle to obtain an operation path of the robot in each of the local maps; Wherein, the moving path construction step includes: Determine a moving starting point of a current path circle, and determine a moving path of the current path circle according to the moving starting point of the current path circle and a set of path points corresponding to the current path circle; the moving path includes a moving end point; According to the moving end point of the current path circle, the moving starting point of the robot in the next path circle is determined; the next path circle is a path circle in the circular path circle that is adjacent to the current path circle and located inside the current path circle.

6. The method according to claim 5, It is characterized in that The determining the moving path of the current path circle according to the moving starting point of the current path circle and the path point set corresponding to the current path circle includes: Determine all moving path points included in the moving path of the current path circle according to the starting point of the current path circle and the set of path points corresponding to the current path circle, and all the moving path points are arranged in order on the moving path; According to a preset first connection strategy, all the moving path points are connected to obtain the moving path of the current path circle.

7. The method according to claim 5, It is characterized in that The method further comprises: Performing curvature detection on the operation path of the robot in each of the local maps, and removing movement path points with sudden curvature changes; According to the preset second connection strategy, trajectory smoothing is performed on the operation path of the robot in each of the local maps.

8. The method according to claim 4, It is characterized in that Determining the connection order of the local maps according to the operation starting point of the robot and the operation path corresponding to each local map includes: Obtaining a path starting point and a path end point of an operation path corresponding to each of the local maps; According to the operation starting point of the robot and the path starting points of each of the local maps, the local map to which the path starting point closest to the operation starting point of the robot belongs is taken as the first local map, and the local map among other path starting points that is closest to the path end point of the first local map is taken as the second local map, and so on, until the order of each local map is determined and the connection order of the local maps is obtained; wherein the other path starting points are the path starting points of the local maps other than the first local map.

9. The method according to claim 1 or 2, It is characterized in that Each path circle in the circular path circle corresponds to a path point set, and the distance values ​​of the target pixel points included in the multiple path point sets decrease in a direction from the outer circle to the inner circle of the circular path circle.

10. A path planning device, It is characterized in that The device comprises: A map acquisition module is used to obtain the robot's operation map; A map segmentation module, configured to perform segmentation processing on the operation map based on a preset map segmentation rule to obtain at least two local maps; A path point determination module, configured to screen out a plurality of target pixel points from each local map; perform distance transformation processing on the pixel values of the plurality of target pixel points in each local map to obtain the distance values of the respective target pixel points; classify the plurality of target pixel points in each local map according to the distance values of the respective target pixel points to obtain a plurality of pixel point sets; the distance values of the target pixel points included in each pixel point set are equal; determine the distribution order of the plurality of pixel point sets according to the magnitude relationship between the distance values of the target pixel points included in each pixel point set to obtain a plurality of path point sets corresponding to each local map; the plurality of path point sets represent the loop path circles of the robot during operation in the local map; A path planning module, configured to construct a full-coverage path of the robot in the operation map according to the operation starting point of the robot and the plurality of path point sets corresponding to each local map.

11. A computer device, comprising a memory and a processor, the memory storing a computer program, wherein, when the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium, having a computer program stored thereon, wherein, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Coverage path planning method suitable for vehicle type robot

    CN111307156A

  • Robot full-coverage path planning method based on secondary region division

    CN112965485A

  • Path planning method and device, computer equipment and storage medium

    CN114442642A