Path planning method and apparatus, automatic horticulture device, and computer program product
By dividing the working area of the automated gardening equipment into sub-areas and optimizing the planning direction and sequence within each sub-area, the problems of lawn indentation and efficiency are solved, achieving efficient and safe lawn mowing path planning.
Patent Information
- Application Number
- CN202210029314.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-01-11
AI Technical Summary
Existing automated gardening equipment leaves clear wheel marks and imprints on the lawn after multiple mowings, affecting lawn growth and vitality. Furthermore, existing solutions are prone to resulting in unreasonable mowing paths, which reduces efficiency.
The work area is divided into multiple sub-areas. For each sub-area, the actual planned direction is determined from the preset walking direction and the recommended planned direction. The global planned path is determined according to the movement order between sub-areas, and the local and global path planning is optimized.
This effectively avoids the problem of excessive pressure marks caused by planning along the same direction for a long time, balancing efficiency and safety, and improving mowing efficiency and lawn health.
Smart Images

Figure CN116466696B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent devices, and in particular to a path planning method and device, an automatic gardening device, and a computer program product. BACKGROUND
[0002] Existing automatic gardening devices, such as automatic lawn mowers, can automatically mow lawns without human supervision or control, thereby reducing the time occupied by users and reducing the repetitive labor of users.
[0003] Existing automatic lawn mowers usually plan appropriate mowing directions and mowing paths according to the shape of the working area (such as the shape of the lawn) to mow the lawn. However, the existing automatic lawn mowers have the problem that the mowing directions and mowing paths planned by the existing automatic lawn mowers leave relatively clear wheel marks and imprints on the lawn after multiple mowing, which easily affects the growth and vitality of the lawn.
[0004] To solve this problem, some existing solutions are to remotely specify the mowing direction by the user. Although this method can solve the problem of long-term single-direction mowing to some extent, it is easy to appear that the mowing direction specified by the user is unreasonable, and the mowing path planned has many short path segments, resulting in many turns of the automatic lawn mower and affecting the efficiency. SUMMARY
[0005] In view of the above problems, the present application provides a path planning method, an automatic gardening device, and a computer program product to at least solve the problem of poor working path planning effect of the existing automatic gardening device.
[0006] One or more embodiments of the present application provide a path planning method, comprising: receiving a preset walking direction of a working area; dividing the working area into a plurality of sub-areas; for each of the sub-areas, determining an actual planning direction of the sub-area from the preset walking direction and a recommended planning direction of the sub-area, and determining a local planning path corresponding to the sub-area according to the actual planning direction, wherein the path length of traversing the sub-area along the recommended planning direction is the shortest; obtaining a moving sequence between the sub-areas; and determining a global planning path of the working area according to the local planning path of each of the sub-areas and the moving sequence between the sub-areas.
[0007] According to another aspect of the present application, there is provided a path planning method, comprising: receiving a preset walking direction of a working area; dividing the working area into a plurality of sub-areas; for each of the sub-areas, determining an actual planning direction of the sub-area from the preset walking direction and a recommended planning direction of the sub-area, and determining a local planning path corresponding to the sub-area according to the actual planning direction, wherein a walking time of traversing the sub-area along the recommended planning direction is the shortest; obtaining a moving sequence between the sub-areas; and determining a global planning path of the working area according to the local planning path of each of the sub-areas and the moving sequence between the sub-areas.
[0008] According to another aspect of the present application, there is provided a path planning device, comprising: a first receiving module configured to receive a preset walking direction of a working area; a first dividing module configured to divide the working area into a plurality of sub-areas; a first determining module configured to, for each of the sub-areas, determine an actual planning direction of the sub-area from the preset walking direction and a recommended planning direction of the sub-area, and determine a local planning path corresponding to the sub-area according to the actual planning direction, wherein a path length of traversing the sub-area along the recommended planning direction is the shortest; a first obtaining module configured to obtain a moving sequence between the sub-areas; and a second determining module configured to determine a global planning path of the working area according to the local planning path of each of the sub-areas and the moving sequence between the sub-areas.
[0009] According to another aspect of the present application, there is provided a path planning device, comprising: a second receiving module configured to receive a preset walking direction of a working area; a second dividing module configured to divide the working area into a plurality of sub-areas; a third determining module configured to, for each of the sub-areas, determine an actual planning direction of the sub-area from the preset walking direction and a recommended planning direction of the sub-area, and determine a local planning path corresponding to the sub-area according to the actual planning direction, wherein a walking time of traversing the sub-area along the recommended planning direction is the shortest; a second obtaining module configured to obtain a moving sequence between the sub-areas; and a fourth determining module configured to determine a global planning path of the working area according to the local planning path of each of the sub-areas and the moving sequence between the sub-areas.
[0010] According to another aspect of the present application, there is provided an automatic gardening device, comprising a controller configured to execute the path planning method as described above.
[0011] According to another aspect of the present application, there is provided a computer program product comprising computer instructions instructing a computing device to execute the path planning method as described above.
[0012] By the embodiment, when determining the global planning path of the working area, the working area can be divided into one or more sub-areas, and the actual planning direction is selected from the preset walking direction and the recommended planning direction for at least one sub-area, so that the problem that the moving efficiency is significantly reduced when the preset walking direction is poor can be effectively avoided, and different actual planning directions can be determined for different sub-areas, so that the problem that the indentation is too heavy caused by long-term planning along the same planning direction can be solved, and thus the efficiency and safety are considered. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0014] Figure 1A The step flow chart of the path planning method provided for the embodiment one of the present application;
[0015] Figure 1B The schematic diagram of the partition for the embodiment one of the present application;
[0016] Figure 2A The step flow chart of the path planning method provided for the embodiment two of the present application;
[0017] Figure 2B The schematic diagram of the communication between the display device part of the embodiment two of the present application and the automatic horticulture device;
[0018] Figure 2C The schematic diagram of the partition for the embodiment two of the present application;
[0019] Figure 2D The schematic diagram of the first local path of one sub-area for the embodiment two of the present application;
[0020] Figure 2E The schematic diagram of the first local path of another sub-area for the embodiment two of the present application;
[0021] Figure 2F The schematic diagram of the global planning path for the embodiment two of the present application;
[0022] Figure 2G The schematic diagram of another global planning path for the embodiment two of the present application;
[0023] Figure 3 The step flow chart of the path planning method for the embodiment three of the present application;
[0024] Figure 4 A structural block diagram of the path planning device of Embodiment Four of the present application;
[0025] Figure 5 A structural block diagram of the path planning device of Embodiment Five of the present application. DETAILED DESCRIPTION
[0026] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0027] In order to facilitate the description and understanding, before the method is described, the structure and working scene of the automatic gardening device are briefly described as follows:
[0028] In the present embodiment, the automatic gardening device can be an automatic lawn mower, and of course, in other embodiments, it can also be other appropriate automatic devices, which are not limited.
[0029] The automatic gardening device at least includes a positioning module, a moving module and a control module, wherein the positioning module is used to determine the pose of the automatic gardening device in the environment. The moving module is used to drive the automatic gardening device to move. The control module can be connected with the positioning module and the moving module respectively, and controls the moving module to work according to the pose determined by the positioning module. In addition, the automatic gardening device can also include other modules according to different needs, such as a cutting module, etc.
[0030] In addition to being able to be connected with the aforementioned modules, the control module can also be connected with a display device, such as a smart phone, a PAD, a smart watch or a computer, etc. Taking the automatic gardening device as an automatic lawn mower for example.
[0031] The implementation process of the method is described as follows:
[0032] Embodiment One
[0033] Referring to Figure 1A , a step flowchart of the method of Embodiment One of the present application is shown.
[0034] The method includes the following steps:
[0035] Step S102: receiving a preset walking direction of the working area.
[0036] The preset walking direction can be an optimal direction calculated automatically, or a direction determined based on the selection of the user. Taking an automatic mower as an example, the preset walking direction can be a mowing direction calculated automatically through an algorithm.
[0037] In this embodiment, the user can decide whether to change the preset walking direction (i.e., the mowing direction) according to the situation of the lawn in the working area, thereby solving the problem that long-time planning of a path along the same mowing direction can cause the lawn to have marks and affect the vitality of the grass.
[0038] Step S104: dividing the working area into a plurality of sub-areas.
[0039] To ensure that the automatic gardening device can cover the entire working area during movement along the planned path, thereby ensuring the working effect, in a feasible manner, the working area is divided according to the preset walking direction, and the boundary information of the working area and the boundary information of the obstacles are comprehensively considered during the division, so that the sub-areas divided do not contain obstacles, the path planning can be better performed, the number of turns of the planned path is reduced, and the efficiency is improved.
[0040] Of course, in other embodiments, the working area can be divided and the sub-areas can be obtained in other manners, which are not limited in this embodiment.
[0041] An example of the division manner can be that: the non-passable grids in the working area are determined based on the boundary information of the working area and the boundary information of the obstacles, the working area is scanned according to the preset walking direction, and one or more sub-areas are divided based on the scanned connected and passable grids. A schematic diagram of the division is shown in FIG. 1. Figure 1B The gray part in the figure represents the obstacles, and the black thick line represents the boundary of the working area.
[0042] Step S106: determining, for each sub-area, an actual planning direction of the sub-area from the preset walking direction and the recommended planning direction of the sub-area, and determining a local planning path corresponding to the sub-area according to the actual planning direction. For each sub-area, a corresponding local planning path can be planned to ensure that the local planning path can cover the sub-area and has a relatively high moving efficiency. To avoid the problem that the preset walking direction is unreasonable and causes the moving efficiency of the local planning path planned according to the preset walking direction to be too low, in this embodiment, at least one first local path is planned according to the recommended planning direction of each sub-area, at least one second local path is planned according to the preset walking direction, and then the actual planning direction of the sub-area is determined according to the path length of the first local path and the path length of the second local path.
[0043] In this way, the movement efficiency of the finally planned path is ensured, and the lawn is not easily damaged by the same mowing direction of the planned path.
[0044] In this embodiment, the path length of the sub-region along the recommended planning direction is the shortest. A feasible way to determine the recommended planning direction can be that the direction parallel to each edge of the sub-region is selected as a candidate planning direction, the sub-region is traversed according to each candidate planning direction, a plurality of first local paths are obtained, and the candidate planning direction corresponding to the first local path with the shortest path length is determined as the recommended planning direction.
[0045] Taking a rectangular sub-region as an example, the rectangular sub-region includes long edges and short edges, a direction parallel to the extension direction of the long edge is selected as a candidate planning direction, and the sub-region is traversed according to the ploughing mode or other path planning mode to obtain a plurality of first local paths (the starting point and the ending point of different first local planning paths can be different). A direction parallel to the extension direction of the short edge is selected as another candidate planning direction, and a plurality of first local paths are determined according to the candidate planning direction. For these first local paths, the candidate planning direction corresponding to the first local path with the shortest path length is selected as the recommended planning direction.
[0046] If the path lengths of two or more first local paths are the same, but the corresponding candidate planning directions are different, one of them can be selected as the recommended planning direction.
[0047] Step S108: Obtain the movement sequence between the sub-regions.
[0048] The movement sequence between the sub-regions can be randomly combined. For example, if there are three sub-regions, denoted as sub-region 1, 2 and 3, the movement sequence can be “1-2-3” or “3-1-2”, and the like, which are not listed here.
[0049] Step S110: Determine the global planning path of the working region according to the local planning path of each sub-region and the movement sequence between the sub-regions.
[0050] After determining the local planning path of each sub-region, in order to ensure the movement efficiency and avoid too many turns that can cause low movement efficiency, an appropriate movement sequence combination can be determined from the movement sequence combinations of different sub-regions, and the global planning path of the working region can be determined according to the appropriate movement sequence and the local planning path of the sub-region.
[0051] The appropriate movement sequence can be determined by traversing various movement sequences, or by other appropriate methods, which are not limited.
[0052] By the embodiment, when determining the global planning path of the working area, the working area can be divided into one or more sub-areas, and the actual planning direction is selected from the preset walking direction and the recommended planning direction for at least one sub-area, so that the problem that the moving efficiency is significantly reduced when the preset walking direction is poor is effectively avoided, and different actual planning directions can be determined for different sub-areas, so that the problem of too heavy indentation caused by long-term planning along the same planning direction is solved, and thus the efficiency and safety are considered.
[0053] Embodiment Two
[0054] With reference to Figure 2A , a step flowchart of the method of the embodiment two of the present application is shown.
[0055] In the embodiment, the method comprises the following steps:
[0056] Step S202: receiving a preset walking direction of a working area.
[0057] In a feasible manner, in order to improve the intelligence, adaptability and configurability, step S202 can be implemented by the following process:
[0058] Process A1: sending recommendation information to a display device to instruct the display device to display a recommended planning direction to a user.
[0059] The display device can be a device connected with the automatic gardening device, such as a smart terminal (such as a smart phone, a PAD, etc.), a smart television or a smart sound box with a screen, or a display screen mounted on the automatic gardening device (the display screen can be fixed on the main body of the automatic gardening device, or can be mounted on the main body of the automatic gardening device in a detachable manner, which is not limited).
[0060] In a planning process, based on the boundary information of the working area and the boundary information of the obstacle, the recommended planning direction of the working area can be determined, and then the recommended planning direction and the path corresponding to the recommended planning direction are carried in the recommendation information, and the recommendation information is sent to the display device, so that the display device displays the recommended planning direction and the path corresponding thereto to the user.
[0061] It should be noted that the boundary information of the working area and the boundary information of the obstacle can be obtained by the automatic gardening device through visual SLAM mapping or other appropriate methods.
[0062] Taking an automatic mower as an example, the automatic mower can be loaded with a camera, and the automatic mower collects images of the working area during movement in the working area (such as the user's lawn), and establishes boundary information of the working area and boundary information of obstacles in the working area according to the images using a visual SLAM method. After mapping is completed, the boundary information of the working area and the boundary information of the obstacles can be visualized, and the result of the visualization processing is sent to the display device, so as to show the user a map of the working area. A schematic diagram of an automatic gardening device connected to a display device is shown in Figure 2B
[0063] In this embodiment, the recommended planning direction can be determined by the following method: determining the minimum rectangle that can cover the working area according to the boundary information of the working area, planning paths in the long side direction and the short side direction of the minimum rectangle respectively, and selecting the direction corresponding to the path with the shortest walking time (or the shortest walking distance) as the recommended planning direction.
[0064] The user can view the recommended planning direction and the corresponding path through the display device. If the user feels that the recommended planning direction is consistent with the actual planning direction in a longer period of time, which may cause indentations or easily affect the safety of the lawn, the user can set the planning direction by operating the display device, and the display device receives the modification operation of the user and determines the planning direction selected by the user as the preset walking direction according to the modification operation, and generates a control instruction accordingly.
[0065] If the user feels that the recommended planning direction can be used, the user can confirm the recommended planning direction on the display device, and the display device takes the recommended planning direction as the preset walking direction and generates a corresponding control instruction.
[0066] Process B1: receiving a control instruction in response to the recommended information, the control instruction carrying information of a preset walking direction determined based on a modification operation or a confirmation operation of the user on the recommended planning direction displayed in the display device.
[0067] The automatic gardening device receives the control instruction and determines the preset walking direction according to the control instruction. If the user adjusts the recommended planning direction, the control instruction is determined based on the modification operation of the user. If the user does not adjust the recommended planning direction, the control instruction is determined based on the confirmation operation of the user.
[0068] Process C1: determining the preset walking direction based on the control instruction.
[0069] The preset walking direction is parsed from the control instruction by processing the control instruction. If the user modifies the recommended planning direction, the preset walking direction is the planning direction adjusted by the user. If the user does not modify the recommended planning direction, the preset walking direction is the recommended planning direction.
[0070] Step S204: dividing the working area into a plurality of sub-areas.
[0071] In one possible implementation, the sub-areas can be divided by a BCD (Boustrophedon Cellular Decomposition) decomposition method, which is a decomposition method based on a grid map.
[0072] For example, step S204 can be implemented by determining the passable states of each grid in the working area according to the boundary information of the working area and the boundary information of the obstacles, setting a preset walking direction as a scanning direction of the working area, and dividing the working area into one or more sub-areas according to the scanning direction and the passable states of the grids. Each sub-area does not contain any obstacle.
[0073] A schematic diagram of a divided sub-area is shown in FIG. 2. It should be noted that although the order of the sub-areas is indicated in the figure, it does not represent the moving order of the sub-areas. Figure 2C
[0074] In other embodiments, the sub-areas can be divided by other appropriate methods, which are not limited herein.
[0075] Step S206: determining an actual planning direction of each sub-area from the preset walking direction and a recommended planning direction of the sub-area, and determining a local planning path corresponding to the sub-area according to the actual planning direction.
[0076] In one possible implementation, each sub-area can be implemented by the following method, in which step S206 can be implemented by the following sub-steps.
[0077] Sub-step S2061: traversing a sub-area according to the recommended planning direction of the sub-area to obtain a first local path of the sub-area.
[0078] In one example, sub-step S2061 can be implemented by the following process.
[0079] Process A2: taking a direction parallel to each side of the sub-area as a candidate planning direction.
[0080] If the sub-area is a polygon such as a rectangle or a triangle, the extension direction of each side of the sub-area can be taken as a candidate planning direction. For example, if the sub-area is a rectangle including long sides and short sides, a direction parallel to the long sides can be taken as a candidate planning direction, and a direction parallel to the short sides can be taken as another candidate planning direction.
[0081] Process B2: traversing the sub-area according to each candidate planning direction to obtain a plurality of first local paths.
[0082] For example, if the sub-region is a rectangle, the long side and the short side of the rectangle can be taken as candidate planning directions respectively, and corresponding first local paths can be established as shown in Figure 2D and Figure 2E Specifically, the process of establishing the first local path with the long side of the rectangle as the candidate planning direction can be: taking any one corner point of the sub-region as the starting point, establishing a path segment parallel to the long side of the rectangle, turning when reaching the boundary of the sub-region, and then continuing to establish a path segment parallel to the long side of the rectangle, and repeating the above process until a path covering the sub-region is formed as the first local path.
[0083] If the sub-region is a triangle, each side of the triangle can be taken as a candidate planning direction respectively, and corresponding first local paths can be determined. The manner of determining the first local path is similar to the process of determining the first local path with the long side of the rectangle as the candidate planning direction, and thus will not be described again.
[0084] The determination process is similar when the shape of the sub-region is other polygons, and thus will not be described again. It should be noted that when the sub-region includes multiple corner points, multiple first local paths with different starting points can be established for the same candidate planning direction.
[0085] Process C2: determining the candidate planning direction corresponding to the first local path with the shortest path length as the recommended planning direction, and obtaining the first local path corresponding to the recommended planning direction.
[0086] In an example, process B2 can be implemented as: determining the candidate planning direction corresponding to the first local path with the shortest path length as the recommended planning direction, and obtaining the first local path (which can be one or more) corresponding to the recommended planning direction. In this way, the walking efficiency and work efficiency of the first local path corresponding to the recommended planning direction can be ensured to be high.
[0087] Sub-step S2062: traversing the sub-region according to the preset walking direction to obtain a second local path of the sub-region.
[0088] The determination of the second local path can be achieved by the following manner: taking any one corner point in the sub-region as the starting point, establishing a path segment parallel to the preset walking direction, turning when reaching the boundary of the sub-region, and then continuing to establish a path segment parallel to the preset walking direction until the sub-region is covered.
[0089] It should be noted that when the sub-region includes multiple corner points, multiple second local paths with different starting points can be established for the same preset walking direction.
[0090] Sub-step S2063: determining an actual planning direction of the sub-region and a local planning path corresponding to the actual planning direction according to path lengths of the first local path and the second local path.
[0091] In one possible implementation, if the path length of the second local path is greater than or equal to a second set multiple of the path length of the first local path, the recommended planning direction corresponding to the first local path is taken as the actual planning direction, and the first local path is taken as the local planning path corresponding to the actual planning direction.
[0092] The second set multiple is, for example, 1.5. If the path length of the second local path is greater than 1.5 times the path length of the first local path, it indicates that the current sub-region is a narrow region, and the preset walking direction selected by the user has a too low walking efficiency. Therefore, the recommended planning direction is taken as the actual planning direction to ensure the walking efficiency.
[0093] Step S208: obtaining a moving sequence between the sub-regions.
[0094] The moving sequence between the sub-regions can be determined randomly.
[0095] Step S210: determining a global planning path of the working region according to the local planning paths of the sub-regions and the moving sequence between the sub-regions.
[0096] In this embodiment, in order to reduce the calculation load, improve the calculation efficiency, and ensure that a global planning path with a relatively high walking efficiency can be obtained, step S208 can be implemented through the following processes:
[0097] Process A3: constructing a candidate global planning path according to the moving sequence of the sub-regions and the local planning paths of the sub-regions.
[0098] For example, taking the schematic diagram of the sub-region division described above as an example, a local planning path is selected from the local planning paths of the sub-regions in the order of the sub-region moving sequence “1-2-3-4-5-6”. The selected local planning paths are spliced according to the moving sequence to form a candidate global planning path.
[0099] Process B3: calculating a path length of the candidate global planning path.
[0100] Process C3: determining whether to update at least one of the moving sequence of the sub-regions and the local planning paths of the sub-regions according to the path length of the candidate global path. If yes, a new candidate global planning path is determined according to the update result, and the path length of the candidate global planning path is calculated to continue the execution until a termination condition is met.
[0101] If the path length satisfies a set threshold (which can be determined as needed, without limitation), the candidate global planning path is taken as the global planning path of the working area.
[0102] Alternatively, if the path length does not satisfy the set threshold, at least one of the moving order and the local planning path of the sub-area can be updated based on the current candidate global path. For example, the moving order is updated to "1-3-4-5-6-2", or a local planning path of another starting point is selected, etc.
[0103] A new global planning path is determined according to the new moving order and the local planning path of the sub-area, and the path length of the new global planning path is calculated. If the path length satisfies the set threshold, the termination condition is satisfied, otherwise the termination condition is not satisfied, and at least one of the moving order and the local planning path can be updated again, and the process is repeated until the termination condition is satisfied.
[0104] The termination condition can be that the set threshold is satisfied, or the set number of cycles (such as 50 times) is satisfied, or all combinations of the moving order and the local planning path are traversed.
[0105] The obtained global planning path can be as shown in Figure 2F or Figure 2G .
[0106] In this way, the optimal global planning path can be determined. On the one hand, the user can change and customize the mowing direction by himself, which can solve the damage and destruction of the lawn caused by mowing in a single direction for a long time. On the other hand, the best mowing direction can be recommended to the user, which improves the mowing efficiency and enhances the overall use effect.
[0107] Embodiment Three
[0108] Referring to Figure 3 , a step flow diagram of a path planning method of the third embodiment of the present application is shown.
[0109] The method comprises the following steps:
[0110] Step S302: receiving a preset walking direction of a working area.
[0111] The preset walking direction of the working area can be a mowing direction selected by the user or a better mowing direction calculated by an algorithm. The determination method of the preset walking direction can be the same as that of the first or second embodiment described above, and thus will not be described again.
[0112] Step S304: dividing the working area into a plurality of sub-areas.
[0113] The sub-area division method can be the same as that of the first or second embodiment described above, and thus will not be described again.
[0114] Step S306: determining an actual planning direction of the sub-region from the preset walking direction and the recommended planning direction of the sub-region, and determining a local planning path corresponding to the sub-region according to the actual planning direction.
[0115] In an implementation, step S306 includes the following sub-steps:
[0116] Sub-step S3061: traversing the sub-region according to the recommended planning direction of the sub-region to obtain a first local path of the sub-region.
[0117] The walking time length of traversing the sub-region along the recommended planning direction is the shortest. The walking time length is determined according to the rated acceleration, rated speed and rated angular velocity of the automatic gardening device.
[0118] Sub-step S3061 is implemented by the following process:
[0119] Process A4: taking a direction parallel to each side of the sub-region as a candidate planning direction, and traversing the sub-region according to each candidate planning direction to obtain a plurality of first local paths.
[0120] For example, if the sub-region is a triangle, the directions parallel to the three sides are taken as candidate planning directions, and the first local paths of the sub-region are planned according to the ploughing method or other methods. For the same candidate planning direction, one or more first local paths can be obtained, and the starting points and ending points of different first local paths are different.
[0121] Process B4: determining the candidate planning direction corresponding to the first local path with the shortest walking time length as the recommended planning direction, and obtaining the first local path corresponding to the recommended planning direction.
[0122] If the walking time lengths of the plurality of first local paths are all the shortest, and the candidate planning directions corresponding to these first local paths are different, one of the candidate planning directions can be randomly selected as the recommended planning direction, or the recommended planning direction can be determined according to the recorded usage times of the candidate planning directions, which is not limited.
[0123] Sub-step S3062: traversing the sub-region according to the preset walking direction to obtain a second local path of the sub-region.
[0124] For example, the ploughing algorithm or other path planning algorithm is used to determine the path of traversing the sub-region according to the preset walking direction as the second local path. It should be noted that different starting points and ending points can be used to plan a plurality of second local paths according to the preset walking direction.
[0125] Sub-step S3063: determining an actual planning direction of the sub-region and a local planning path corresponding to the actual planning direction according to the walking time length of the first local path and the second local path.
[0126] In an available manner, if the walking time length of the second local path is greater than or equal to a first set multiple of the walking time length of the first local path, the recommended planning direction corresponding to the first local path is taken as the actual planning direction, and the first local path is taken as the local planning path corresponding to the actual planning direction.
[0127] For example, the first set multiple can be 1.5 times. If the walking time length of the second local path is 1.5 times of the walking time length of the first local path, it means that the walking time length of the second local path planned by the preset walking direction selected by the user is too long, which has an adverse effect on the mowing efficiency, and therefore, the recommended planning direction can be taken as the actual planning direction.
[0128] On the contrary, if the walking time length of the second local path is not greater than the first set multiple of the walking time length of the first local path, the preset walking direction corresponding to the second local path can be taken as the actual planning direction, and the second local path is taken as the local planning path corresponding to the actual planning direction.
[0129] Step S308: obtaining a moving sequence between the sub-regions.
[0130] The moving sequence between the sub-regions can be determined randomly. For example, if the number of sub-regions is 3, the moving sequence can be “1-2-3”, “2-3-1”, and the like, which will not be enumerated here.
[0131] Step S310: determining a global planning path of the working region according to the local planning path of each sub-region and the moving sequence between the sub-regions.
[0132] In an available manner, step S310 can be implemented by the following process:
[0133] Process A5: constructing a candidate global planning path according to the moving sequence of the sub-regions and the local planning path of the sub-regions.
[0134] For example, one moving sequence of the sub-regions is “1-2-3”. One local planning path is selected from the local planning paths of the sub-regions, and the selected local planning path is spliced according to the above moving sequence to form a candidate global planning path.
[0135] Process B5: calculating the walking time length of the candidate global planning path.
[0136] In the embodiment, the walking duration is determined according to the rated acceleration, the rated speed and the rated angular velocity of the automatic gardening device.
[0137] Process C5: determining whether to update at least one of the moving order of the sub-region and the local planning path of the sub-region according to the walking duration of the candidate global path.
[0138] If the walking duration of the candidate global path is greater than a set value (which can be determined according to the area of the sub-region, for example, if the area is less than or equal to 5 square meters, the set value is 5 minutes, etc.), it indicates that the walking duration of the candidate global path is too long, and the path order or the selected local planning path can be updated to obtain a better candidate global path.
[0139] If the walking duration of the candidate global path is less than or equal to the set value, it can be determined as the final global path, thereby completing the path planning.
[0140] Process D5: if updated, determining a new candidate global planning path according to the update result, and returning to calculate the walking duration of the candidate global path to continue execution until the termination condition is met.
[0141] When updating the candidate global planning path, a new path order or a new local planning path can be determined, or both, to form a new candidate global planning path, and then return to process B5 to continue calculating the walking duration of the new candidate global path until the termination condition is met.
[0142] The termination condition can be that all combinations of path orders and local planning paths are traversed, or that a set number of loops is met.
[0143] In this way, the optimal global planning path can be determined. On the one hand, the user can change and customize the mowing direction, which can solve the damage and destruction of the lawn caused by long-time mowing in a single direction. On the other hand, the best mowing direction can be recommended to the user, which improves the mowing efficiency and enhances the overall use effect.
[0144] Embodiment Four
[0145] Referring to Figure 4 , a structural block diagram of a path planning device of an embodiment of the application is shown.
[0146] The device comprises:
[0147] The first receiving module 402 is configured to receive a preset walking direction of a working area.
[0148] The first division module 404 is configured to divide the working area into a plurality of sub-regions.
[0149] The first determining module 406 is configured to determine an actual planning direction of each of the sub-regions from the preset walking direction and a recommended planning direction of the sub-region, and determine a local planning path corresponding to the sub-region according to the actual planning direction, wherein a path length of the sub-region traversed along the recommended planning direction is the shortest.
[0150] The first obtaining module 408 is configured to obtain a moving sequence between the sub-regions.
[0151] The second determining module 410 is configured to determine a global planning path of the working region according to the local planning paths of the sub-regions and the moving sequence between the sub-regions.
[0152] Optionally, the first determining module 406 is configured to traverse a sub-region according to the recommended planning direction of the sub-region to obtain a first local path of the sub-region; traverse the sub-region according to the preset walking direction to obtain a second local path of the sub-region; and determine the actual planning direction of the sub-region and a local planning path corresponding to the actual planning direction according to path lengths of the first local path and the second local path.
[0153] Optionally, the first determining module 406 is configured to take a direction parallel to each side of the sub-region as a candidate planning direction, traverse the sub-region according to each of the candidate planning directions to obtain a plurality of first local paths, determine a candidate planning direction corresponding to a first local path with the shortest path length of the sub-region as the recommended planning direction, and obtain a first local path corresponding to the recommended planning direction.
[0154] Optionally, the first determining module 406 is configured to, if a path length of the second local path is greater than or equal to a second set multiple of a path length of the first local path, take the recommended planning direction corresponding to the first local path as the actual planning direction, and take the first local path as the local planning path corresponding to the actual planning direction.
[0155] Optionally, the second determining module 410 is configured to construct a candidate global planning path according to the moving sequence between the sub-regions and the local planning paths of the sub-regions, calculate a path length of the candidate global planning path, determine whether to update at least one of the moving sequence between the sub-regions and the local planning paths of the sub-regions according to the path length of the candidate global path, if yes, determine a new candidate global planning path according to an update result, and continue to calculate the path length of the candidate global planning path until a termination condition is met.
[0156] Optionally, the first receiving module 402 is configured to send recommendation information to the display device, so as to instruct the display device to display a recommended planning direction to the user; receive a control instruction in response to the recommendation information, wherein the control instruction carries information of a preset walking direction determined based on a modification operation or a confirmation operation of the user on the recommended planning direction displayed by the display device; and determine the preset walking direction based on the control instruction.
[0157] The device can achieve the effects of the above method, and thus will not be described in detail.
[0158] Embodiment Five
[0159] With reference to Figure 5 FIG. 5 shows a structural block diagram of a path planning device according to Embodiment Five of the present application.
[0160] The device comprises:
[0161] The second receiving module 502 is configured to receive a preset walking direction of a working area.
[0162] The second dividing module 504 is configured to divide the working area into a plurality of sub-areas.
[0163] The third determining module 506 is configured to, for each of the sub-areas, determine an actual planning direction of the sub-area from the preset walking direction and a recommended planning direction of the sub-area, and determine a local planning path corresponding to the sub-area according to the actual planning direction, wherein the walking time length of the sub-area along the recommended planning direction is the shortest.
[0164] The second obtaining module 508 is configured to obtain a moving sequence between the sub-areas.
[0165] The fourth determining module 510 is configured to determine a global planning path of the working area according to the local planning paths of the sub-areas and the moving sequence between the sub-areas.
[0166] Optionally, the third determining module 506 is configured to traverse one of the sub-areas according to the recommended planning direction of the sub-area to obtain a first local path of the sub-area; traverse the sub-area according to the preset walking direction to obtain a second local path of the sub-area; and determine the actual planning direction of the sub-area and the local planning path corresponding to the actual planning direction according to the walking time lengths of the first local path and the second local path.
[0167] Optionally, the third determining module 506 is configured to take a direction parallel to each side of the sub-region as a candidate planning direction, traverse the sub-region according to each candidate planning direction to obtain a plurality of first local paths, and determine a candidate planning direction corresponding to a first local path with the shortest walking duration of the paths traversing the sub-region as the recommended planning direction, and obtain the first local path corresponding to the recommended planning direction.
[0168] Optionally, the third determining module 506 is configured to take the recommended planning direction corresponding to the first local path as the actual planning direction, and take the first local path as the local planning path corresponding to the actual planning direction, if the walking duration of the second local path is greater than or equal to a first set multiple of the walking duration of the first local path.
[0169] Optionally, the fourth determining module 510 is configured to construct a candidate global planning path according to the moving sequence of the sub-region and the local planning path of the sub-region, calculate the walking duration of the candidate global planning path, determine whether to update at least one of the moving sequence of the sub-region and the local planning path of the sub-region according to the walking duration of the candidate global path, and if so, determine a new candidate global planning path according to the update result, and return to the calculation of the walking duration of the candidate global planning path for continuous execution until a termination condition is met.
[0170] The device can achieve the effects corresponding to the above method, and therefore will not be described again.
[0171] Embodiment Six
[0172] In this embodiment, an automatic gardening device is provided, which includes a controller configured to perform the above path planning method.
[0173] Embodiment Seven
[0174] In this embodiment, a computer program product is provided, which includes computer instructions instructing a computing device to perform the above path planning method.
[0175] It should be noted that in the description of the present application, the terms "first" and "second" are only used for the convenience of describing different components or names, and cannot be understood as indicating or implying a sequential relationship, relative importance, or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features.
[0176] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application.
[0177] It should be noted that, although the specific embodiments of the present application are described in detail with reference to the accompanying drawings, it should not be understood as limiting the scope of protection of the present application. Various modifications and variations of the embodiments described in the claims are still within the scope of protection of the present application without creative labor.
[0178] The examples of the embodiments of the present application are intended to simply illustrate the technical features of the embodiments of the present application, so that those skilled in the art can directly understand the technical features of the embodiments of the present application, and are not improper limitations of the embodiments of the present application.
[0179] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A path planning method, characterized in that, include: Receiving a preset walking direction in the work area includes: sending recommendation information to a display device to instruct the display device to show the user a recommended planning direction; receiving a control command in response to the recommendation information, wherein the control command carries information about a preset walking direction determined based on the user's modification or confirmation operation of the recommended planning direction displayed on the display device; and determining the preset walking direction based on the control command. The work area is divided into multiple sub-areas according to the preset walking direction; For each sub-region, the actual planning direction of the sub-region is determined from the preset walking direction and the recommended planning direction of the sub-region, and the local planning path corresponding to the sub-region is determined according to the actual planning direction, wherein the path length of traversing the sub-region along the recommended planning direction is the shortest. Obtain the movement order between the sub-regions; The global planning path of the work area is determined based on the local planning paths of each sub-region and the movement order between the sub-regions.
2. The method according to claim 1, characterized in that, For each sub-region, the actual planning direction of the sub-region is determined from the preset walking direction and the recommended planning direction of the sub-region, and the local planning path corresponding to the sub-region is determined based on the actual planning direction, including: Traverse a sub-region according to the recommended planning direction of the sub-region to obtain the first local path of the sub-region; The sub-region is traversed according to the preset walking direction to obtain the second local path of the sub-region; Based on the path lengths of the first local path and the second local path, the actual planning direction of the sub-region and the local planning path corresponding to the actual planning direction are determined.
3. The method according to claim 2, characterized in that, The step of traversing a sub-region according to the recommended planning direction of the sub-region to obtain the first local path of the sub-region includes: Using directions parallel to the edges of the sub-region as candidate planning directions, the sub-region is traversed according to each candidate planning direction to obtain multiple first local paths; The candidate planning direction corresponding to the first local path with the shortest path length traversing the sub-region is determined as the recommended planning direction, and the first local path corresponding to the recommended planning direction is obtained.
4. The method according to claim 2, characterized in that, The step of determining the actual planning direction of the sub-region and the local planning path corresponding to the actual planning direction based on the path lengths of the first local path and the second local path includes: If the path length of the second local path is greater than or equal to the path length of the first local path by a second set multiple, then the recommended planning direction corresponding to the first local path is taken as the actual planning direction, and the first local path is taken as the local planning path corresponding to the actual planning direction.
5. The method according to claim 1, characterized in that, The step of determining the global planning path of the work area based on the local planning paths of each sub-region and the movement order between the sub-regions includes: Construct candidate global planning paths based on the movement order of the sub-regions and the local planning paths of the sub-regions; Calculate the path length of the candidate global planning path; Based on the path length of the candidate global planning path, determine whether to update at least one of the movement order of the sub-region and the local planning path of the sub-region. If updated, determine a new candidate global planning path based on the update result, and return to calculate the path length of the candidate global planning path to continue execution until the termination condition is met.
6. A path planning method, characterized in that, include: Receiving a preset walking direction in the work area includes: sending recommendation information to a display device to instruct the display device to show the user a recommended planning direction; receiving a control command in response to the recommendation information, wherein the control command carries information about a preset walking direction determined based on the user's modification or confirmation operation of the recommended planning direction displayed on the display device; and determining the preset walking direction based on the control command. The work area is divided into multiple sub-areas according to the preset walking direction; For each sub-region, the actual planning direction of the sub-region is determined from the preset walking direction and the recommended planning direction of the sub-region, and the local planning path corresponding to the sub-region is determined according to the actual planning direction, wherein the walking time of traversing the sub-region along the recommended planning direction is the shortest. Obtain the movement order between the sub-regions; The global planning path of the work area is determined based on the local planning paths of each sub-region and the movement order between the sub-regions.
7. The method according to claim 6, characterized in that, For each of the sub-regions, determining the actual planning direction of the sub-region from the preset walking direction and the recommended planning direction of the sub-region, and determining the corresponding local planning path of the sub-region based on the actual planning direction, includes: Traverse a sub-region according to the recommended planning direction of the sub-region to obtain the first local path of the sub-region; The sub-region is traversed according to the preset walking direction to obtain the second local path of the sub-region; Based on the travel time of the first local path and the second local path, the actual planned direction of the sub-region and the local planned path corresponding to the actual planned direction are determined.
8. The method according to claim 7, characterized in that, The step of traversing a sub-region according to the recommended planning direction of the sub-region to obtain the first local path of the sub-region includes: Using directions parallel to the edges of the sub-region as candidate planning directions, the sub-region is traversed according to each candidate planning direction to obtain multiple first local paths; The candidate planning direction corresponding to the first local path with the shortest travel time for traversing the sub-region is determined as the recommended planning direction, and the first local path corresponding to the recommended planning direction is obtained.
9. The method according to claim 7, characterized in that, The step of determining the actual planned direction of the sub-region and the corresponding local planned path based on the walking time of the first local path and the second local path includes: If the walking time of the second local path is greater than or equal to the walking time of the first local path by a first set multiple, then the recommended planning direction corresponding to the first local path is taken as the actual planning direction, and the first local path is taken as the local planning path corresponding to the actual planning direction.
10. The method according to claim 6, characterized in that, The step of determining the global planning path of the work area based on the local planning paths of each sub-region and the movement order between the sub-regions includes: Construct candidate global planning paths based on the movement order of the sub-regions and the local planning paths of the sub-regions; Calculate the travel time of the candidate global planning path; Based on the travel time of the candidate global planning path, determine whether to update at least one of the movement order of the sub-region and the local planning path of the sub-region; If an update is performed, a new candidate global planning path is determined based on the update result, and the process returns to calculate the travel time of the candidate global planning path and continue execution until the termination condition is met.
11. A path planning device, characterized in that, include: The first receiving module is used to receive the preset walking direction of the work area; The first division module is used to divide the work area into multiple sub-areas according to the preset walking direction; The first determining module is used to determine the actual planning direction of each sub-region from the preset walking direction and the recommended planning direction of the sub-region, and to determine the local planning path corresponding to the sub-region based on the actual planning direction, wherein the path length for traversing the sub-region along the recommended planning direction is the shortest. The first acquisition module is used to acquire the movement order between the sub-regions; The second determining module is used to determine the global planning path of the working area based on the local planning paths of each sub-region and the movement order between the sub-regions; Specifically, the first receiving module is configured to: display device sending recommendation information to instruct the display device to show the user a recommended planning direction; receive a control command in response to the recommendation information, the control command carrying information of a preset walking direction determined based on the user's modification or confirmation operation of the recommended planning direction displayed on the display device; and determine the preset walking direction based on the control command.
12. A path planning device, characterized in that, include: The second receiving module is used to receive the preset walking direction of the work area; The second division module is used to divide the work area into multiple sub-areas according to the preset walking direction; The third determining module is used to determine the actual planning direction of the sub-region from the preset walking direction and the recommended planning direction of the sub-region for each sub-region, and to determine the local planning path corresponding to the sub-region according to the actual planning direction, wherein the walking time of traversing the sub-region along the recommended planning direction is the shortest. The second acquisition module is used to acquire the movement order between the sub-regions; The fourth determining module is used to determine the global planning path of the working area based on the local planning paths of each sub-region and the movement order between the sub-regions; Specifically, the second receiving module is used to display the device sending recommendation information to instruct the device to show the user a recommended planning direction; receive a control command in response to the recommendation information, the control command carrying information about a preset walking direction determined based on the user's modification or confirmation operation of the recommended planning direction displayed on the device; and determine the preset walking direction based on the control command.
13. An automatic gardening device, characterized in that, Includes a controller for performing the method of any one of claims 1-5 or any one of claims 6-10.
14. A computer program product comprising computer instructions that instruct a computing device to perform the method as claimed in any one of claims 1-5 or any one of claims 6-10.
Citation Information
Patent Citations
Method and System for Determining a Planned Path of a Vehicle
EP2446725A1