Path planning method and device, self-moving device and storage medium
By acquiring elevation data, fitting a plane, and calculating the normal vector to generate a planned path, the problem of slippage of self-moving equipment on ground with varying slopes was solved, thus improving the equipment's working efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ECOFLOW INC
- Filing Date
- 2023-03-21
- Publication Date
- 2026-07-10
AI Technical Summary
When self-propelled mobile devices are in motion, especially on surfaces with varying slopes, improper path planning can lead to frequent slippage, reducing work efficiency.
By acquiring elevation data of the work area, fitting a plane and calculating the normal vector, the slope and principal orientation angle are determined, and a planned path is generated to reduce slippage.
It effectively reduces slippage of self-moving equipment in areas with varying slopes, thus improving the equipment's working efficiency.
Smart Images

Figure CN116465407B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of self-moving device technology, specifically to a path planning method, apparatus, self-moving device, and storage medium. Background Technology
[0002] During operation, automated mobile devices can follow pre-planned paths. However, if the device encounters a slope, it may travel in a direction perpendicular to the slope, leading to frequent slippage. Therefore, for terrains with varying slopes, inadequate path planning can further exacerbate slippage, hindering movement and reducing the device's efficiency. Summary of the Invention
[0003] One objective of this application is to provide a path planning method, apparatus, self-moving device, and storage medium, which aims to solve the technical problem that current path planning methods are prone to frequent slippage.
[0004] According to one aspect of the embodiments of this application, a path planning method is provided, the method comprising:
[0005] Obtain elevation data for the work area;
[0006] The elevation data is fitted to obtain a fitted plane;
[0007] Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane;
[0008] Based on the first normal vector and the second normal vector, the slope and principal direction angle of the fitting plane are determined; the principal direction angle is the direction angle of the fitting plane on the projection plane.
[0009] If the slope is greater than the slope threshold, then the planned path of the fitted plane is generated based on the principal direction angle.
[0010] According to one aspect of the embodiments of this application, a path planning apparatus is provided, the apparatus comprising:
[0011] The first acquisition module is used to acquire elevation data of the working area;
[0012] The fitting module is used to fit the elevation data to obtain a fitting plane;
[0013] The second acquisition module is used to acquire the first normal vector of the ground plane and the second normal vector of the fitted plane;
[0014] The determining module is used to determine the slope and principal direction angle of the fitting plane based on the first normal vector and the second normal vector; the principal direction angle is the direction angle of the fitting plane on the projection plane;
[0015] The generation module is used to generate a planned path for the fitted plane based on the principal direction angle if the slope is greater than the slope threshold.
[0016] According to one aspect of the embodiments of this application, a self-moving device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the self-moving device to implement the methods provided in the various optional implementations described above.
[0017] According to one aspect of the embodiments of this application, a computer program medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the methods provided in the various optional implementations described above.
[0018] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.
[0019] In the technical solution provided in the embodiments of this application, the elevation data of the working area is obtained, the elevation data is fitted to obtain the fitted plane, the first normal vector of the ground plane and the second normal vector of the fitted plane are obtained, and the slope and principal direction angle of the fitted plane are determined according to the first normal vector and the second normal vector. The principal direction angle is the direction angle of the fitted plane on the projection plane. If the slope is greater than the slope threshold, the planned path of the fitted plane is generated according to the principal direction angle. The fitting plane is obtained by fitting elevation data. There may be multiple fitting planes in the same working area. The slope and principal orientation angle of the fitting plane are determined by the first normal vector of the ground plane and the second normal vector of the fitting plane. The slope reflects the steepness of the fitting plane, while the principal orientation angle reflects the direction of the fitting plane relative to its projection plane. If the slope is greater than the slope threshold, it indicates that the working area is relatively steep, which poses a risk of slippage when working in the area. At this time, the planned path of the fitting plane is generated according to the principal orientation angle. Since the planned path is based on the direction of the working area on its projection plane, the self-moving device moves along the planned path parallel to the direction in the fitting plane with uniform terrain height distribution, thereby reducing the problem of frequent slippage in the working area and improving the working efficiency of the self-moving device.
[0020] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0021] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0022] The above and other objectives, features and advantages of this application will become more apparent from a detailed description of exemplary embodiments thereof with reference to the accompanying drawings.
[0023] Figure 1 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0024] Figure 2 A schematic diagram of a fitting plane in a working area according to an embodiment of this application is shown.
[0025] Figure 3 A schematic diagram of a planned path in a fitted plane according to an embodiment of this application is shown.
[0026] Figure 4 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0027] Figure 5 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0028] Figure 6 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0029] Figure 7 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0030] Figure 8 A schematic diagram of path planning for multiple fitted planes according to one embodiment of this application is shown.
[0031] Figure 9 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0032] Figure 10 A schematic diagram of a planned path generated according to the longest edge of the fitted plane according to one embodiment of this application is shown.
[0033] Figure 11 A flowchart illustrating a path planning method according to an embodiment of this application is shown.
[0034] Figure 12A schematic diagram of the structure of a path planning device according to an embodiment of this application is shown.
[0035] Figure 13 A schematic diagram of the structure of a self-moving device according to an embodiment of this application is shown. Detailed Implementation
[0036] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided to make the description of this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The drawings are merely illustrative of this application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0037] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more exemplary embodiments. Numerous specific details are provided in the following description to give a full understanding of exemplary embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced with one or more specific details omitted, or other methods, components, steps, etc., can be employed. In other instances, well-known structures, methods, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0038] Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0039] When the self-moving device moves within a work area, its direction of movement may be perpendicular to the slope or deviate from it at a certain angle. If the slope of the work area is uneven and it is inclined relative to the ground, the rollers of the self-moving device will experience a downward force due to gravity. Because the work area is inclined, the device will also experience a downward force due to gravity. If the friction between the rollers and the work area is insufficient to counteract this downward force, the device will tend to move downwards, resulting in slippage. If the path planning is inadequate, and the self-moving device frequently moves in the same manner, it will frequently slip, hindering its movement and reducing its efficiency. To address this technical problem, the following embodiments illustrate the technical solution of this application.
[0040] Figure 1 A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0041] Step S110: Obtain elevation data of the working area.
[0042] In this embodiment, the executing entity can be a self-moving device. The self-moving device can be a device that includes self-movement assistance functionality. This self-movement assistance functionality can be implemented via an in-vehicle terminal, and the corresponding self-moving device can be a vehicle equipped with that in-vehicle terminal. The self-moving device can also be a semi-self-moving device or a fully autonomous device. For example, a self-moving device can be a lawnmower, a sweeper, or a robot with navigation capabilities.
[0043] The work area refers to the area where the self-moving device performs its work tasks. Elevation data is data used to describe the ground terrain features of the work area, generally referring to the height of a point relative to a reference surface. For example, when the reference surface is sea level, the elevation data could describe the altitude of a point.
[0044] In one embodiment, the elevation data can be historical elevation data, which is data collected by the mobile device from various locations it passes through during its historical operation.
[0045] In one embodiment, if elevation data for a missing working area is detected in historical elevation data, the mobile device is controlled to move to the working area with the missing elevation data to collect elevation data, thereby obtaining elevation data for the entire working area.
[0046] In this embodiment of the application, the working area can be divided into multiple local areas. Elevation data can be obtained by using a self-moving device during the working process in each local area. Then, global elevation data can be obtained by stitching together the elevation data of multiple local areas.
[0047] Step S120: Fit the elevation data to obtain the fitted plane.
[0048] In one embodiment, if the terrain is uniformly distributed across the working area of the self-moving device, and all points within the working area are on the same plane, then the number of fitted planes obtained is one.
[0049] In one embodiment, if the terrain distribution is uneven across the working area of the self-moving device, and the working area contains points located on multiple different planes, then the number of fitted planes obtained by fitting is multiple.
[0050] In one embodiment, fitting the elevation data to obtain a fitting plane includes: performing a fitting process on all point clouds of the elevation data to obtain the fitting plane. The fitting process can employ fitting algorithms such as least squares or random sample consensus. This method can quickly obtain the fitting plane.
[0051] Step S130: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0052] In one embodiment, a plane equation of the ground plane can be established, a first normal vector can be calculated based on the plane equation of the ground plane, a plane equation of the fitted plane can be established, and a second normal vector can be calculated based on the plane equation of the fitted plane.
[0053] In one embodiment, if multiple fitting planes are detected, a second normal vector corresponding to each fitting plane is obtained.
[0054] Step S140: Determine the slope and principal direction angle of the fitted plane based on the first normal vector and the second normal vector.
[0055] Slope describes the degree of inclination of the fitted plane relative to the ground plane. Principal orientation angle is the orientation angle of the fitted plane on the projection plane.
[0056] In one embodiment, the slope is the angle between the fitted plane and the ground plane.
[0057] In one embodiment, the slope is the ratio of the vertical height to the horizontal width of the fitted plane.
[0058] like Figure 2 As shown, Figure 2 A schematic diagram of a fitting plane in a working area according to an embodiment of this application is shown. The working area includes a ground plane, a fitting plane corresponding to the working area, and a projection surface of the fitting plane onto the ground plane. The fitting plane and the ground plane have a non-zero angle between them. A first normal vector a is perpendicular to the ground plane, and a second normal vector b is perpendicular to the fitting plane, with a slope of θ and a principal direction angle of α. The principal direction angle describes the offset direction of the fitting plane relative to a reference direction, and the direction of the fitting plane can be represented by the slope direction of the fitting plane. If along... Figure 2 The reference direction shown is used as the reference direction, and the slope direction in the fitted plane is projected onto the ground plane. The angle between the projection of the slope direction and the reference direction can be used as the principal direction angle. Furthermore, if the perpendicular direction of the reference direction is used as the new reference direction, the angle between the projection of the slope direction and the reference direction can be used as the principal direction angle.
[0059] Step S150: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0060] In one embodiment, the slope threshold can be a slope value that affects the slippage of the self-moving device on a slope. If the work area has a large inclination relative to the ground, it indicates that the work area is a slope with a large inclination, and the self-moving device may slip when moving on this slope.
[0061] In one embodiment, generating a planned path for the fitting plane based on the principal direction angle includes: determining a principal direction based on the principal direction angle, using the principal direction as the path extension direction for path planning, and generating a planned path in the fitting plane corresponding to the working area according to the path extension direction.
[0062] In one embodiment, if multiple fitting planes are detected in the working area, a planned path for each fitting plane is generated based on the principal direction angle corresponding to each fitting plane.
[0063] In one embodiment, after generating a fitted planar path based on the principal orientation angle, the method further includes controlling the self-moving device to move within the working area according to the planned path.
[0064] In one embodiment, a planned path within a fitting plane is as follows: Figure 3 As shown, the planned path can include multiple parallel paths, for example, multiple paths forming an "arch" shape, where the longer side is the main movement path of the mobile device, and the shorter side is the movement path for the mobile device to turn to the next path. According to... Figure 3 During the planned path movement, the self-moving device moves along the slope direction. The downward force component generated by gravity acts on the self-moving device along the slope direction. Since the self-moving device is moving along the slope direction at this time, this force will not cause the self-moving device to deviate from the slope direction. The rollers will not deviate from the slope direction, thereby reducing the phenomenon of slippage and effectively reducing the number of times the self-moving device slips.
[0065] Using the above method, the slope and principal orientation angle of the fitted plane are determined by the first normal vector of the ground plane and the second normal vector of the fitted plane. The slope reflects the steepness of the plane where the working area is located, while the principal orientation angle reflects the direction of the working area relative to its projection plane. If the slope is greater than the slope threshold, it indicates that the working area is relatively steep, which poses a risk of slippage when working in the area. At this time, a planned path for the fitted plane is generated based on the principal orientation angle. Since the planned path is based on the direction of the working area on its projection plane, the self-moving device moves along the planned path parallel to that direction in the fitted plane, thereby reducing slippage and improving the working efficiency of the self-moving device.
[0066] Figure 4A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0067] Step S210: Obtain elevation data of the working area.
[0068] Step S220: Fit the elevation data to obtain the fitted plane.
[0069] Step S230: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0070] Step S240: Perform a cross product of the first normal vector and the second normal vector to obtain the first direction vector.
[0071] The plane formed by the first normal vector and the second normal vector is perpendicular to the first direction vector.
[0072] Step S250: Perform a cross product of the first direction vector and the second normal vector to obtain the second direction vector.
[0073] In one embodiment, the first normal vector is (0, 0, 1), and the second normal vector is represented by the coefficients of the plane equation of the fitted plane, denoted as (A, B, C). The first direction vector (E, F, G) is obtained by performing a cross product of the second and first normal vectors, i.e., (A, B, C) × (0, 0, 1) = (E, F, G). The second direction vector (M, N, P) is then obtained by performing a cross product of the first direction vector and the second normal vector, i.e., (E, F, G) × (A, B, C) = (M, N, P).
[0074] The second direction vector points in the direction along the slope.
[0075] Step S260: Based on the second direction vector and the preset inverse trigonometric function, the slope and principal direction angle of the fitted plane are obtained.
[0076] The principal orientation angle is the orientation angle of the fitted plane on the projection plane.
[0077] Step S270: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0078] Using the above method, combined with the preset inverse trigonometric function, the slope and main direction angle can be calculated, thereby obtaining the degree of inclination of the working area and the direction of the slope. This method can quickly calculate the slope and main direction angle; and the second direction vector is used to indicate the direction of the slope. When the slope of the working area is large, a planned path is generated along the slope angle, which can reduce the number of times the self-moving device slips when working in the working area.
[0079] Figure 5A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0080] Step S310: Obtain the elevation data of the working area.
[0081] Step S320: Fit the elevation data to obtain the fitted plane.
[0082] Step S330: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0083] Step S340: Perform a cross product of the first normal vector and the second normal vector to obtain the first direction vector.
[0084] Step S350: Perform a cross product of the first direction vector and the second normal vector to obtain the second direction vector.
[0085] Step S360: Obtain the three-dimensional coordinates of the second direction vector.
[0086] Step S370: Calculate the slope of the fitted plane based on the three-dimensional coordinates and the first inverse trigonometric function.
[0087] In one embodiment, the three-dimensional coordinates are (M, N, P), and the first inverse trigonometric function is the first arctangent function, which is: Where θ represents the slope.
[0088] In one embodiment, the first inverse trigonometric function may also be a first arcsine function or a first inverse cosine function.
[0089] Step S380: Calculate the principal direction angle based on the three-dimensional coordinates and the second inverse trigonometric function.
[0090] The principal orientation angle is the orientation angle of the fitted plane on the projection plane.
[0091] In one embodiment, the second inverse trigonometric function is a second arctangent function, which is: Among them, α is the principal direction angle.
[0092] In one embodiment, the second inverse trigonometric function may be a second arcsine function or a second inverse cosine function.
[0093] Step S390: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0094] Using the above method, the slope and principal direction angle can be accurately determined, thereby accurately judging whether the slope is too large and obtaining an accurate principal direction angle, so that the planned path extends in the direction that conforms to the slope as much as possible, and the number of slippages can be minimized.
[0095] Figure 6 A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0096] Step S410: Obtain elevation data of the working area; the elevation data includes point cloud data of multiple ground elevations.
[0097] Step S420: Segment the multiple point cloud data to obtain multiple point cloud sets.
[0098] Step S430: Fit each point cloud separately to obtain multiple fitting planes where the working area is located.
[0099] In one embodiment, during the fitting process for each point cloud set, the point cloud sets are fitted sequentially according to the fitting order. If the point cloud set fitted earlier is completed, the point cloud set fitted later is fitted, and so on, until all point cloud sets are fitted, resulting in multiple fitting planes. There may be no overlapping point clouds between the point cloud sets to improve fitting efficiency.
[0100] Step S440: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0101] Step S450: Determine the slope and principal direction angle of the fitted plane based on the first normal vector and the second normal vector.
[0102] The principal orientation angle is the orientation angle of the fitted plane on the projection plane. Each fitted plane has a corresponding slope and principal orientation angle.
[0103] Step S460: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0104] The planned path for each fitted plane is generated based on the slope and principal orientation angle corresponding to that fitted plane.
[0105] Using the above method, multiple fitting planes of the working area can be accurately fitted. The corresponding slope and principal direction angle are determined for each fitting plane, and a path plan corresponding to each fitting plane is generated. Thus, path plans adapted to different fitting planes can be generated in the same working area. The path plan obtained for each fitting plane is consistent with the slope direction of the fitting plane, which further reduces the number of slippages when moving in the working area and improves the working efficiency of the self-moving device.
[0106] Figure 7 A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0107] Step S510: Obtain elevation data of the working area; the elevation data includes point cloud data of multiple ground elevations.
[0108] Step S520: Segment the multiple point cloud data to obtain multiple point cloud sets.
[0109] Step S530: Fit each point cloud separately to obtain multiple fitting planes where the working area is located.
[0110] Step S540: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0111] Step S450: Determine the slope and principal direction angle of the fitted plane based on the first normal vector and the second normal vector.
[0112] The principal orientation angle is the orientation angle of the fitted plane on the projection plane.
[0113] Step S560: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0114] Step S570: Extract the starting point and ending point of the planned paths in the fitted plane.
[0115] Each of the multiple fitted planes has a corresponding planned path. The starting point of the planned path is the initial position of the self-moving device when moving within the working area corresponding to that fitted plane. The ending point of the planned path is the final position of the self-moving device when moving within the working area corresponding to that fitted plane.
[0116] Step S580: Connect the path endpoints and path start points of two adjacent fitted planes to obtain the intermediate path.
[0117] When multiple fitting planes exist, the slope and principal orientation angle differ between them, causing discontinuous path planning between them. To prevent this path planning interruption and resulting in an uncoordinated movement path for the mobile device, this embodiment connects the starting and ending points of paths between adjacent fitting planes. Specifically, the ending point of the path that precedes the starting point connects to the starting point of the path that precedes it. The mobile device moves from the starting point to the ending point.
[0118] like Figure 8 As shown, Figure 8A schematic diagram of path planning for multiple fitting planes according to an embodiment of this application is shown. The diagram includes a first fitting plane and a second fitting plane, where the principal direction angles corresponding to the planned paths in the first and second fitting planes are different. The endpoint of the first fitting plane is marked as (A1, B1, C1), while the principal direction angle corresponding to the planned paths in the second fitting plane is α2, and the starting point of the second fitting plane is marked as (A2, B2, C2). The intermediate path is the path connecting (A1, B1, C1) and (A2, B2, C2). When the self-moving device moves, it first moves within the first fitting plane in the direction corresponding to the principal direction angle α1 until it reaches (A1, B1, C1), and then moves through the intermediate path to (A2, B2, C2), thereby ensuring the continuity of movement when multiple fitting planes exist in the working area.
[0119] Step S590: Generate a global planning path for the working area based on the intermediate path and the planning path corresponding to each fitted plane.
[0120] The global planning path includes the intermediate path and the planning path corresponding to each fitted plane.
[0121] By adopting the above method, the self-moving device can move continuously between the working areas corresponding to multiple fitting planes, avoiding interruption of the movement path and ensuring the integrity of the path planning when multiple fitting planes exist.
[0122] Figure 9 A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0123] Step S610: Obtain elevation data of the working area.
[0124] Step S620: Fit the elevation data to obtain the fitted plane.
[0125] Step S630: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0126] Step S640: Determine the slope and principal direction angle of the fitted plane based on the first normal vector and the second normal vector.
[0127] The principal orientation angle is the orientation angle of the fitted plane on the projection plane.
[0128] Step S650: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0129] Step S660: If the slope is less than or equal to the slope threshold, determine the longest side corresponding to the fitted plane.
[0130] If the slope is less than or equal to the slope threshold, it indicates that the inclination of the working area is relatively small. In this case, even if the path is perpendicular to the slope direction, it will not cause the self-moving device to slip frequently. In order to improve the efficiency of moving in this working area, the longest side of the fitting plane is determined.
[0131] Step S670: Determine the direction of the longest side as the new principal direction angle.
[0132] Step S680: Generate the planning path for the work area based on the new principal orientation angle.
[0133] like Figure 10 As shown, Figure 10 A schematic diagram of a planned path generated according to an embodiment of this application based on the longest side of the fitted plane is shown. The direction of the longest side is perpendicular to the slope direction, resulting in fewer U-turns in the planned path. Although not along the slope direction, the slope is relatively gentle, minimizing frequent slippage.
[0134] Using the above method, when the slope of the work area is relatively small, a new principal direction angle is determined based on the longest side of the fitted plane. The path planning for the work area is then generated based on the new principal direction angle. This reduces the number of U-turns when moving along the planned path, thereby improving work efficiency. Furthermore, the relatively small slope avoids frequent slippage.
[0135] Figure 11 A flowchart illustrating a path planning method according to an embodiment of this application is shown. The method includes:
[0136] Step S710: Obtain the altitude information recorded by the self-moving device while it is moving within the working area.
[0137] In one embodiment, the self-moving device may collect height information during the mapping phase, or during the first execution of a task, or it may collect height information in response to remote control commands from an operator.
[0138] Step S720: Generate point cloud data based on the height information.
[0139] Step S730: Generate elevation data based on point cloud data.
[0140] Step S740: Fit the elevation data to obtain the fitted plane.
[0141] Step S750: Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane.
[0142] Step S760: Determine the slope and principal direction angle of the fitted plane based on the first normal vector and the second normal vector.
[0143] The principal orientation angle is the orientation angle of the fitted plane on the projection plane.
[0144] Step S770: If the slope is greater than the slope threshold, then generate a planned path for the fitted plane based on the principal direction angle.
[0145] Using the above method, point cloud data is generated by combining the altitude information recorded during movement within the work area, and elevation data is generated based on the point cloud data. This elevation data can describe the terrain within the work area. By directly collecting altitude information through the self-moving device, the generated elevation data can also reflect the impact of the terrain elevation of the work area on the self-moving device. Compared with the problem of poor data accuracy when using aerial imagery to generate elevation data, this embodiment can improve the accuracy of elevation data by collecting it through the self-moving device, thereby further improving the accuracy of path planning.
[0146] Figure 12 A schematic diagram of a path planning device 80 according to an embodiment of this application is shown. The device includes:
[0147] The first acquisition module 810 is used to acquire elevation data of the working area;
[0148] The fitting module 820 is used to fit the elevation data to obtain the fitting plane;
[0149] The second acquisition module 830 is used to acquire the first normal vector of the ground plane and the second normal vector of the fitted plane;
[0150] The determination module 840 is used to determine the slope and principal direction angle of the fitting plane based on the first normal vector and the second normal vector; the principal direction angle is the direction angle of the fitting plane on the projection plane.
[0151] The generation module 850 is used to generate a planned path for the fitted plane based on the principal direction angle if the slope is greater than the slope threshold.
[0152] Using the above method, when the slope of the working area is relatively high, the planned path is generated by combining the main direction angle that can reflect the slope direction, thereby reducing the possibility of slippage.
[0153] In one exemplary embodiment of this application, the determining module 840 is configured as follows:
[0154] The first direction vector is obtained by performing a cross product of the first normal vector and the second normal vector.
[0155] The second direction vector is obtained by performing a cross product of the first direction vector and the second normal vector.
[0156] Based on the second direction vector and the preset inverse trigonometric function, the slope and principal direction angle of the fitted plane are obtained.
[0157] Using the above method, combined with the preset inverse trigonometric function, the slope and main direction angle can be calculated, thereby obtaining the degree of inclination of the working area and the direction of the slope. This method can quickly calculate the slope and main direction angle; and the second direction vector is used to indicate the direction of the slope. When the slope of the working area is large, a planned path is generated along the slope angle, which can reduce the number of times the self-moving device slips when working in the working area.
[0158] In one exemplary embodiment of this application, the determining module 840 is configured as follows:
[0159] Obtain the three-dimensional coordinates of the second direction vector;
[0160] Calculate the slope of the fitted plane based on the three-dimensional coordinates and the first inverse trigonometric function;
[0161] Calculate the principal direction angle based on the three-dimensional coordinates and the second inverse trigonometric function.
[0162] Using the above method, the slope and principal direction angle can be accurately calculated.
[0163] In one exemplary embodiment of this application, the fitting module 820 is configured as follows:
[0164] Multiple point cloud datasets are segmented to obtain multiple point cloud sets;
[0165] Each point cloud is fitted separately to obtain multiple fitting planes containing the working area.
[0166] Using the above method, multiple fitting planes of the working area can be more accurately divided, thereby generating corresponding planning paths for multiple fitting planes. This can adapt to planes with different slopes within the same working area, further reducing the number of slippages.
[0167] In one exemplary embodiment of this application, the device is configured as follows:
[0168] Extract the starting and ending points of the planned paths within the fitted planes respectively;
[0169] Connect the endpoints of two adjacent fitted planes with their starting points to obtain the intermediate path;
[0170] Based on the intermediate paths and the planning paths corresponding to each fitted plane, a global planning path for the working area is generated.
[0171] By adopting the above method, when there are multiple planned paths in the work area, the self-moving device can move continuously in the work area by combining the intermediate paths, thereby improving the continuity and efficiency of the work.
[0172] In one exemplary embodiment of this application, the device is configured as follows:
[0173] If the slope is less than or equal to the slope threshold, determine the longest side corresponding to the fitted plane;
[0174] The direction of the longest side is determined as the new principal direction angle;
[0175] The planning path for the work area is generated based on the new primary direction angle.
[0176] By adopting the above method, the number of times the self-moving device turns around when moving within the work area can be reduced, thereby improving the working efficiency of the self-moving device.
[0177] In an exemplary embodiment of this application, the first acquisition module 810 is configured as follows:
[0178] Acquire altitude information recorded by the mobile device while it is moving within the work area;
[0179] Point cloud data is generated based on the altitude information;
[0180] Elevation data is generated based on point cloud data.
[0181] By adopting the above methods, the accuracy of elevation data can be improved, thereby further improving the accuracy of path planning.
[0182] The following is for reference. Figure 13 To describe the self-moving device 90 according to an embodiment of this application. Figure 13 The self-moving device 90 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0183] like Figure 13 As shown, the self-moving device 90 is manifested in the form of a general-purpose computing device. The components of the self-moving device 90 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including storage unit 920 and processing unit 910).
[0184] The storage unit stores program code, which can be executed by the processing unit 910, causing the processing unit 910 to perform the steps described in the explanatory section of the exemplary methods described above, according to various exemplary embodiments of this application. For example, the processing unit 910 can perform, as follows: Figure 1 The steps shown are as follows.
[0185] Storage unit 920 may include readable media in the form of volatile storage units, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203.
[0186] Storage unit 920 may also include a program / utility 9204 having a set (at least one) program module 9205, such program module 9205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0187] Bus 930 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0188] The self-moving device 90 can also communicate with one or more external devices 1000 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the self-moving device 90, and / or any device that enables the self-moving device 90 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via an input / output (I / O) interface 950, which is connected to a display unit 940. Furthermore, the self-moving device 90 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the self-moving device 90 via a bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the self-moving device 90, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0189] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a self-moving device (such as a sweeper, lawnmower, or other device with self-moving assistance functions) to execute the method according to the embodiments of this application.
[0190] In an exemplary embodiment of this application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the methods described in the above method embodiments.
[0191] According to one embodiment of this application, a program product for implementing the methods in the above-described method embodiments is also provided. This program product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of this application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0192] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0193] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0194] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0195] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0196] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0197] Furthermore, although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0198] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a self-moving device (such as a sweeper, lawnmower, or other device with self-moving assistance functions) to execute the method according to the embodiments of this application.
[0199] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the appended claims.
Claims
1. A path planning method, characterized in that, The method includes: Obtain elevation data for the work area; The elevation data is fitted to obtain a fitted plane; Obtain the first normal vector of the ground plane and the second normal vector of the fitted plane; The first direction vector is obtained by performing a cross product of the first normal vector and the second normal vector. The cross product of the first direction vector and the second normal vector is used to obtain the second direction vector. Obtain the three-dimensional coordinates of the second direction vector; Calculate the slope of the fitted plane based on the three-dimensional coordinates and the first inverse trigonometric function; Calculate the principal orientation angle of the fitting plane based on the three-dimensional coordinates and the second inverse trigonometric function; the principal orientation angle is the orientation angle of the fitting plane on the projection plane. If the slope is greater than the slope threshold, then the planned path of the fitted plane is generated based on the principal direction angle; If the slope is less than or equal to the slope threshold, then the longest side corresponding to the fitted plane is determined; the direction of the longest side is determined as the new principal direction angle; and the planned path of the working area is generated based on the new principal direction angle.
2. The path planning method according to claim 1, characterized in that, The elevation data includes point cloud data of multiple ground elevations. The process of fitting the elevation data to obtain a fitting plane includes: The point cloud data is segmented to obtain multiple point cloud sets; Each of the point clouds is fitted to obtain multiple fitting planes containing the working region.
3. The path planning method according to claim 2, characterized in that, After generating the planned path of the fitting plane based on the principal direction angle, the method further includes: Extract the starting point and ending point of the planned path within the fitting plane of each of the multiple paths. Connect the endpoints and start points of two adjacent fitted planes to obtain an intermediate path; A global planning path for the working area is generated based on the intermediate path and the planning path corresponding to each fitted plane.
4. The path planning method according to claim 1, characterized in that, The step of obtaining the elevation data of the working area includes: Acquire altitude information recorded by the mobile device while it is moving within the work area; Point cloud data is generated based on the height information; The elevation data is generated based on the point cloud data.
5. A path planning device, characterized in that, The path planning device includes: The first acquisition module is used to acquire elevation data of the working area; The fitting module is used to fit the elevation data to obtain a fitting plane; The second acquisition module is used to acquire the first normal vector of the ground plane and the second normal vector of the fitted plane; The determination module is used to perform a cross product of the first normal vector and the second normal vector to obtain a first direction vector; perform a cross product of the first direction vector and the second normal vector to obtain a second direction vector; obtain the three-dimensional coordinates of the second direction vector; calculate the slope of the fitting plane based on the three-dimensional coordinates and a first inverse trigonometric function; and calculate the principal direction angle of the fitting plane based on the three-dimensional coordinates and a second inverse trigonometric function; the principal direction angle is the direction angle of the fitting plane on the projection plane. The generation module is used to generate a planned path for the fitting plane based on the principal direction angle if the slope is greater than a slope threshold; determine the longest side corresponding to the fitting plane if the slope is less than or equal to the slope threshold; determine the direction of the longest side as a new principal direction angle; and generate the planned path for the working area based on the new principal direction angle.
6. A self-moving device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the self-moving device to perform the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform the method of any one of claims 1 to 4.