Path planning method, terminal device and storage medium
By obtaining the initial pass area in the path planning method and performing path planning and filtering according to preset conditions, the problem of low global coverage of path planning in the prior art is solved, and more efficient path coverage and equipment operation efficiency are achieved.
Patent Information
- Application Number
- CN202210365996.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2042-04-08
AI Technical Summary
The existing path planning method has low global coverage in the specified area, making it difficult to achieve complete path coverage.
By obtaining the initial pass area, path planning is performed based on the preset path gap value and exploration direction, combined with the path filtering conditions, the path is gradually optimized until the preset path coverage conditions are met.
Improves the global coverage of the path in the specified area, reduces the number of steering times of the mobile device, and improves work efficiency.
Smart Images

Figure CN114740853B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of path planning, and in particular, relates to a path planning method, a terminal device and a storage medium. Background Art
[0002] Path planning is to find a collision-free and safe path for the target object to move from the starting point to the end point within a specified area. For example, for a lawn mower robot working in an outdoor scene, path planning is required to make the lawn mower robot's operating area cover all lawns. For another example, for a sweeping robot working in an indoor scene, path planning is required to make the sweeping robot's cleaning area cover all ground.
[0003] Among the existing path planning solutions, some only use sensors or GPS to achieve positioning and path planning. The site information used for path planning comes from the odometer, infrared sensor, or ultrasonic sensor of the target object itself, which makes it difficult to achieve global path coverage. Another part uses the constructed map to achieve global path planning, but in actual applications, it is found that the actual coverage of the obtained path in the specified area is not complete, and the global coverage rate is low. Summary of the invention
[0004] The embodiments of the present application provide a path planning method, a terminal device and a storage medium, which can solve the problem of low global coverage of paths planned by current path planning methods.
[0005] A first aspect of an embodiment of the present application provides a path planning method, including:
[0006] Step S1: obtaining an initial passage area, wherein the initial passage area includes an area where path planning is not performed;
[0007] Step S2: performing path planning on the area where path planning has not been performed to obtain an initial planned path according to a preset path gap value and a preset path exploration direction;
[0008] Step S3: filtering the initial planned path according to a preset path filtering condition to obtain a pass path and a path to be planned;
[0009] Step S4: The area where the path to be planned is located is regarded as an area where path planning is not performed, and the preset path exploration direction and the preset path filtering condition are updated, and the above steps S2 and S3 are repeated to process the path to be planned until the filtering result meets the preset path coverage condition, and the path planning is terminated;
[0010] Step S5: Connect all the passing paths to form a global coverage path of the initial passing area.
[0011] A second aspect of an embodiment of the present application provides a path planning device, including:
[0012] An acquisition unit, configured to acquire an initial passage area, wherein the initial passage area includes an area where path planning is not performed;
[0013] An exploration unit, configured to perform path planning on the area where path planning has not been performed to obtain an initial planned path according to a preset path gap value and a preset path exploration direction;
[0014] A filtering unit, used to filter the initial planned path according to a preset path filtering condition to obtain a pass path and a path to be planned;
[0015] An updating unit, used to treat the area where the path to be planned is located as an area where path planning is not performed, and to update the preset path exploration direction and the preset path filtering condition, and to repeat the functions of the above-mentioned exploration unit and filtering unit to process the path to be planned until the filtering result satisfies the preset path coverage condition, thereby terminating the path planning;
[0016] A path planning unit is used to connect all the passage paths to form a global coverage path of the initial passage area.
[0017] A third aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned path planning method when executing the computer program.
[0018] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned path planning method are implemented.
[0019] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the path planning method described in the first aspect above.
[0020] In an implementation manner of the present application, by obtaining an initial pass area, path planning is performed on the area where path planning has not been performed according to a preset path gap value and a preset path exploration direction to obtain an initial planned path, and the initial planned path is filtered according to a preset path filtering condition to obtain a pass path and a path to be planned. Then, the area where the path to be planned is located is used as an area where path planning has not been performed, and the preset path exploration direction and the preset path filtering condition are updated to repeat the above processing of the path to be planned until the filtering result meets the preset path coverage condition, then the path planning is terminated, and all pass paths are connected to form a global coverage path for the initial pass area. Since path exploration can perform path planning in a preset path exploration direction, on the one hand, for irregular areas, the exploration direction can be set according to the shape or boundary of the initial pass area, so that the path planning of the initial pass area can be performed according to the exploration direction, thereby achieving commonality between regular and irregular areas. On the other hand, using different exploration directions for path planning can make the path direction arrangement more reasonable, reduce the number of turns of the movable device, thereby improving the working efficiency of the movable device, and through multiple cycles of path exploration, the filtering results meet the preset path coverage conditions, which can avoid the appearance of areas in the initial pass area where path planning is not performed, thereby improving the global coverage rate of the path in the specified area. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 It is a schematic diagram of an implementation flow of a path planning method provided in an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of an electronic map provided in an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of a path planning process provided by an embodiment of the present application;
[0025] Figure 4 yes Figure 3 Schematic diagram of the path planning process corresponding to the first row of pixels in ;
[0026] Figure 5 is a schematic diagram of a specific implementation flow of step S4 provided in an embodiment of the present application;
[0027] Figure 6is a schematic diagram of a repeated working area provided in an embodiment of the present application;
[0028] Figure 7 is a schematic diagram of a specific implementation flow of step S43 provided in an embodiment of the present application;
[0029] Figure 8 is a schematic diagram of multiple path planning provided in an embodiment of the present application;
[0030] Fig. 9 is a schematic diagram of a global coverage path planned by the path planning method provided in an embodiment of the present application;
[0031] Fig.10 is a structural schematic diagram of a path planning device provided in an embodiment of the present application;
[0032] Fig.11 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions 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 intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are protected by the present application.
[0034] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0035] Figure 1 A schematic diagram of the implementation flow of a path planning method provided in an embodiment of the present application is shown. The method can be applied to a terminal device and is suitable for situations where the global coverage of the path needs to be improved.
[0036] Among them, the above-mentioned terminal devices can be movable devices such as lawn mowing robots, sweeping robots, and driverless cars, which can move according to the planned path after path planning; the above-mentioned terminal devices can also be computers, smart phones, base stations and other devices, which can send the planned path to the movable device after path planning.
[0037] Specifically, the above path planning method may include the following steps S1 to S5.
[0038] Step S1, obtaining an initial traffic area.
[0039] The initial passage area includes an area where path planning is not performed. Specifically, the terminal device can use the area that needs path planning as the initial passage area, and perform path planning on the acquired initial passage area to obtain a global coverage path of the initial planning area.
[0040] In some embodiments of the present application, the terminal device may collect sensor information of the initial planning area through sensors such as radar or camera, use the sensor information to construct an electronic map, and record the current position of the terminal device in the electronic map. The sensor information may include point cloud data of the initial planning area collected by radar, image data of the initial planning area collected by camera, etc. The constructed electronic map may be a grid map, a feature map, a topological map, etc., which are not limited here.
[0041] Then, the terminal device can perform binary processing on the electronic map, and represent the pixel value of each pixel in the electronic map as 0 or 255, where 0 represents an impassable area and 255 represents a passable area. Use algorithms such as expansion, erosion, opening, closing, and envelope to connect the discontinuous areas of the electronic map caused by map construction defects. Then use the Dijkstra algorithm or other regional connectivity algorithms to globally traverse each path point in the passable area, connect and close the passable area, and then obtain the initial passable area. Among them, Figure 2 The processed electronic map is shown, in which the black part is the impassable area and the white part is the passable area.
[0042] The area where path planning is not performed may be part or all of the initial pass area. In the embodiment of the present application, when the terminal device performs step S1, the entire initial pass area may be regarded as the area where path planning is not performed.
[0043] Step S2, according to a preset path gap value and a preset path exploration direction, path planning is performed on the area where path planning has not been performed to obtain an initial planned path.
[0044] The path gap value may include a gap value Spacing between paths and a gap value R between a path and a boundary of an initial passage area.
[0045] The path exploration direction is the direction of the terminal device when performing path planning, such as the horizontal or vertical path planning direction. It should be understood that the terminal device can obtain an initial planned path by exploring and planning along the path exploration direction, and the path direction of the obtained initial planned path is the same as the path exploration direction used during exploration.
[0046] Specifically, according to the path gap value R and Spacing, the terminal device can determine a pixel point in the electronic map that is located in the area where path planning is not performed as the origin of the path planning. The path gap value R is used to keep the initial planned path near the boundary of the initial pass area at a certain distance from the boundary, which can prevent the movable device from colliding with the boundary of the initial pass area when moving according to the planned path. In some cases, the path gap value may not include R, in which case the pixel point closest to the boundary of the electronic map can be used as the path point by default.
[0047] Starting from the origin of path planning, exploration is performed according to the path exploration direction. Figure 3 It shows the path planning process when the path exploration direction is horizontal. Figure 4 Shows Figure 3 The path planning process corresponding to the first row of pixels in . When R = 0, take the first pixel located in the upper left corner of the electronic map and in the area where path planning is not performed as the origin of path planning for the first row of path exploration as an example. Assume that the origin of path planning in the electronic map is endpoint A, and endpoint B coincides with endpoint A at the beginning. During exploration, endpoint A is fixed, and endpoint B is continuously updated in the electronic map according to the path exploration direction until an obstacle is encountered, such as Figure 4 As shown in the shaded part, the update stops. At this time, the connection between endpoints A and B is an initial planning path. Since an obstacle is encountered in the path exploration direction, an initial planning path has been returned, but the first row of pixels has not been completely traversed. Therefore, the remaining pixels in the first row are traversed along the path exploration direction, and the next pixel in the area where path planning is not performed is selected as endpoint A. Endpoint B is updated according to the above method, and the next initial planning path is planned, and so on, until all the pixels in the first row are traversed. The exploration process of other rows is the same as the first row, until the entire electronic map is traversed, multiple initial planning paths in the area where path planning is not performed can be obtained. It should be noted that the distance between two adjacent rows in the electronic map is the path gap value Spacing.
[0048] It should be understood that Figure 3 and Figure 4 This is to illustrate the process of lateral path exploration. The path exploration processes in other path exploration directions are similar to the lateral path exploration process, which will not be described in detail in this application.
[0049] Step S3, filtering the initial planned path according to the preset path filtering condition to obtain the pass path and the path to be planned.
[0050] Among them, the path filtering condition is used to compare with the path parameters of the path to filter the initial planned path. The path parameters are the inherent attributes of the path or the area where the path is located, such as the path length of the path, the area of the area where the path is located, etc. The passable path is a sub-path that can be used as a global coverage path after path filtering; the path to be planned is a sub-path that cannot be used as a global coverage path after path filtering.
[0051] In an implementation manner of the present application, if the path parameters of the initial planned path meet the path filtering conditions, the terminal device may use the initial planned path as a pass path; otherwise, the initial planned path may be used as a path to be planned.
[0052] Specifically, in some embodiments of the present application, the above-mentioned path filtering condition may include a path length filtering value, and the path length filtering value is used to compare with the path length of the initial planned path to filter the initial planned path. If the path length of the initial planned path is greater than or equal to the path length filtering value, the terminal device may use the initial planned path as a pass path; if the path length of the initial planned path is less than the path length filtering value, the terminal device may use the initial planned path as a path to be planned.
[0053] It should be understood that by filtering using the path filter length value, the initially planned path with a longer path length can be retained as a pass path. The longer the pass path, the fewer pass paths are required to complete the path planning for the same area where path planning is not performed. Correspondingly, the fewer times the movable device moves from one pass path to another, that is, the fewer times the movable device performs turns. Since the corner area is often not fully covered during the turning process of the movable device, resulting in a decrease in the global coverage rate, therefore, filtering using the path filter length value can reduce the number of turns of the movable device in the corner area, thereby improving the global coverage rate.
[0054] In other embodiments of the present application, the above-mentioned path filtering conditions may also include a path coverage area filtering value, which is used to compare with the total area of the area where the initial planned path is located to filter the initial planned path. Among them, the total area of the area where the initial planned path is located may refer to the total area size of the grid covered by the initial planned path in the grid map. If the total area of the area where the initial planned path is located is greater than or equal to the path coverage area filtering value, the terminal device can use the initial planned path as a pass path. If the total area of the area where the initial planned path is located is less than the path coverage area filtering value, the terminal device can use the initial planned path as a path to be planned.
[0055] It should be understood that by filtering using the path coverage area filter value, the initial planned path with a larger path coverage area can be retained as a pass path. Similarly, the larger the path coverage area, the fewer the number of pass paths required to complete the path planning for the same area where path planning is not performed, and accordingly, the fewer times the movable device moves from one pass path to another, that is, the fewer the number of turns. Therefore, filtering using the path coverage area filter value can reduce the number of turns of the movable device in the corner area, thereby improving the global coverage rate.
[0056] Step S4, treat the area where the path to be planned is located as the area where path planning is not performed, and update the preset path exploration direction and the preset path filtering conditions, repeat the above steps S2 and S3 to process the path to be planned until the filtering result meets the preset path coverage condition, and then end the path planning.
[0057] In the implementation mode of the present application, since the path to be planned is an unusable path, the path to be planned is not included in the global coverage path. Therefore, the area where the path to be planned is located in the initial passage area has not completed path planning. In order to improve the global coverage rate, the terminal device needs to treat the area where the path to be planned is located as a new area where path planning has not been executed, and continue path planning.
[0058] Specifically, the terminal device can set the area where the passable path is located as an inaccessible area in the electronic map, and the remaining passable area (that is, the area where the path to be planned is located) as a new area where path planning has not been executed for the next path planning.
[0059] Before performing the next path planning, the terminal device may update the preset path exploration direction and the preset path filtering conditions.
[0060] In an embodiment of the present application, the terminal device can obtain multiple preset path exploration directions, select any one of the path exploration directions to execute the path planning of step S2 and the path filtering of step S3, and then select another path exploration direction different from the path exploration direction used in step S2 as the updated path exploration direction, and use the updated path exploration direction to continue path planning (step S2) and path filtering (step S3) for the new area where path planning has not been performed, until the filtering result meets the preset path coverage condition, and then the path planning is terminated.
[0061] Among them, the process of path planning and path filtering can refer to the description of step S2 and step S3 respectively, and this application will not elaborate on this.
[0062] In the implementation of the present application, the filtering result may be the result of the pass path and the path to be planned obtained through path filtering. The preset path coverage condition is used to determine whether the path planning has been completed in the initial pass area. Specifically, it may be that there is no path to be planned after path filtering, or the area covered by the pass path obtained after path filtering reaches a preset proportion of the total area of the initial pass area.
[0063] Take the preset path coverage condition that there is no path to be planned after path filtering as an example for explanation. If there is no path to be planned after path filtering, the terminal device can terminate the path planning and obtain a pass path obtained by path planning in different path exploration directions; if there is a path to be planned after path filtering, the terminal device can again use the area where the new path to be planned is located as the new area where path planning has not been executed, and update the path exploration direction and filtering conditions again, repeat steps S2 and S3, and continue path planning and path filtering for the new area where path planning has not been executed, until there is no path to be planned after path filtering, then terminate the path planning and obtain a pass path obtained by path planning in different path exploration directions.
[0064] Based on the consideration of computational efficiency and path planning efficiency, the number of the above-mentioned multiple path exploration directions can be two, and the two path exploration directions are perpendicular to each other. Specifically, one of the path exploration directions can be the horizontal coordinate direction of the electronic map, or the X-axis direction of the world coordinate system used to construct the electronic map, that is, the "horizontal" mentioned above, and correspondingly, the other path exploration direction can be the vertical coordinate direction of the electronic map, or the Y-axis direction of the world coordinate system used to construct the electronic map, that is, the "vertical".
[0065] Based on consideration of path coverage, the number of the multiple path exploration directions may be greater than two.
[0066] In some implementations, the terminal device may also obtain the boundary directions of each boundary of the area where path planning is not performed in the electronic map, and determine multiple path exploration directions based on each boundary direction. For example, the terminal device may determine the number of boundaries corresponding to each boundary direction based on the boundary direction of each boundary, and use the boundary directions with the first N number of corresponding boundaries as a path exploration direction, where the value of N is the number of path exploration directions. In this way, when performing path planning for an irregular area, the direction of the initially planned path can be matched with the boundary of the irregular area, which can improve the planning efficiency of path planning.
[0067] Step S5: connect all the passage paths to form a global coverage path of the initial passage area.
[0068] In the implementation of the present application, the terminal device can use the pass paths as sub-paths of the global coverage path, connect all the pass paths, and form a global coverage path of the initial pass area. The global coverage path refers to a complete path covering the initial pass area, which can be used for the movement and operation of the movable device.
[0069] In some embodiments of the present application, the terminal device can obtain the path endpoints of all pass paths and the position of each path endpoint, and then sort the path endpoints according to the positions of the path endpoints, and then connect the path endpoints according to the sorting method of the path endpoints to form a global coverage path for the initial pass area.
[0070] Specifically, the terminal device can filter out the starting endpoint of the global coverage path from the path endpoints according to the path endpoints of all the pass paths and the positions of the path endpoints. For example, the terminal device can use the path endpoint with the shortest distance from the entrance position in the initial pass area as the starting endpoint, or can use the path endpoint with the shortest distance from the current position of the movable device in the initial pass area as the starting endpoint, or can obtain the path endpoint selected by the user as the starting endpoint.
[0071] Then, the starting endpoint is set to endpoint C, the pass path where the starting endpoint is located is retained, and another path endpoint in the pass path that is different from endpoint C is set to endpoint D. According to the position of endpoint D, the next path endpoint is determined by Dijkstra algorithm, A-Star (A*) algorithm or other search algorithms, and the determined path endpoint is set to endpoint E. Similarly, the pass path where endpoint E is located is retained, and another path endpoint in the pass path that is different from endpoint E is set to endpoint F, and then the next path endpoint is determined according to the position of endpoint F, and so on, until all path endpoints are traversed, and the path endpoints of the pass path are connected in the order of endpoint C, endpoint D, endpoint E, endpoint F, ..., to obtain the global coverage path of the initial pass area.
[0072] After completing the above sorting and connection, an arched global coverage path can be formed in a regular area, such as a rectangular area. In an irregular area, different paths can also be connected to form a global coverage path, thereby improving the global coverage rate.
[0073] In addition, after completing the sorting of the path endpoints, the terminal device can interpolate each path according to the resolution of the electronic map to insert several path endpoints between the sorted path endpoints, and then connect all the path points to achieve global coverage of the path. In this way, the number of path endpoints included in the global coverage path increases, the global coverage path is more refined, and the movable device can send different moving speeds on the path composed of each two adjacent path endpoints according to the actual situation, so as to achieve adaptive movement of the movable device.
[0074] In an implementation manner of the present application, by obtaining an initial pass area, path planning is performed on the area where path planning has not been performed according to a preset path gap value and a preset path exploration direction to obtain an initial planned path, and the initial planned path is filtered according to a preset path filtering condition to obtain a pass path and a path to be planned. Then, the area where the path to be planned is located is used as an area where path planning has not been performed, and the preset path exploration direction and the preset path filtering condition are updated to repeat the above processing of the path to be planned until the filtering result meets the preset path coverage condition, then the path planning is terminated, and all pass paths are connected to form a global coverage path for the initial pass area. Since path exploration can perform path planning in a preset path exploration direction, on the one hand, for irregular areas, the exploration direction can be set according to the shape or boundary of the initial pass area, so that the path planning of the initial pass area can be performed according to the exploration direction, thereby achieving commonality between regular and irregular areas. On the other hand, using different exploration directions for path planning can make the path direction arrangement more reasonable, reduce the number of turns of the movable device, thereby improving the working efficiency of the movable device, and through multiple cycles of path exploration, the filtering results meet the preset path coverage conditions, which can avoid the appearance of areas in the initial pass area where path planning is not performed, thereby improving the global coverage rate of the path in the specified area.
[0075] In some embodiments of the present application, Figure 5 As shown, the above step S4 may include the following steps S41 to S45.
[0076] Step S41, updating the preset path filtering condition to obtain an updated path filtering condition.
[0077] In an implementation manner of the present application, updating the preset path filtering conditions can reduce the number of paths to be filtered during the next path exploration, thereby completing path planning in areas where path planning has not been performed, and obtaining a pass path in the area where path planning has not been performed.
[0078] Specifically, the path filtering condition may include a path length filtering value. Accordingly, the terminal device may lower the path length filtering value according to a preset length difference to obtain an updated path length filtering value.
[0079] The length difference can be set according to actual conditions. For example, the preset path filtering condition can be 100, the length difference can be set to 20, and the updated path filtering condition is 80.
[0080] Step S42: updating the preset path exploration direction to obtain an updated path exploration direction.
[0081] Among them, the updated path exploration direction is different from the preset path exploration direction before the update. The terminal device can obtain multiple preset path exploration directions, and select a direction different from the preset path exploration direction from the multiple preset path exploration directions as the updated path exploration direction. The terminal device can also determine the updated path exploration direction based on the preset path exploration direction and the reference angle for adjusting the path exploration direction. For example, the reference angle can be set to 90°, and the terminal device can use the direction perpendicular to the preset path exploration direction as the updated path exploration direction.
[0082] Step S43, performing path planning for the area where the path to be planned is located according to the path gap value and the updated path exploration direction.
[0083] The area where the path to be planned is located is also the area where path planning has not been performed.
[0084] Step S44, filtering the planned path according to the updated path filtering condition and the updated path exploration direction.
[0085] Among them, the implementation methods of path planning and path filtering can be respectively implemented in the same way as step S2 and step S3, and this application will not elaborate on this.
[0086] Step S45, when the filtering result does not meet the preset path coverage condition, the area where the path to be planned is located obtained by filtering is used as the updated passage area, and the process returns to the step of updating the preset path filtering condition to obtain the updated path filtering condition.
[0087] In an implementation manner of the present application, if the filtering result meets the preset path coverage condition, it means that the path planning of the initial passage area has been completed. At this time, the terminal device can end the path planning and connect all the obtained passage paths to form a global coverage path of the initial passage area.
[0088] If the filtering result does not meet the preset path coverage condition, it means that there is a path to be planned after the path filtering, and the path planning has not been completed in the initial passage area. At this time, the terminal device can use the area where the filtered path to be planned is located as the updated passage area. The updated passage area is also the new area where path planning has not been executed, and return to execute steps S41 to S45 until the filtering result meets the preset path coverage condition and the path planning is ended.
[0089] In the implementation manner of the present application, the terminal device updates the preset path exploration direction, and when using the updated path exploration direction to perform path planning and path filtering on the updated passage area, the path direction can be arranged more reasonably, reducing the number of turns of the movable device. In addition, by updating the path filtering conditions, the filtering restrictions can be relaxed, so that the area where the original path to be planned is located can be planned, and the passage path in the updated passage area can be obtained. Finally, through multiple cycles of path exploration, the passage path can cover the entire initial passage area, thereby improving the global coverage rate of the path.
[0090] In the implementation manner of the present application, the path gap value is set to avoid the problem of too large a repeated working area occurring when the movable device moves and works according to the global coverage path.
[0091] Please refer to Figure 6 , take a lawn mower robot as an example, assuming that the length of the cutting blade section of the lawn mower robot is 10, if the path gap value Spacing is set too small, for example, set to 7.5, when performing lateral path exploration, if the path starting position of the first row of the path in the electronic map is M(0,0), according to the path gap value Spacing, the starting path position of the second row of the path is N(0,7.5), then, when the lawn mower robot moves on the first row of the path, the vertical coordinates of the working area covered are 0 to 5; when the lawn mower robot moves on the second row of the path, the vertical coordinates of the working area covered are 2.5 to 12.5. Obviously, the repeated working area is the area with vertical coordinates of 2.5 to 5, that is, Figure 6 In the shaded area in the figure, the mowing robot's cutting blade repeatedly mows the grass in the repeated working area. Therefore, the path gap value Spacing can be set according to the cutting blade section length, for example, set to 10 or 9.
[0092] Assuming that the path gap value Spacing is set to 10, (0, 0), (0, 1), (0, 2) ..., (0, 9) can all be used as the starting path positions of the first row of pass paths. Therefore, when planning the path, it is necessary to consider the situation of the pass paths obtained by planning at different starting path positions.
[0093] Specifically, Figure 7As shown, the above step S43 may include the following steps S431 to S434.
[0094] Step S431, obtaining the number of path planning times in the updated path exploration direction according to the path gap value.
[0095] Step S432, obtaining the adjustment step length of each path planning.
[0096] Among them, the adjustment step size is less than the path gap value. Specifically, assuming that the path gap value Spcing is 10, the terminal device can determine that the number of path planning times for the updated path exploration direction is 10 times, or less than 10 times, such as 5 times. Accordingly, the adjustment step size can be set by the staff, or it can be determined based on the number of path planning times and the path gap value. For example, if the path gap value Spcing is 10 and the number of path planning times is 10, the adjustment step size is 1.
[0097] Step S433, determining the starting path position in each path planning according to the path gap value and the adjustment step size.
[0098] In some embodiments of the present application, the starting path position is the starting point used in path planning. The starting path position used in each path planning is different, the spacing between the same row of passing paths obtained by different path planning is related to the adjustment step size, and the spacing between different rows of passing paths obtained by the same path planning is related to the path gap value Spcing.
[0099] Please refer to Figure 8 , assuming that the path gap value Spcing is 10, the number of path planning times is 4, the path exploration direction is horizontal, and the adjustment step is 2.5, the first group of starting path positions (0, 0), (0, 10), (0, 20), (0, 30) can be used as the starting path positions of the first path planning according to the path gap value. According to the starting path position, path gap value and adjustment step of the first path planning, the second group of starting path positions (0, 2.5), (0, 12.5), (0, 22.5), (0, 32.5) can be used as the starting path positions of the second path planning, and so on, the starting path positions of the four path planning can be obtained.
[0100] Step S434, performing path planning on the area where the path to be planned is located according to the starting path position, so as to obtain multiple sub-paths for each path planning.
[0101] by Figure 8To continue the explanation, during the first path planning, the starting path positions (0, 0), (0, 10), (0, 20), and (0, 30) can be used as starting points to perform path planning in the area where the path to be planned is located, and multiple sub-paths of the first path planning can be obtained. The process of path planning can be referred to steps S2 and Figure 3 During the second path planning, the starting path positions (0, 2.5), (0, 12.5), (0, 22.5), and (0, 32.5) can be used as starting points to perform path planning in the area where the path to be planned is located, and multiple sub-paths of the second path planning can be obtained. Similarly, multiple sub-paths corresponding to the four path plannings can be obtained.
[0102] In the implementation of the present application, different sub-paths can be obtained through multiple path planning. Figure 8 There are multiple obstacles between (0, 0) and (100, 0). When planning the path for the first time, starting from (0, 0) and exploring to (100, 0) will yield multiple sub-paths. Figure 7 If there is no obstacle between (0, 2.5) and (100, 2.5), a sub-path will be obtained when the second path planning starts from (0, 2.5) and explores to (100, 2.5). Therefore, the total number of sub-paths, path lengths, area coverage of the area in the initial traffic area, number of turning points, etc. obtained by different sub-path planning are all different. Therefore, when filtering the path, the terminal device can select multiple sub-paths obtained by one path planning from multiple sub-paths obtained by different sub-path planning. In this way, the global coverage path can be adapted to the environment inside the initial image area, avoiding obstacles and improving the global coverage of the path.
[0103] It should be noted that the above is an explanation of the path planning process of step S4, and the path planning process of step S2 can also adopt this method, which will not be elaborated in this application.
[0104] In some embodiments of the present application, the above-mentioned filtering of the path after path planning according to the updated path filtering conditions and the updated path exploration direction may include: obtaining the total path length of each path planning, comparing the total path length of each path planning, and taking the path planning with the longest total path length as the path planning result of the updated path exploration direction, and then, according to the path length filtering value, filtering multiple sub-paths in the path planning result into passable paths and paths to be planned.
[0105] The total path length is the sum of the lengths of all sub-paths in each path planning.
[0106] In other embodiments of the present application, the above-mentioned filtering of the path after path planning according to the updated path filtering conditions and the updated path exploration direction may also include: obtaining the area coverage of the area to which all sub-paths in each path planning belong in the initial pass area, and taking the path planning with the largest area coverage as the path planning result of the updated path exploration direction, and then, according to the path length filtering value, filtering the multiple sub-paths in the path planning result into pass paths and paths to be planned.
[0107] It should be understood that selecting the path planning with the longest total path length as the path planning result of the new path exploration direction, or selecting the path planning with the largest coverage area in the initial pass area of all sub-paths as the path planning result of the updated path exploration direction, can maximize the global coverage rate corresponding to the path planning result. Then, according to the path length filter value, filter the multiple sub-paths in the path planning result into pass paths and paths to be planned. If there is a path to be planned, steps S4 to S5 can be re-executed; if there is no path to be planned, the path planning can be ended, and step S5 can be executed to obtain a global coverage path.
[0108] In other embodiments of the present application, the above-mentioned filtering of the path after path planning according to the updated path filtering conditions and the updated path exploration direction may also include: obtaining the total number of turning points between sub-paths in each path planning, and taking the path planning with the least total number of turning points as the path planning result of the updated path exploration direction, and then, based on the path length filtering value, filtering the multiple sub-paths in the path planning result into passable paths and paths to be planned.
[0109] It should be understood that the total number of inflection points determines the number of turns required for the movable device to move according to the global coverage path. The more turns, the greater the power consumption of the movable device. In addition, since the corner area of the movable device is often not completely covered during the turning process, resulting in a decrease in the global coverage rate, therefore, selecting the path planning with the least total number of inflection points as the path planning result of the updated path exploration direction can reduce the power consumption of the movable device and maximize the global coverage rate corresponding to the path planning result. Then, according to the path length filter value, the multiple sub-paths in the path planning result are filtered into passable paths and paths to be planned. If there is a path to be planned, steps S4 to S5 can be re-executed; if there is no path to be planned, the path planning can be ended and step S5 can be executed to obtain a global coverage path.
[0110] In order to comprehensively consider the sub-paths obtained from each path planning, the terminal device can also perform weighted addition on the aforementioned total path length, total number of turning points and area coverage to obtain a comprehensive evaluation value, and use the path planning with the largest comprehensive evaluation value as the path planning result for the updated path exploration direction. Then, based on the path length filter value, the multiple sub-paths in the path planning results are filtered into passable paths and paths to be planned.
[0111] Please refer to Fig. 9 , Fig. 9 This is a schematic diagram of a global coverage path planned by the path planning method provided in this application. The path planning method provided in this application can be used in both regular and irregular areas. In practical applications, the global coverage rate of the global coverage path in the initial pass area is above 85%.
[0112] It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders.
[0113] like Fig.10 Shown is a schematic structural diagram of a path planning device 1000 provided in an embodiment of the present application, wherein the path planning device 1000 is configured on a terminal device.
[0114] Specifically, the path planning device 1000 may include:
[0115] An acquisition unit 1001 is used to acquire an initial pass area, wherein the initial pass area includes an area where path planning is not performed;
[0116] An exploration unit 1002 is used to perform path planning on the area where path planning has not been performed to obtain an initial planned path according to a preset path gap value and a preset path exploration direction;
[0117] A filtering unit 1003 is used to filter the initial planned path according to a preset path filtering condition to obtain a pass path and a path to be planned;
[0118] The updating unit 1004 is used to treat the area where the path to be planned is located as an area where path planning is not performed, and to update the preset path exploration direction and the preset path filtering condition, and to repeat the above-mentioned exploration unit 1002 and filtering unit 1003 to process the path to be planned until the filtering result satisfies the preset path coverage condition, thereby terminating the path planning;
[0119] The path planning unit 1005 is used to connect all the passing paths to form a global coverage path of the initial passing area.
[0120] In some embodiments of the present application, the above-mentioned updating unit 1004 can be specifically used to: update the preset path filtering conditions to obtain updated path filtering conditions; update the preset path exploration direction to obtain updated path exploration directions; perform path planning for the area where the path to be planned is located according to the path gap value and the updated path exploration direction; filter the path after path planning according to the updated path filtering conditions and the updated path exploration direction; when the filtering result does not meet the preset path coverage conditions, the area where the path to be planned is located obtained by filtering is used as the updated passage area, and return to execute the step of updating the preset path filtering conditions to obtain the updated path filtering conditions.
[0121] In some embodiments of the present application, the above-mentioned update unit 1004 can be specifically used to: obtain the number of path planning in the updated path exploration direction according to the path gap value; obtain the adjustment step size of each path planning, wherein the adjustment step size is smaller than the path gap value; determine the starting path position in each path planning according to the path gap value and the adjustment step size; and perform path planning on the area where the path to be planned is located according to the starting path position to obtain multiple sub-paths for each path planning.
[0122] In some embodiments of the present application, the above-mentioned path filtering condition includes a path length filtering value; the above-mentioned updating unit 1004 can be specifically used to: obtain the total path length of each path planning, and the total path length is the sum of the lengths of all sub-paths in each path planning; compare the total path lengths of each path planning, and take the path planning with the longest total path length as the path planning result of the updated path exploration direction; according to the path length filtering value, filter the multiple sub-paths in the path planning result into passable paths and paths to be planned.
[0123] In some embodiments of the present application, the above-mentioned path filtering conditions include a path length filtering value; the above-mentioned updating unit 1004 can be specifically used to: obtain the total number of turning points between sub-paths in each path planning; use the path planning with the least total number of turning points as the path planning result of the updated path exploration direction; and according to the path length filtering value, filter multiple sub-paths in the path planning result into passable paths and paths to be planned.
[0124] In some embodiments of the present application, the above-mentioned path filtering conditions include a path length filtering value; the above-mentioned updating unit 1004 can be specifically used to: obtain the area coverage rate of the area to which all sub-paths in each path planning belong in the initial pass area; use the path planning with the largest area coverage rate as the path planning result of the updated path exploration direction; according to the path length filtering value, filter the multiple sub-paths in the path planning result into pass paths and paths to be planned.
[0125] In some embodiments of the present application, the above-mentioned path planning unit 1005 can be specifically used to: obtain the path endpoints of all pass paths and the positions of the path endpoints; sort the path endpoints according to the positions of the path endpoints; connect the path endpoints according to the sorting method of the path endpoints to form a global coverage path of the initial pass area.
[0126] In some implementations of the present application, the path filtering condition includes a path length filtering value; the updating unit 1004 may be specifically configured to: lower the path length filtering value according to a preset length difference value to obtain an updated path length filtering value.
[0127] It should be noted that, for the convenience and simplicity of description, the specific working process of the above-mentioned path planning device 1000 can be referred to Figures 1 to 9 The corresponding process of the method will not be repeated here.
[0128] like Fig.11 1 is a schematic diagram of a terminal device provided in an embodiment of the present application. The terminal device 11 may include: a processor 1100, a memory 1101, and a computer program 1102 stored in the memory 1101 and executable on the processor 1100, such as a path planning program. When the processor 1100 executes the computer program 1102, the steps in the above-mentioned path planning method embodiments are implemented, such as Figure 1 Alternatively, when the processor 1100 executes the computer program 1102, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Fig.10 The shown acquisition unit 1001, exploration unit 1002, filtering unit 1003, updating unit 1004 and path planning unit 1005.
[0129] The computer program may be divided into one or more modules / units, which are stored in the memory 1101 and executed by the processor 1100 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the terminal device.
[0130] For example, the computer program may be divided into: an acquisition unit, an exploration unit, a filtering unit, an updating unit and a path planning unit.
[0131] The specific functions of each unit are as follows: an acquisition unit, used to acquire an initial pass area, wherein the initial pass area includes an area where path planning is not performed; an exploration unit, used to perform path planning on the area where path planning is not performed to obtain an initial planned path according to a preset path gap value and a preset path exploration direction; a filtering unit, used to filter the initial planned path according to a preset path filtering condition to obtain a pass path and a path to be planned; an updating unit, used to take the area where the path to be planned is located as an area where path planning is not performed, and update the preset path exploration direction and the preset path filtering condition, repeat the above-mentioned exploration unit and filtering unit to process the path to be planned until the filtering result meets the preset path coverage condition, and then end the path planning; a path planning unit, used to connect all the pass paths to form a global coverage path of the initial pass area.
[0132] The terminal device may include, but is not limited to, a processor 1100 and a memory 1101. Those skilled in the art will appreciate that Fig.11 It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access equipment, buses, etc.
[0133] The processor 1100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0134] The memory 1101 may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. The memory 1101 may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory 1101 may also include both an internal storage unit of the terminal device and an external storage device. The memory 1101 is used to store the computer program and other programs and data required by the terminal device. The memory 1101 may also be used to temporarily store data that has been output or is to be output.
[0135] It should be noted that, for the convenience and brevity of description, the structure of the above-mentioned terminal device can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.
[0136] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0137] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A path planning method, characterized in that: include: Step S1: obtaining an initial passage area, wherein the initial passage area includes an area where path planning is not performed; Step S2: performing path planning on the area where path planning has not been performed to obtain an initial planned path according to a preset path gap value and a preset path exploration direction; Step S3: filtering the initial planned path according to a preset path filtering condition to obtain a pass path and a path to be planned; Step S4: the area where the path to be planned is located is regarded as an area where path planning is not performed, and the preset path exploration direction and the preset path filtering condition are updated, and the above steps S2 and S3 are repeated to process the path to be planned until the filtering result meets the preset path coverage condition, and the path planning is terminated; wherein the updated path exploration direction is different from the preset path exploration direction before the update; Step S5: Connect all the passing paths to form a global coverage path of the initial passing area.
2. The path planning method according to claim 1, characterized in that: The step S4: taking the area where the path to be planned is located as an area where path planning is not performed, and updating the preset path exploration direction and the preset path filtering condition, repeating the above steps S2 and S3 to process the path to be planned until the filtering result meets the preset path coverage condition, and ending the path planning, including: Updating the preset path filtering condition to obtain an updated path filtering condition; Updating the preset path exploration direction to obtain an updated path exploration direction; Performing path planning for the area where the path to be planned is located according to the path gap value and the updated path exploration direction; Filtering the planned path according to the updated path filtering condition and the updated path exploration direction; When the filtering result does not meet the preset path coverage condition, the area where the path to be planned is located obtained by filtering is used as the updated passage area, and the step of updating the preset path filtering condition to obtain the updated path filtering condition is returned to be executed.
3. The path planning method according to claim 2, characterized in that: The performing path planning for the area where the path to be planned is located according to the path gap value and the updated path exploration direction includes: Acquire the number of path planning times of the updated path exploration direction according to the path gap value; Obtaining an adjustment step size for each path planning, wherein the adjustment step size is smaller than the path gap value; Determining a starting path position in each path planning according to the path gap value and the adjustment step size; According to the starting path position, path planning is performed on the area where the path to be planned is located to obtain multiple sub-paths for each path planning.
4. The path planning method according to claim 3, characterized in that: The path filtering condition includes a path length filtering value; The filtering of the planned path according to the updated path filtering condition and the updated path exploration direction includes: Obtain the total path length of each path planning, where the total path length is the sum of the lengths of all sub-paths in each path planning; Comparing the total path lengths of each path planning, and taking the path planning with the longest total path length as the path planning result of the updated path exploration direction; According to the path length filtering value, multiple sub-paths in the path planning result are filtered into passable paths and paths to be planned.
5. The path planning method according to claim 3, characterized in that: The updated path filtering condition includes a path length filtering value; The filtering of the planned path according to the updated path filtering condition and the updated path exploration direction includes: Get the total number of inflection points between sub-paths in each path planning; Taking the path planning with the least total number of inflection points as the path planning result of the updated path exploration direction; According to the path length filtering value, multiple sub-paths in the path planning result are filtered into passable paths and paths to be planned.
6. The path planning method according to claim 3, characterized in that: The updated path filtering condition includes a path length filtering value; The filtering of the planned path according to the updated path filtering condition and the updated path exploration direction includes: Obtaining the area coverage of the areas to which all sub-paths belong in each path planning in the initial pass area; Taking the path planning with the maximum area coverage as the path planning result of the updated path exploration direction; According to the path length filtering value, multiple sub-paths in the path planning result are filtered into passable paths and paths to be planned.
7. The path planning method according to any one of claims 1 to 6, characterized in that: The step of connecting all the passage paths to form a global coverage path of the initial passage area includes: Get the path endpoints and the locations of all pass paths; sorting the path endpoints according to the positions of the path endpoints; The path endpoints are connected according to the order of the path endpoints to form a global coverage path for the initial passage area.
8. The path planning method according to claim 3, characterized in that: The path filtering condition includes a path length filtering value; and updating the preset path filtering condition to obtain an updated path filtering condition includes: lowering the path length filtering value according to a preset length difference to obtain an updated path length filtering value.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the path planning method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the path planning method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Path planning method and cleaning robot
CN113219993A
Path control method and device for sweeping robot and sweeping robot
CN113534822A
Full-coverage path planning method and navigation system
CN113741425A