Ramp detection method, self-moving device, and storage medium

By generating height maps and using fitting algorithms to identify slope areas, self-moving equipment can adjust its working direction, solving the landslide problem when working on slopes and ensuring work efficiency and effectiveness.

WO2026114014A1PCT designated stage Publication Date: 2026-06-04JIANGSU DONGCHENG M&E TOOLS CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
JIANGSU DONGCHENG M&E TOOLS CO LTD
Filing Date
2025-11-18
Publication Date
2026-06-04

Smart Images

  • Figure CN2025135624_04062026_PF_FP_ABST
    Figure CN2025135624_04062026_PF_FP_ABST
Patent Text Reader

Abstract

A ramp detection method, a self-moving device (10), and a storage medium. The ramp detection method comprises: collecting coordinate information of a self-moving device (10) when same moves in an work area (S11); on the basis of the coordinate information, determining corresponding coordinate points and generating a height map of the work area (S12); performing clustering processing on the coordinate points, so as to obtain a plurality of coordinate point sets (S13); on the basis of the plurality of coordinate point sets, using a fitting algorithm to perform fitting in the height map, so as to obtain at least one plane (S14); on the basis of an included angle between each of the at least one plane and a preset plane in the height map, determining a target plane from among the at least one plane (S15); and on the basis of a coordinate point set of the target plane that is obtained by means of fitting, determining a target area from the height map, wherein the target area is used for indicating a ramp in the work area (S16). Therefore, a ramp in a work area can be accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Ramp inspection methods, self-moving equipment and storage media Technical Field

[0001] This application relates to the field of self-moving device technology, and in particular to a ramp detection method, a self-moving device, and a storage medium. Background Technology

[0002] With the advancement of technology, the application of self-moving equipment (such as lawnmowers) has improved work efficiency and brought many conveniences to daily life.

[0003] However, self-propelled mobile equipment often struggles to detect whether it is on a slope, making it difficult to choose the appropriate direction for operation, such as working perpendicular to the slope's direction. If a self-propelled mobile equipment operates perpendicular to the slope's direction, it may experience lateral slippage due to gravity or uneven ground, affecting work efficiency and results. For example, if a lawnmower experiences lateral slippage, it may miss areas, resulting in uneven lawn trimming and affecting aesthetics. Furthermore, the lawnmower is also more susceptible to damage from slippage. Summary of the Invention

[0004] In view of the above, it is necessary to provide a slope detection method, a self-moving device, and a storage medium that can solve the technical problem that the self-moving device may slip on the slope due to the difficulty in detecting the slope, thus affecting the work efficiency and work results.

[0005] On the one hand, this application provides a ramp detection method, the ramp detection method comprising:

[0006] The self-moving equipment operates within a work area, which includes ramp areas and non-ramp areas.

[0007] Perform ramp area identification within the work area;

[0008] If the current work area is identified as a ramp area, the self-moving device is controlled to move along the gradient direction of the ramp area.

[0009] In some embodiments of this application, the method further includes a ramp area identification step, specifically including: collecting coordinate information from a mobile device moving within a work area; determining corresponding coordinate points and generating a height map of the work area based on the coordinate information; performing clustering processing on the coordinate points to obtain multiple sets of coordinate points; using a fitting algorithm to fit at least one plane into the height map based on the multiple sets of coordinate points; determining a target plane from the at least one plane based on the angle between each plane in the at least one plane and a preset plane in the height map; and determining a target area in the height map based on the set of coordinate points of the fitted target plane, wherein the target area is used to indicate a ramp area in the work area.

[0010] In some embodiments of this application, the ramp detection method further includes: obtaining the number of coordinate points in each coordinate point set, selecting the coordinate point set corresponding to the number of coordinate points less than a preset threshold, and filtering out the selected coordinate point set from the plurality of coordinate point sets.

[0011] In some embodiments of this application, the ramp detection method uses a fitting algorithm to fit at least one plane to the height map based on the plurality of coordinate point sets, including: performing an update process on the plurality of coordinate point sets;

[0012] An update process is performed on the multiple sets of coordinate points;

[0013] Repeat the update process until the updated set of coordinate points meets the preset conditions, then stop updating to obtain the at least one plane.

[0014] In some embodiments of this application, the ramp detection method performs an update process on the plurality of coordinate point sets.

[0015] The process includes: based on the Nth updated coordinate point set, using the fitting algorithm to obtain the (N+1)th plane, where N is an integer greater than or equal to zero; using the Nth updated coordinate point set to fit the coordinate points of the (N+1)th plane and determine them as candidate coordinate points; obtaining a candidate coordinate point set; determining the circumscribed graph formed by the candidate coordinate point set in the height map; determining the target coordinate point from the coordinate points included in the candidate coordinate point set and the circumscribed graph based on the angle between the (N+1)th plane and the preset plane; filtering out the target coordinate point from the Nth updated coordinate point set to obtain the (N+1)th updated coordinate point set; repeating the update process until the updated coordinate point set meets the preset conditions and then stopping the update to obtain the at least one plane.

[0016] In some embodiments of this application, the slope detection method determines the target coordinate point based on the angle between the (N+1)th plane and the preset plane, from the candidate coordinate point set and the coordinate points included in the circumscribed graph, including:

[0017] If the angle between the (N+1)th plane and the preset plane is greater than or equal to the first preset angle, the coordinate points included in the circumscribed graphic are determined as the target coordinate points.

[0018] In some embodiments of this application, the slope detection method determines the target coordinate point based on the angle between the (N+1)th plane and the preset plane, from the candidate coordinate point set and the coordinate points included in the circumscribed graph, including:

[0019] If the angle between the (N+1)th plane and the preset plane is less than the first preset angle, the coordinate point in the candidate coordinate point set is determined as the target coordinate point.

[0020] In some embodiments of this application, the slope detection method includes determining a target plane from the at least one plane based on the angle between each of the at least one plane and a preset plane in the height map:

[0021] If the angle between any plane and a preset plane in the elevation map is greater than a second preset angle, then any plane is determined as the target plane.

[0022] In some embodiments of this application, the ramp detection method, based on the fitted set of coordinate points of the target plane, determines the target area corresponding to the ramp in the height map, including:

[0023] The target region is determined by the bounding figure corresponding to the set of coordinate points of the target plane obtained by fitting.

[0024] In some embodiments of this application, the method for controlling the working direction of the self-moving device when working in a ramp area includes:

[0025] Based on the normal vector of the target plane and the normal vector of the preset plane, determine the direction vector of the intersection line between the target plane and the preset plane; based on the direction vector, determine the slope of the intersection line; and based on the direction indicated by the slope of the intersection line, determine the direction of the gradient.

[0026] In some embodiments of this application, the ramp detection method includes controlling the self-moving device to travel along the gradient direction of the ramp area, comprising:

[0027] Based on the target area and preset plane in the elevation map, determine the operating direction of the self-moving device in the slope area.

[0028] On the other hand, this application provides a self-moving device that operates within a work area and performs ramp area identification within the work area, including ramp areas and non-ramp areas;

[0029] If the mobile device recognizes that the current working area is a ramp area, it will move along the gradient direction of the ramp area.

[0030] On the other hand, this application provides a self-moving device that determines its operating direction on a ramp based on a target plane and a preset plane.

[0031] The operation direction includes: determining the direction vector of the intersection line between the target plane and the preset plane based on the normal vector of the target plane and the normal vector of the preset plane; determining the slope of the intersection line based on the direction vector; and determining the direction indicated by the slope as the operation direction. On the other hand, this application provides a self-moving device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the self-moving device implements the slope detection method described above.

[0032] In some embodiments of this application, the processor of the self-moving device is further configured to:

[0033] Based on the target plane and the preset plane, determine the working direction of the self-moving device on the ramp. The working direction includes the moving direction or operation direction of the self-moving device on the ramp of the working area to perform the work task.

[0034] In some embodiments of this application, the processor of the self-moving device is further configured to:

[0035] Based on the normal vector of the target plane and the normal vector of the preset plane, determine the direction vector of the intersection line between the target plane and the preset plane;

[0036] Based on the direction vector of the intersecting line, determine the slope of the intersecting line, and determine the direction indicated by the slope as the working direction.

[0037] In some embodiments of this application, the processor of the self-moving device is further configured to:

[0038] Coordinate information collected from the mobile device as it moves within the work area;

[0039] Based on the coordinate information, the corresponding coordinate points are determined and a height map of the work area is generated. The coordinate points are then clustered to obtain multiple sets of coordinate points.

[0040] Based on the multiple sets of coordinate points, at least one plane is obtained by fitting the height map using a fitting algorithm.

[0041] A target plane is determined from the at least one plane based on the angle between each of the at least one plane and a preset plane in the height map;

[0042] Based on the set of coordinate points of the target plane obtained by fitting, the target area in the height map is determined, and the target area is used to indicate the ramp area in the work area.

[0043] In some embodiments of this application, the self-moving device further includes: a sensor,

[0044] The sensor is used to acquire information for the self-moving device, the information including at least environmental information of the self-moving device and movement information of the self-moving device.

[0045] In some embodiments of this application, the sensor includes one or more of lidar, camera, infrared sensor, and encoder.

[0046] In some embodiments of this application, the self-moving device further includes a working mechanism, which is used to perform corresponding work tasks in the work area.

[0047] On the other hand, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor in a self-moving device, implements the ramp detection method.

[0048] In the ramp detection method of this embodiment, since the coordinate information is obtained by the movement of the self-moving device within the work area, the coordinate information can reflect multiple spatial locations and the height of each spatial location within the work area. Therefore, a height map of the work area can be accurately generated using the coordinate information. By clustering the coordinate points, similar coordinate points can be aggregated to obtain multiple sets of coordinate points. Based on these multiple sets of coordinate points, at least one plane can be fitted to determine the target plane corresponding to the ramp. The angle between each plane and a preset plane reflects the slope of that plane. Therefore, the target plane corresponding to the ramp can be accurately determined from at least one plane using the angle. Thus, based on the set of coordinate points of the fitted target plane, the target area can be accurately determined from the height map. Based on the target area, the ramps in the work area can be accurately determined, allowing the self-moving device to adjust its working direction according to the ramp's extension direction to avoid problems such as landslides, thereby ensuring work efficiency and effectiveness. Attached Figure Description

[0049] Figure 1 is a schematic diagram of a self-moving device provided in an embodiment of this application.

[0050] Figure 2 is a schematic diagram of the working direction provided in an embodiment of this application.

[0051] Figure 3 is a schematic diagram of the working direction provided in another embodiment of this application.

[0052] Figure 4 is a flowchart of a ramp detection method provided in an embodiment of this application.

[0053] Figure 5 is a schematic diagram of an elevation map provided in an embodiment of this application.

[0054] Figure 6 is a schematic diagram of an elevation map provided in another embodiment of this application.

[0055] Figure 7 is a schematic diagram of the grid corresponding to the filtered coordinate point set on the height map provided in an embodiment of this application.

[0056] Figure 8 is a schematic diagram of a fitted plane provided in an embodiment of this application.

[0057] Figure 9 is a schematic diagram of a fitted plane provided in another embodiment of this application.

[0058] Figure 10 is a schematic diagram of a fitted plane provided in another embodiment of this application.

[0059] Figure 11 is a schematic diagram of the structure of a self-moving device provided in an embodiment of this application. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0061] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0062] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0063] This application provides a slope detection method that can accurately determine the slope in the work area.

[0064] The ramp detection method provided in this application can be applied to one or more self-moving devices. Self-moving devices can be lawnmowers, cleaners, harvesters, and automated guided vehicles (AGVs), etc., and this application does not limit the specific type of self-moving device.

[0065] For example, Figure 1 shows a schematic diagram of a self-moving device provided in an embodiment of this application. The self-moving device 10 in Figure 1 is a smart lawnmower. The rear wheel at the tail of the lawnmower is the drive wheel, and the front wheel at the head is a swivel wheel, allowing it to perform mowing operations on slopes. However, if the lawnmower's operating direction is at an angle to the slope's extension direction, under the influence of gravity or uneven ground, the tail of the lawnmower may shift downhill, and the head uphill, causing the lawnmower to slide sideways (referred to as "slope slippage"). The lawnmower in Figure 1 is only an example of a self-moving device; in practical applications, self-moving devices can also be harvesters, automated guided vehicles, etc.

[0066] Figure 2 shows a schematic diagram of the working direction provided in one embodiment of this application. Figure 3 shows a schematic diagram of the working direction provided in another embodiment of this application. In Figure 2, the working direction of the lawnmower is the same as or parallel to the extension direction of the ramp. If the lawnmower performs mowing operations according to the working direction shown in Figure 2, the risk of lateral landslides can be reduced. In Figure 3, the working direction of the lawnmower forms a certain angle with the extension direction of the ramp. If the lawnmower performs mowing operations according to the working direction shown in Figure 3, the risk of lateral landslides may occur. The direction of the ramp extension can be referred to by the direction of the double arrows in Figures 2 and 3.

[0067] The self-moving device operates within a work area, which includes ramp areas and non-ramp areas, wherein operating within the work area includes traveling along the gradient direction of the ramp areas.

[0068] In some embodiments of this application, the gradient direction of the ramp area includes the extension direction of the ramp, and the self-moving device operates in the ramp area in the direction shown in Figure 2.

[0069] Figure 4 shows a flowchart of a ramp detection method according to an embodiment of this application. The order of the steps in the flowchart can be adjusted according to different needs, and some steps can be omitted. The method is applied to self-moving devices.

[0070] S11 is the coordinate information collected from the mobile device as it moves within the work area.

[0071] In some embodiments of this application, the movement of the self-moving device within the work area can cover both the boundary and the interior area of ​​the work area.

[0072] For example, the self-moving device can traverse the work area according to a preset path and collect the coordinate information of each location traversed through sensors.

[0073] For example, the preset path could be a "bow"-shaped path. The coordinate information for each location can include the x-coordinate (x), y-coordinate (y), and z-coordinate (z), where the z-coordinate can be the height of the mobile device relative to the ground plane. For instance, the mobile device can acquire the x-coordinate and y-coordinate for each location using a Real-time Kinematic (RTK) module or an odometer module, and acquire the z-coordinate for each location using an Inertial Measurement Unit (IMU), laser rangefinder, ultrasonic sensor, or other height-measuring sensors. The RTK module, odometer module, inertial measurement unit, and height-measuring sensors can be integrated within the mobile device.

[0074] The examples of how coordinate information is obtained are merely illustrative and are not limited to practical applications.

[0075] In this embodiment, by traversing the work area according to a preset path and collecting the coordinate information of each traversed location through sensors, it is possible to comprehensively reflect the characteristics of multiple spatial locations in the work area and the height of each spatial location.

[0076] S12: Based on the coordinate information, determine the corresponding coordinate points and generate a height map of the work area.

[0077] In some embodiments of this application, the coordinate point can be a three-dimensional coordinate point with height information, which is a point in space, and each coordinate information corresponds to a coordinate point.

[0078] In some embodiments of this application, the height map may be a grid height map that reflects different heights within the working area. The grid height map consists of multiple grids, and the number of grids in the grid height map may be determined by the number of coordinate information.

[0079] For example, the mobile device can determine the x-coordinate of the grid in the height map based on the x-coordinate of each coordinate information, determine the y-coordinate of the grid in the height map based on the y-coordinate, and determine the color of the grid based on the z-coordinate. The mobile device can then generate the corresponding grid based on the x-coordinate, y-coordinate, and color of the grid to obtain the height map.

[0080] The self-moving device can flexibly determine the color of the grid based on the vertical coordinate z. For example, a larger vertical coordinate corresponds to a lighter grid color, and a smaller vertical coordinate corresponds to a darker grid color.

[0081] For example, Figure 5 shows a schematic diagram of a height map provided in one embodiment of this application. Figure 6 shows a schematic diagram of a height map provided in another embodiment of this application. From the height maps shown in Figures 5 and 6, it can be seen that the self-moving device traverses the work area laterally along a "bow"-shaped path. Larger vertical coordinates correspond to lighter grid colors, and smaller vertical coordinates correspond to darker grid colors. Since the grid colors in the height map shown in Figure 5 gradually darken from top to bottom, it can be determined that the ramp height gradually decreases from top to bottom in the work area corresponding to the height map shown in Figure 5. Similarly, since the grid colors in the height map shown in Figure 6 gradually darken from left to right, it can be determined that the ramp height gradually decreases from left to right in the work area corresponding to the height map shown in Figure 6. Because the ramp height gradually decreases from top to bottom in the work area corresponding to the height map shown in Figure 5, it can be determined that the ramp extends longitudinally in the work area corresponding to the height map shown in Figure 5. Since the direction of lateral traversal is perpendicular to the direction of the longitudinally extending ramp, the self-moving device may experience lateral slippage when traversing the work area corresponding to the height map shown in Figure 5. Since the height of the ramps gradually decreases from left to right within the work area corresponding to the height map shown in Figure 6, it can be determined that the ramps extend laterally within this work area. Because the direction of the lateral traversal is parallel to the direction of the laterally extending ramps, the risk of the self-moving equipment experiencing lateral slippage is relatively low when traversing the work area corresponding to the height map shown in Figure 6.

[0082] In this embodiment, since coordinate information can comprehensively reflect the characteristics of multiple spatial locations and the height of each spatial location in the work area, a height map of the work area can be accurately generated using coordinate information.

[0083] S13 performs clustering on the coordinate points to obtain multiple sets of coordinate points.

[0084] In some embodiments of this application, the self-moving device can employ various methods to cluster coordinate points, and this application does not limit the clustering methods. For example, the self-moving device can utilize the Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm to cluster coordinate points, thereby obtaining multiple sets of coordinate points.

[0085] In this embodiment, by clustering the coordinate points, similar coordinate points can be aggregated to obtain multiple sets of coordinate points.

[0086] S14, Based on the multiple sets of coordinate points, at least one plane is obtained by fitting the height map using a fitting algorithm.

[0087] In some embodiments of this application, the concept of "plane" can refer to the region defined by the circumscribed graph formed by coordinate points in space. In this embodiment, the circumscribed graph can be the minimum bounding rectangle, or it can be other shapes; this application does not impose any limitations on this. Considering that the coordinate point sets corresponding to areas such as potholes in the work area, and the scattered coordinate point sets generated by measurement / clustering errors, may affect plane fitting, in order to solve this problem, the self-moving device can obtain the number of coordinate points in each coordinate point set, select the coordinate point set corresponding to the number less than a preset threshold, and filter out the selected coordinate point set from the multiple coordinate point sets.

[0088] The preset threshold can be customized, and this application does not impose any restrictions on it. For example, the preset threshold could be 20.

[0089] For example, following the height map shown in Figure 5, Figure 7 is a schematic diagram of the grid corresponding to the filtered coordinate point set provided in an embodiment of this application. From the distribution of the grid corresponding to the filtered coordinate point set on the height map in Figure 7, it can be seen that the filtered coordinate point set corresponds to the pitted area in the working area.

[0090] Considering that the number of coordinate points corresponding to areas such as potholes in the work area, and the number of coordinate points in the scattered coordinate point sets generated by measurement / clustering errors is often small, in this embodiment, the number of coordinate point sets corresponding to the number of points is less than a preset threshold is selected. The selected coordinate point set is filtered out from the multiple coordinate point sets, which can eliminate interference and provide cleaner data for subsequent plane fitting.

[0091] In some embodiments of this application, the self-moving device can employ various methods to perform plane fitting on multiple sets of coordinate points, and this application does not limit the fitting method. For example, the self-moving device can utilize the Random Sample Consensus (RANSAC) algorithm to perform plane fitting on multiple sets of coordinate points, thereby obtaining at least one plane.

[0092] In some embodiments of this application, the self-mobile device, based on the plurality of coordinate point sets, uses a fitting algorithm to fit at least one plane in a height map, including: performing an update process on the plurality of coordinate point sets, including: based on the Nth updated coordinate point set, using a fitting algorithm to obtain the (N+1)th plane, where N is an integer greater than or equal to zero; using the coordinate points in the Nth updated coordinate point set to fit the (N+1)th plane, determining them as candidate coordinate points, and obtaining a candidate coordinate point set; determining the circumscribed graph formed by the candidate coordinate point set in the height map; determining the target coordinate point from the coordinate points included in the candidate coordinate point set and the circumscribed graph according to the angle between the (N+1)th plane and a preset plane; filtering out the target coordinate point from the Nth updated coordinate point set to obtain the (N+1)th updated coordinate point set; repeating the above update process until the updated coordinate point set meets the preset conditions and then stopping the update, thereby obtaining the at least one plane.

[0093] The zeroth updated set of coordinate points can represent multiple original, unupdated sets of coordinate points. For example, based on these original, unupdated sets of coordinate points, a fitting algorithm can be used to fit the first plane. The circumscribed graph includes more coordinate points than the candidate set.

[0094] For example, the self-moving device can use the RANSAC algorithm to iteratively fit the coordinate points in the plurality of coordinate point sets, thereby obtaining at least one plane that conforms to the plane equation.

[0095] The plane equation can be expressed as ax + by + cz + d = 0. For the fitting method of at least one plane, refer to the descriptions of plane fitting in related technologies. Preset conditions can be customized, and this application does not impose any restrictions on them. For example, preset conditions could be that the number of updated coordinate points is less than a preset quantity value and the ratio between the updated coordinate point set and the original multiple coordinate point sets is less than a preset proportion value. The preset quantity value and preset proportion value can be customized, and this application does not impose any restrictions on them.

[0096] For example, the self-moving device determines the target coordinate point from the candidate coordinate point set and the coordinate points included in the circumscribed graphic based on the angle between the N+1th plane and the preset plane, including: if the angle between the N+1th plane and the preset plane is greater than or equal to a first preset angle, the coordinate points included in the circumscribed graphic are determined as the target coordinate point; if the angle between the N+1th plane and the preset plane is less than the first preset angle, the coordinate points in the candidate coordinate point set are determined as the target coordinate point.

[0097] The preset plane can be the XY plane in the height map, which corresponds to the ground plane in the working environment. The first preset angle can be customized, and this application does not impose any restrictions on it. For example, the first preset angle can be 15°.

[0098] For example, following the height map shown in Figure 5, Figure 8 is a schematic diagram of a fitted plane provided in one embodiment of this application. Figure 9, following the height map shown in Figure 6, is a schematic diagram of a fitted plane provided in another embodiment of this application. Figure 10, following the plane shown in Figure 9, is a schematic diagram of a fitted plane provided in yet another embodiment of this application. In Figure 8, the dark rectangles represent the fitted planes. In Figure 9, the two dark rectangles represent the fitted planes, and Figure 10 is a three-dimensional schematic diagram of the two planes shown in Figure 9.

[0099] In this embodiment, since the preset plane is the fitting plane corresponding to the ground plane in the working environment, the angle between each plane and the preset plane can reflect the slope of that plane. When the angle between each plane and the preset plane is greater than or equal to a first preset angle, it means that the slope of the area corresponding to that plane in the working area is relatively large, and it is more likely to be a ramp. When the angle between each plane and the preset plane is less than the first preset angle, it means that the slope of the area corresponding to that plane in the working area is relatively small, and it can be regarded as flat ground. Since the circumscribed graph includes more coordinate points than the set of candidate coordinate points, if the angle between the (N+1)th plane and the preset plane is greater than or equal to the first preset angle, the coordinate points included in the circumscribed graph are filtered out from the Nth updated set of coordinate points. This can filter out the coordinate points belonging to the ramp corresponding to that plane, thereby avoiding the influence on the fitting of planes corresponding to other ramps. If the angle between the (N+1)th plane and the preset plane is less than the first preset angle, the coordinate points used to fit the (N+1)th plane are filtered out from the Nth updated set of coordinate points. This can avoid the interference of coordinate points belonging to flat ground on the determination of the plane corresponding to the ramp.

[0100] S15, determine the target plane from the at least one plane based on the angle between each plane in the at least one plane and a preset plane in the height map.

[0101] In some embodiments of this application, if the angle between any plane and a preset plane in the elevation map is greater than a second preset angle, the any plane is determined as the target plane.

[0102] The second preset angle can be customized. The second preset angle can be the same as or different from the first preset angle. This application does not impose any restrictions on this.

[0103] In this embodiment, since the angle between each plane and the preset plane can reflect the slope of the plane, the plane corresponding to the angle greater than the second preset angle is determined as the target plane, and the plane with a larger slope can be determined as the target plane.

[0104] S16. Based on the set of coordinate points of the target plane obtained by fitting, determine the target area in the height map. The target area is used to indicate the ramps in the work area.

[0105] In some embodiments of this application, the self-moving device can determine the target region based on the circumscribed graph corresponding to the set of coordinate points of the target plane obtained by fitting.

[0106] For example, the self-moving device can determine the circumscribed graph corresponding to the set of coordinate points of the target plane obtained by fitting as the target region.

[0107] In this embodiment, by determining the plane with a larger slope as the target plane, the accuracy of slope detection can be ensured.

[0108] In this embodiment, the circumscribed shape includes the minimum circumscribed rectangle, but the circumscribed shape can also be other shapes, and this application does not limit this.

[0109] In other embodiments of this application, the self-moving device can determine its working direction on the ramp based on the target plane and a preset plane. The working direction can be the direction of movement or operation of the self-moving device on the ramp in the work area to perform the task. For example, if the self-moving device is a lawnmower, the working direction can be the cutting direction of the lawnmower on the ramp in the work area.

[0110] For example, the self-moving device determines its working direction on the ramp based on the target plane and the preset plane by: determining the direction vector of the intersection line between the target plane and the preset plane based on the normal vector of the target plane and the normal vector of the preset plane; determining the slope of the intersection line based on the direction vector; and determining the direction indicated by the slope as the working direction. The gradient direction of the ramp area includes the direction indicated by the slope.

[0111] The normal vectors of the target plane and the preset plane can be determined by the corresponding plane equations. For example, if the plane equation corresponding to the target plane is a1x + b1y + c1z + d = 0, the normal vector of the target plane can be determined as follows: The equation of the target plane is a²x + b²y + c²z + d = 0, which determines the normal vector of the target plane.

[0112] The self-moving device can determine the direction vector by the vector product m = n1 × n2 between the normal vector n1 of the target plane and the normal vector n2 of the preset plane. The ratio between the longitudinal component and the lateral component of the direction vector is determined as the slope, where the slope indicates the working direction which is parallel to the direction of the ramp extension.

[0113] In the ramp detection method of this embodiment, since the coordinate information is obtained by the movement of the self-moving device within the work area, the coordinate information can reflect multiple spatial locations and the height of each spatial location within the work area. Therefore, a height map of the work area can be accurately generated using the coordinate information. By clustering the coordinate points, similar coordinate points can be aggregated to obtain multiple sets of coordinate points. Based on these multiple sets of coordinate points, at least one plane can be fitted to determine the target plane corresponding to the ramp. The angle between each plane and a preset plane reflects the slope of that plane. Therefore, the target plane corresponding to the ramp can be accurately determined from at least one plane using the angle. Thus, the target area can be accurately determined from the height map based on the set of coordinate points of the fitted target plane. Based on the target area, the ramp in the work area can be accurately determined. Therefore, the self-moving device can adjust its working direction according to the extension direction of the ramp to avoid problems such as landslides, thereby ensuring work efficiency and effectiveness.

[0114] Figure 11 shows a schematic diagram of the structure of a self-moving device according to an embodiment of this application. In Figure 11, the self-moving device 10 includes a main body and a memory 101, a processor 102, a power supply 103, a sensor 104, a working mechanism 105, a communication module 106, a positioning module 107, a drive wheel 108, and a bus 109 disposed on the main body. The processor 102 is coupled to the memory 101, the power supply 103, the sensor 104, the working mechanism 105, the communication module 106, the positioning module 107, and the drive wheel 108 via the bus 109.

[0115] Memory 101 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 102, and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.

[0116] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 102. Non-volatile memory can include disk storage devices and flash memory.

[0117] Memory 101 is used to store one or more computer programs. The one or more computer programs are configured to be executed by processor 102. The one or more computer programs include multiple instructions that, when executed by processor 103, enable a ramp detection method to be executed on the self-moving device 10.

[0118] In other embodiments, the self-moving device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the self-moving device 10.

[0119] Processor 102 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0120] The processor 102 provides computing and control capabilities. For example, the processor 102 is used to execute computer programs stored in the memory 101 to implement the above-described ramp detection method.

[0121] The power supply 103 is used to power the self-moving device. In some embodiments of this application, the power supply 103 may include any one or more power supply devices such as batteries, fuel generators, solar power modules, and wind power modules.

[0122] Sensor 104 is used to acquire information for the self-moving device 10, such as environmental information and movement information of the self-moving device 10. In some embodiments of this application, sensor 104 may include one or more sensors of the type of lidar, camera, infrared sensor, encoder, etc.

[0123] The working mechanism 105 is used to perform corresponding work tasks, such as mowing, patrolling, sweeping, and spraying pesticides. In some embodiments of this application, the working mechanism 105 may include a motor, a transmission mechanism, a blade disc, and a grass collection box. In some embodiments of this application, the motor can drive the blade disc to rotate through the transmission mechanism to achieve the mowing function. The motor can also control the movement of the blades to adjust the mowing height and the mowing area. The grass collection box can be used to collect fallen leaves and cut grass.

[0124] The communication module 106 is used to enable communication between the self-moving device and other devices. In one embodiment of this application, the communication module 106 can interact with other devices via wired and / or wireless communication. The aforementioned wireless communication may include one or more combinations of communication methods such as Bluetooth communication, Wi-Fi communication, and Near Field Communication (NFC).

[0125] The positioning module 107 is used to determine the location of the self-moving device. In some embodiments of this application, the positioning module 107 may include one or more of the following types of positioning modules: Global Positioning System (GPS), inertial navigation system, real-time kinematic (RTK) carrier phase differential system, etc.

[0126] The drive wheel 108 is used to enable movement of the self-moving device. In some embodiments of this application, the drive wheel 108 can realize the movement function of the self-moving device according to the control of the processor 102. In some embodiments of this application, the drive wheel 108 may include a left drive wheel and a right drive wheel.

[0127] Bus 109 is used at least to provide a channel for communication between the memory 101, processor 102, power supply 103, sensor 104, working mechanism 105, communication module 106, positioning module 107, and drive wheel 108 in the self-moving device 10.

[0128] In other embodiments of this application, the self-moving device 10 may further include a collision avoidance component and a steering assembly. The collision avoidance component can be used to prevent the drive wheels 108 from colliding with obstacles in front of the self-moving device. The steering assembly can be used to adjust the driving direction of the drive wheels 108.

[0129] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the self-moving device 10. In other embodiments of this application, the self-moving device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0130] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.

[0131] The computer-readable storage medium can be the internal storage of the self-moving device described in the above embodiments, such as the hard disk or memory of the self-moving device. Alternatively, the computer-readable storage medium can be an external storage device of the self-moving device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the self-moving device.

[0132] In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of the self-moving device, etc.

[0133] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0134] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0135] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A ramp detection method, characterized by, The ramp detection method includes: Control the self-moving device to work within the work area, and perform ramp area identification within the work area, including ramp areas and non-ramp areas; If the current work area is identified as a ramp area, then the self-moving device is controlled. Proceed along the gradient direction of the ramp area.

2. The ramp detection method according to claim 1, characterized by, The method also includes a ramp area identification step, specifically including: Collect coordinate information of the self-moving device as it moves within the work area; Based on the coordinate information, the corresponding coordinate points are determined and a height map of the work area is generated; Cluster the coordinate points to obtain multiple sets of coordinate points; Based on the multiple sets of coordinate points, at least one plane is obtained by fitting the height map using a fitting algorithm. A target plane is determined from the at least one plane based on the angle between each of the at least one plane and a preset plane in the height map; Based on the set of coordinate points of the target plane obtained by fitting, the target area in the height map is determined, and the target area is used to indicate the ramp area in the work area.

3. The ramp detection method according to claim 2, characterized by, The method further includes: Get the number of coordinate points in each coordinate point set; Select a set of coordinate points corresponding to a number less than a preset threshold, and filter out the selected set of coordinate points from the multiple sets of coordinate points.

4. The ramp detection method according to claim 2, characterized by, The step of fitting at least one plane into the height map using a fitting algorithm based on the plurality of coordinate point sets includes: An update process is performed on the multiple sets of coordinate points; Repeat the update process until the updated set of coordinate points meets the preset conditions, then stop updating to obtain the at least one plane; The update process for the multiple sets of coordinate points includes: Based on the Nth updated set of coordinate points, the N+1th plane is obtained using the fitting algorithm, where N is an integer greater than or equal to zero; The coordinate points in the Nth updated coordinate point set are used to fit the coordinate points of the (N+1)th plane, and are determined as candidate coordinate points, thus obtaining the candidate coordinate point set; Determine the circumscribed graph of the candidate coordinate point set in the height map; Based on the angle between the (N+1)th plane and the preset plane, the target coordinate point is determined from the candidate coordinate point set and the coordinate points included in the circumscribed graph; The target coordinate point is filtered out from the Nth updated coordinate point set to obtain the N+1th updated coordinate point set; Repeat the update process until the updated set of coordinate points meets the preset conditions, then stop updating to obtain the at least one plane.

5. The ramp detection method according to claim 4, characterized by, The step of determining the target coordinate point based on the angle between the (N+1)th plane and the preset plane, from the candidate coordinate point set and the coordinate points included in the circumscribed graph, includes: If the angle between the (N+1)th plane and the preset plane is greater than or equal to the first preset angle, the coordinate points included in the circumscribed graphic are determined as the target coordinate points; If the angle between the (N+1)th plane and the preset plane is less than the first preset angle, the coordinate point in the candidate coordinate point set is determined as the target coordinate point.

6. The ramp detection method according to claim 2, characterized by, Determining the target plane from the at least one plane based on the angle between each plane in the at least one plane and a preset plane in the height map includes: If the angle between any plane and a preset plane in the elevation map is greater than a second preset angle, then any plane is determined as the target plane.

7. The slope detection method according to claim 2, wherein The step of determining the target area corresponding to the ramp in the elevation map based on the set of coordinate points obtained from the fitted target plane includes: The target region is determined by the bounding figure corresponding to the set of coordinate points of the target plane obtained by fitting.

8. The ramp detection method according to claim 2, characterized by, The control of the self-moving device to travel in the working direction along the ramp area includes: Based on the normal vector of the target plane and the normal vector of the preset plane, determine the direction vector of the intersection line between the target plane and the preset plane; Based on the direction vector, determine the slope of the intersecting line; The direction of the gradient is determined based on the direction indicated by the slope of the intersecting line.

9. A self-moving device, characterized in that The self-moving device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the self-moving device implements the ramp detection method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor in a self-moving device, implements the ramp detection method as described in any one of claims 1 to 8.