Obstacle avoidance method of self-moving device, self-moving device and storage medium
By collecting environmental information to determine obstacle attributes and executing preset obstacle avoidance strategies, the self-moving device increases the distance between the working modules and reduces the speed when encountering obstacles, solving the problem of work interruption caused by obstacle avoidance and turning around to avoid obstacles, and improving work efficiency and consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MAMMOTION INNOVATION CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-01
AI Technical Summary
Existing self-moving equipment frequently interrupts operations when encountering obstacles, either by navigating around them or turning around to avoid them. This results in incomplete coverage of the work area and low efficiency.
The self-moving device collects environmental information, determines obstacle attributes, and executes preset obstacle avoidance strategies, including increasing the distance between the working module and the preset plane, and reducing speed, until the obstacle meets the preset conditions.
This avoids damage to the work module from obstacles, reduces obstacle avoidance frequency, and improves work efficiency and consistency.
Smart Images

Figure CN121957012A_ABST
Abstract
Description
Obstacle avoidance methods for self-moving devices, self-moving devices and storage media Technical Field
[0001] This application relates to the field of device control, and more particularly to an obstacle avoidance method for a self-moving device, a self-moving device, and a storage medium. Background Technology
[0002] When an automated mobile device detects an obstacle while moving along a pre-planned path, it typically avoids the obstacle by either circling around it or turning around to avoid it. Circling around the obstacle involves planning a path around it to avoid it, while turning around to avoid it involves recording the obstacle's position and then turning back to replan the path. However, both methods have drawbacks. Circling around the obstacle can result in the automated mobile device's trajectory not fully covering the work area, leading to missed areas. Turning around to avoid it requires replanning the path every time an obstacle is encountered, resulting in low efficiency, and the turn may introduce positioning errors, also easily leading to missed areas. Therefore, how to avoid frequent interruptions to the operation of automated mobile devices due to obstacles has become an urgent problem to solve. Summary of the Invention
[0003] The main objective of this application is to provide an obstacle avoidance method for a self-moving device, a self-moving device, and a storage medium, which aims to prevent the operation of the self-moving device from being frequently interrupted by obstacles.
[0004] In a first aspect, this application provides an obstacle avoidance method for a self-moving device. The self-moving device is equipped with a work module, which is used to perform work operations near a preset plane during the movement of the self-moving device. The method includes the following steps: during the execution of the work operation by the self-moving device, controlling the self-moving device to collect environmental information of the work area; if obstacle information exists in the environmental information, determining the corresponding obstacle attribute based on the obstacle information; if the obstacle attribute belongs to a preset obstacle, executing a preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets a preset condition, wherein the preset obstacle avoidance strategy includes at least: increasing the distance of the work module relative to the preset plane.
[0005] In some implementations, executing the preset obstacle avoidance strategy corresponding to the obstacle information further includes: reducing the moving speed of the self-moving device and increasing the distance between the working module and the preset plane.
[0006] In some embodiments, the obstacle information includes: height information and size information; reducing the moving speed of the self-moving device and increasing the distance of the working module relative to the preset plane includes at least one of the following: determining the distance adjustment amount of the working module based on the height information, and increasing the distance of the working module relative to the preset plane based on the distance adjustment amount; determining the speed adjustment amount of the self-moving device based on the size information, and reducing the moving speed of the self-moving device based on the speed adjustment amount.
[0007] In some implementations, executing a preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets a preset condition includes: during the execution of the preset obstacle avoidance strategy, obtaining the movement distance of the self-moving device; calculating the relative position information of the self-moving device relative to the obstacle based on the distance information and the movement distance; and stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value.
[0008] In some embodiments, stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value includes: controlling the self-moving device to execute a preset operation strategy when the relative position information increases to a preset value, wherein the preset operation strategy includes at least: reducing the distance of the operation module relative to the preset plane.
[0009] In some implementations, obtaining the travel distance of the self-moving device during the execution of the preset obstacle avoidance strategy includes: obtaining wheel speed information of the self-moving device during the execution of the preset obstacle avoidance strategy; integrating the wheel speed information to obtain the travel distance of the self-moving device.
[0010] In some implementations, when obstacle information exists in the environmental information, determining the corresponding obstacle attribute based on the obstacle information includes: determining the height information of the obstacle based on the obstacle information; and if the height information is less than a preset height, determining the obstacle attribute as the preset obstacle.
[0011] In some embodiments, the obstacle information includes at least one of the following: image information and point cloud information; the step of determining the obstacle attribute as the preset obstacle when the height information is less than a preset height includes at least one of the following: determining the obstacle type of the obstacle based on the image information; determining the height information and size information of the obstacle based on the point cloud information when the obstacle type belongs to a preset type; and determining the obstacle attribute as the preset obstacle when the height information is less than a preset height and the size information is less than a preset size.
[0012] Secondly, this application also provides a self-moving device, which is equipped with a work module, a walking module, a data acquisition module, and a control module. The work module is used to perform work operations near a preset plane during the movement of the self-moving device. The walking module is used to drive the self-moving device to move. The data acquisition module is used to acquire environmental information of the working area where the self-moving device is located. The control module includes a processor, a memory, and a computer program stored in the memory and executable by the processor. When the computer program is executed by the processor, it implements the obstacle avoidance method of the self-moving device as described above.
[0013] Thirdly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the obstacle avoidance method for the self-moving device as described above.
[0014] This application provides an obstacle avoidance method for a self-moving device, a self-moving device, and a storage medium. The self-moving device is equipped with a working module, which performs work operations near a preset plane during the movement of the self-moving device. The method involves controlling the self-moving device to collect environmental information of the working area during the work operations. If obstacle information is present in the environmental information, the method determines the corresponding obstacle attribute based on the obstacle information. If the obstacle attribute belongs to a preset obstacle, the method executes a preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets a preset condition. The preset obstacle avoidance strategy includes at least increasing the distance of the working module relative to the preset plane. By increasing the height of the working module when encountering an obstacle, damage to the working module is avoided, and the operation of the self-moving device is prevented while avoiding obstacles. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 is a flowchart illustrating an obstacle avoidance method for a self-moving device according to an embodiment of this application; Figure 2 is a flowchart illustrating a sub-step of determining obstacle attributes according to an embodiment of this application; Figure 3 is a flowchart illustrating a sub-step of executing a preset obstacle avoidance strategy according to an embodiment of this application; Figure 4 is a flowchart illustrating the steps of an obstacle avoidance method for a self-moving device according to another embodiment of this application; Figure 5 is a structural schematic diagram of a self-moving device according to an embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0019] This application provides an obstacle avoidance method for a self-moving device, a self-moving device, and a storage medium.
[0020] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0021] Please refer to Figure 1, which is a flowchart illustrating an obstacle avoidance method for a self-moving device according to an embodiment of this application. This method can be used in a self-moving device or a server. For example, the method can be configured in a self-moving device; alternatively, it can be configured in a server, with the server issuing instructions to the self-moving device to implement the obstacle avoidance method provided in this embodiment. The self-moving device is a device that performs operations near a preset plane, and the distance between the operation module and the preset plane is adjustable. For example, a lawnmower robot performing lawn mowing operations has an adjustable blade height relative to the ground; or a sweeping robot performing cleaning operations has an adjustable sweeping brush height relative to the ground. The server can be a standalone server, a server cluster, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0022] For example, the operation module can operate adjacent to a preset plane, either by being flush against the plane (e.g., the sweeping brush of a robotic vacuum cleaner is flush with the ground) or by being at a certain distance from the preset plane (e.g., the blade of a lawnmower is at a certain distance from the ground). In the self-moving device provided in this application embodiment, the distance between the operation module and the preset plane can be adjusted by an electric push rod, but it is not limited to this and is not restricted here.
[0023] As shown in Figure 1, the obstacle avoidance method of the self-moving device includes steps S101 to S103.
[0024] Step S101: During the operation of the self-moving device, control the self-moving device to collect environmental information of the working area.
[0025] For example, the self-moving device can relocate its position on the map using environmental information to determine its position in the work area, thereby ensuring that the self-moving device performs its work along a pre-planned movement path. In addition, environmental information can also be used to detect obstacles in the work area to avoid collisions between the self-moving device and obstacles.
[0026] For example, the self-moving device collects environmental information at a preset frequency, such as 10Hz, to ensure the real-time nature of environmental perception and obstacle detection.
[0027] For example, the self-moving device is equipped with sensors for sensing environmental information of the work area, such as one or more cameras or LiDAR, to acquire image information of the work area through the camera and / or acquire point cloud information of the work area through the LiDAR. The camera can be a monocular camera, a binocular camera, a depth camera, etc., and is not limited thereto.
[0028] For example, the self-moving device provided in this application embodiment is equipped with a binocular camera and a lidar. The binocular camera and lidar acquire environmental information within a 120°, 2m range around the self-moving device's direction of travel, enabling the collection of environmental information over a relatively large angular and distance range. Furthermore, by combining the visual information acquired by the binocular camera with the distance and geometric information acquired by the lidar, obstacles in the working area are detected and classified, avoiding misidentification of weeds and other objects as obstacles, thus improving the accuracy of obstacle avoidance for the self-moving device.
[0029] Step S102: If obstacle information exists in the environmental information, determine the corresponding obstacle attributes based on the obstacle information.
[0030] For example, a self-moving device analyzes environmental information to determine whether obstacle information exists within the environment, thereby determining whether obstacles exist within the sensor's observation range. Specifically, the self-moving device can analyze point cloud information using point cloud set classification, point cloud segmentation algorithms, etc., to determine whether there are point clouds corresponding to obstacles; it can also analyze image information using semantic segmentation models, convolutional neural networks, etc., to determine whether obstacles are detected in the image information, thereby determining whether obstacle information exists in the environmental information.
[0031] For example, when obstacle information is detected, the obstacle is classified according to the obstacle information to obtain the obstacle attribute corresponding to the obstacle. The obstacle attribute is used to indicate whether the obstacle is an obstacle that the self-moving device can cross, so as to determine the obstacle avoidance strategy corresponding to the obstacle based on the obstacle attribute, thereby improving the pertinence and flexibility of obstacle avoidance of the self-moving device.
[0032] Please refer to Figure 2, which is a flowchart illustrating the sub-steps for determining obstacle attributes according to an embodiment of this application.
[0033] As shown in Figure 2, in some embodiments, when obstacle information exists in the environmental information, step S102 determines the corresponding obstacle attributes based on the obstacle information, including: step S1021, determining the height information of the obstacle based on the obstacle information.
[0034] Step S1022: If the height information is less than the preset height, the obstacle attribute is determined as the preset obstacle.
[0035] In related technologies, once a self-moving device detects an obstacle on its pre-planned path, it will directly change its path to avoid collisions. This obstacle avoidance method frequently interrupts the movement and operation of the self-moving device, especially in areas with dense obstacles, such as a lawnmower robot on a lawn with stones of varying sizes. To avoid the resulting low efficiency, the self-moving device control method provided in this application determines, at least based on the obstacle's height information, whether it is a preset obstacle that the self-moving device can cross without changing its path. This avoids interrupting the movement path when encountering small obstacles and improves the operational efficiency of the self-moving device.
[0036] For example, when the environmental information is point cloud information, the point cloud distribution formed by the obstacle in the vertical direction is determined based on the obstacle information, and the Z coordinate values of the top and bottom of the obstacle are obtained, thereby estimating the length of the obstacle in the vertical direction and obtaining the height information of the obstacle; when the environmental information is image information, the coordinates of the obstacle in the pixel coordinate system are projected to the world coordinate system, thereby estimating the length of the obstacle in the vertical direction and obtaining the height information of the obstacle.
[0037] Specifically, since the preset obstacle avoidance strategy is to increase the distance between the working module and the preset plane, such as increasing the height of the working module, so that the working module can cross the location of the obstacle without contacting it, it can be understood that the preset height is determined by the maximum height that the working module can reach. For example, if the distance between the lowest point of the working module and the preset plane when it reaches its maximum height is 10cm, then the preset height is less than or equal to 10cm. For example, assuming the self-moving device is a lawnmower robot, the working module is a blade, and the height of the blade in the vertical direction is adjustable. If the maximum adjustable height of the blade is 10cm, then the preset height is the height of the obstacle that the blade can cross when adjusted to 10cm, for example, the preset height is 9cm.
[0038] In some embodiments, the obstacle information includes at least one of the following: image information and point cloud information; the step of determining the obstacle attribute as the preset obstacle when the height information is less than a preset height includes at least one of the following: determining the obstacle type of the obstacle based on the image information; determining the height information and size information of the obstacle based on the point cloud information when the obstacle type belongs to a preset type; and determining the obstacle attribute as the preset obstacle when the height information is less than a preset height and the size information is less than a preset size.
[0039] Understandably, there may be various types of obstacles in the work area. These obstacles are made of different materials and pose varying risks of damage to automated mobile devices, especially their operating modules. For example, stones in a lawn or branches in an orchard are considered low-risk obstacles, while metal blocks are considered high-risk obstacles that can easily damage automated mobile devices.
[0040] To further enhance the safety of automated mobile devices, obstacle type can be used as a criterion for determining obstacle attributes. A preset obstacle avoidance strategy is only implemented when the obstacle type falls under a low-risk, preset category. Conversely, if the obstacle type does not belong to a preset category, it is still necessary to bypass the obstacle to avoid damage to the automated mobile device. This approach classifies small, low-risk obstacles as preset obstacles, allowing the automated mobile device to execute preset obstacle avoidance strategies for these obstacles without needing to change its movement path upon encountering them. This reduces the frequency of obstacle avoidance for the automated mobile device and improves its operational efficiency.
[0041] For example, the criteria for determining obstacle attributes may also include the obstacle's size information, such as the obstacle's lateral length on the X-axis. This prevents the obstacle from being too large and hindering the self-moving device's crossing, such as causing the self-moving device to tip over. Correspondingly, the preset size can be the self-moving device's lateral length on the X-axis. Assuming the self-moving device has two sets of wheels with a distance of 20cm between them, the preset size is less than or equal to 20cm.
[0042] Step S103: If the obstacle attribute belongs to a preset obstacle, execute the preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets the preset conditions. The preset obstacle avoidance strategy includes at least: increasing the distance of the operation module relative to the preset plane.
[0043] For example, the obstacle is an object on a preset plane that obstructs the movement of the self-moving device, while the operation module needs to operate near the preset plane. To avoid collisions between the operation module and the obstacle that could damage the operation module, the distance between the operation module and the preset plane is increased as the self-moving device crosses the obstacle until it does. Here, assuming the preset plane is the ground, the height of the operation module relative to the ground is increased.
[0044] For example, assuming the self-moving device is a lawnmower robot, the working module is a cutting component, which is used to cut the lawn. Increasing the distance between the working module and the preset plane increases the height of the cutting component from the ground. Assuming the self-moving device is a sweeping robot, the working module is a floor brush, and increasing the distance between the working module and the preset plane increases the height of the floor brush.
[0045] In some implementations, executing the preset obstacle avoidance strategy corresponding to the obstacle information further includes: reducing the moving speed of the self-moving device and increasing the distance between the working module and the preset plane.
[0046] For example, while increasing the distance between the working module and the preset plane to enable the self-moving device to cross obstacles without collision, the moving speed of the self-moving device is reduced to prevent the self-moving device from tipping over due to high speed, and to provide sufficient reaction time for possible accidents, thereby improving the safety of obstacle avoidance of the self-moving device.
[0047] For example, assuming the self-moving device is a lawnmower robot, the working module is the blade head. The lawnmower robot performs lawnmowing operations at a preset moving speed and blade head height, such as a moving speed of 1 m / s and a blade head height of 3 cm. If an obstacle is detected in front, such as an obstacle 2 m ahead, the height of the lawnmower robot's blade head from the ground is increased and the moving speed of the lawnmower robot is decreased, such as reducing the moving speed to 0.5 m / s and increasing the blade head height to 5 cm.
[0048] In some embodiments, the obstacle information includes: height information and size information; reducing the moving speed of the self-moving device and increasing the distance of the working module relative to the preset plane includes at least one of the following: determining the distance adjustment amount of the working module based on the height information, and increasing the distance of the working module relative to the preset plane based on the distance adjustment amount; determining the speed adjustment amount of the self-moving device based on the size information, and reducing the moving speed of the self-moving device based on the speed adjustment amount.
[0049] For example, to adapt the operation of the self-moving device to the size of the obstacle during the execution of a preset obstacle avoidance strategy, the operation module is adjusted according to the height information of the obstacle. Specifically, the distance adjustment amount of the operation module is determined based on the height information, for example, by subtracting the original distance between the operation module and the preset plane from the height information of the obstacle. Here, the original distance is the distance of the operation module relative to the preset plane when the self-moving device executes a conventional preset operation strategy.
[0050] Taking a lawnmower robot as an example, assuming the mowing height is set to 2cm and centered, the initial cutting height of the blade in the preset operation strategy is 2cm. During the execution of the preset operation strategy, the lawnmower robot encounters a stone with a height of 5cm and identifies it as a preset obstacle. At this point, based on the initial height and the obstacle's height information, the minimum height adjustment is determined to be (5cm - 2cm) = 3cm. Therefore, the lawnmower robot controls the blade height to increase by more than 3cm, for example, 3.5cm or 4cm. This dynamic height adjustment adapts the blade height to the obstacle height, avoiding significant unevenness in mowing height and improving the lawnmower robot's mowing effect.
[0051] Similarly, the speed adjustment amount for the self-moving device when reducing its speed can also be determined based on its size information. Understandably, the larger the obstacle's size, the greater the risk of the self-moving device tipping over, thus requiring a greater reduction in its speed. Therefore, the speed adjustment amount is positively correlated with the size information. Specifically, the speed adjustment amount is 30%-50% of the self-moving device's original speed, reducing its speed within a certain range to avoid excessive deceleration that could impact operational efficiency.
[0052] In some embodiments, reducing the moving speed of the self-moving device and increasing the distance of the working module relative to the preset plane further includes increasing the distance of the working module relative to the preset plane to a preset maximum distance.
[0053] For example, to reduce the complexity of controlling the self-moving device and improve the response speed to obstacles, when an obstacle is detected as a preset obstacle, the distance between the working module and the preset plane is directly increased to the maximum distance, allowing the working module to cross the preset obstacle. The maximum distance is the maximum achievable distance of the working module relative to the preset plane, such as the maximum achievable height of the lawnmower's blade. If the lawnmower's blade is 10cm above the ground, the blade height is adjusted to its maximum height above the ground, i.e., 10cm. This avoids insufficient blade lifting height when there is an error in obstacle height detection, which could lead to a collision and damage to the blade.
[0054] Please refer to Figure 3, which is a flowchart illustrating the sub-steps of executing a preset obstacle avoidance strategy according to an embodiment of this application.
[0055] As shown in Figure 3, in some embodiments, step S103 executes the preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets the preset conditions, including: step S1031, during the execution of the preset obstacle avoidance strategy, obtaining the movement distance of the self-moving device.
[0056] Step S1032: Calculate the relative position information of the self-moving device relative to the obstacle based on the distance information and the moving distance.
[0057] Step S1032: When the relative position information increases to a preset value, stop executing the preset obstacle avoidance strategy.
[0058] For example, after the self-moving device safely crosses an obstacle, the preset obstacle avoidance strategy is stopped, and the normal preset operation strategy is restored. Therefore, it is necessary to determine whether the self-moving device has crossed the obstacle. However, during the execution of the preset obstacle avoidance strategy, the obstacle is usually located below the self-moving device, making it difficult to determine whether the self-moving device has crossed the obstacle using sensors.
[0059] For example, in the obstacle avoidance method for a self-moving device provided in this application embodiment, the distance information detected by the sensor is combined with the movement distance recorded by the self-moving device itself to calculate the relative position information between the self-moving device and the obstacle. It can be understood that the relative distance between the self-moving device and the obstacle can be obtained by subtracting the accumulated movement distance from the distance information at a preset time, i.e., relative position information = |distance information - movement distance|. Here, the distance information is the distance between the self-moving device and the obstacle detected by the sensor, and the distance information can be obtained through radar or a depth camera.
[0060] For example, during the movement of the self-moving device, the relative position information between the self-moving device and the obstacle gradually decreases until it reaches 0, at which point the self-moving device and the obstacle are in the same position. Subsequently, the relative position information begins to increase. When the relative position information increases to a preset value, it indicates that the self-moving device has crossed the obstacle. At this point, the preset obstacle avoidance strategy can be stopped, the position and movement speed of the operation module can be restored, and the regular preset operation strategy can continue to be executed to improve the consistency of the self-moving device's operation, such as making the lawnmower robot mow the lawn with consistent height.
[0061] For example, self-moving devices can record their own movement distance through satellite positioning modules, radar positioning modules, wheel speed sensors, etc., which will not be elaborated here.
[0062] In some embodiments, stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value includes: controlling the self-moving device to execute a preset operation strategy when the relative position information increases to a preset value, wherein the preset operation strategy includes at least: reducing the distance of the operation module relative to the preset plane.
[0063] For example, the preset operation strategy is the operation strategy of the self-moving device under normal operation conditions when it does not encounter obstacles. The preset operation strategy may include the movement speed and operation module position pre-configured in the self-moving device, or it may be the movement speed and operation module position that the user adjusts according to actual needs or the self-moving device adaptively according to the environment. There is no limitation here.
[0064] Understandably, self-moving devices perform tasks in the work area according to preset operation strategies. When they encounter preset obstacles, they execute preset obstacle avoidance strategies. After overcoming the preset obstacle avoidance strategies, they resume the execution of the preset operation strategies, thereby improving the consistency of self-moving device operations, such as making lawn mowing robots mow grass with high consistency.
[0065] In some implementations, stopping the execution of the preset obstacle avoidance strategy further includes: increasing the moving speed of the self-moving device and reducing the distance of the working module relative to the preset plane.
[0066] Taking a self-moving device as a lawnmower robot as an example, the lawnmower robot performs lawnmowing operations at a first moving speed and a first blade height. When it encounters a preset obstacle (such as a small stone), it executes a preset obstacle avoidance strategy, reducing the first moving speed to a second moving speed and increasing the first blade height to a second blade height, so that the lawnmower robot can cross the obstacle without changing its movement path and without damaging the blade. After the blade crosses the obstacle, it stops executing the preset obstacle avoidance strategy, resumes the execution of the preset operation strategy, restores the second moving speed to the first moving speed, and restores the second blade height to the first blade height.
[0067] In some implementations, obtaining the travel distance of the self-moving device during the execution of the preset obstacle avoidance strategy includes: obtaining wheel speed information of the self-moving device during the execution of the preset obstacle avoidance strategy; integrating the wheel speed information to obtain the travel distance of the self-moving device.
[0068] For example, the moving speed of the self-moving device is detected in real time using a wheel speed sensor mounted on the self-moving device. It is understood that integrating the wheel speed information of the self-moving device can yield the distance traveled.
[0069] For example, the movement distance calculated by the self-moving device can also be corrected by combining the movement distance information output by the satellite positioning module and the radar positioning module, which will not be elaborated here.
[0070] In some embodiments, the method further includes: adjusting the movement path of the self-moving device based on the obstacle information when the obstacle attribute does not belong to a preset obstacle.
[0071] For example, if the obstacle encountered by the self-moving device during its movement along the preset path is not a preset obstacle, but a high-risk obstacle such as a metal block, or a large obstacle, then it is necessary to change the movement path to avoid colliding with the obstacle, such as turning around or performing obstacle avoidance along the edge of the obstacle.
[0072] Please refer to Figure 4, which is a flowchart of the steps of an obstacle avoidance method for a self-moving device provided in another embodiment of this application.
[0073] As shown in Figure 4, in some embodiments, the method further includes: step S201, determining the scene type corresponding to the work area based on the frequency of occurrence of the obstacle information in the environmental information; step S202, determining the preset operation strategy corresponding to the work area based on the scene type.
[0074] For example, the moving speed of the self-moving device and the distance of the working module relative to the preset plane are determined according to the scenario in which the self-moving device is located. Taking a lawnmower robot as an example, the moving speed and blade height of the lawnmower robot may differ when performing lawnmower operations in a lawn or orchard. Therefore, preset working strategies corresponding to different scenario types can be preset. The preset working strategies are at least used to indicate the moving speed of the self-moving device and the distance of the working module relative to the preset plane.
[0075] For example, the scene type of the work area can be determined by environmental information collected by the mobile device. Specifically, it can be determined based on the frequency of obstacle information in the environmental information. For instance, in a lawn scene, the work area is mainly composed of relatively low-lying vegetation, which usually does not constitute obstacles, resulting in fewer obstacle information in the environmental information and a lower frequency of obstacle information occurrence. In contrast, in an orchard scene, the work area is distributed with fruit trees of a certain height, constituting obstacle information in the environmental information, and the frequency of obstacle information occurrence is higher. Therefore, different lawn mowing scenes, such as lawns and orchards, can be distinguished by the frequency of obstacle information occurrence.
[0076] For example, when executing different preset work strategies, the preset obstacle avoidance strategies adopted when encountering preset obstacles can be different. Specifically, the correspondence between preset work strategies and preset obstacle avoidance strategies can be preset. Assuming that the lawn corresponds to the first preset work strategy and the orchard corresponds to the second preset work strategy, the preset obstacle avoidance strategies corresponding to the first and second work strategies can be different; for example, the first obstacle avoidance strategy corresponding to the first work strategy includes reducing the movement speed by 50%, while the second obstacle avoidance strategy corresponding to the second work strategy includes reducing the movement speed by 60%.
[0077] For example, by setting preset working strategies corresponding to different scenario types and preset obstacle avoidance strategies corresponding to different preset working strategies, the flexibility of controlling self-moving devices is improved.
[0078] The obstacle avoidance method for self-moving devices provided in this application involves controlling the self-moving device to collect environmental information of the working area during operation. If obstacle information exists in the environmental information, the method determines the corresponding obstacle attribute based on the obstacle information. If the obstacle attribute belongs to a preset obstacle, a preset obstacle avoidance strategy corresponding to the obstacle information is executed until the distance information of the obstacle meets a preset condition. The preset obstacle avoidance strategy includes at least increasing the distance of the working module relative to the preset plane. By increasing the height of the working module when encountering an obstacle, damage to the working module is avoided, and the operation of the self-moving device is prevented while avoiding obstacles.
[0079] The methods of this application can be used in a wide variety of general-purpose or special-purpose computing system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0080] For example, the above method can be implemented as a computer program that can run on a self-moving device as shown in Figure 5.
[0081] Please refer to Figure 5, which is a schematic diagram of the structure of a self-moving device provided in an embodiment of this application. This self-moving device can be a lawnmower robot, a sweeping robot, etc.
[0082] As shown in Figure 5, the self-moving device includes an operation module 110, a walking module 120, a data acquisition module 130, and a control module (not shown). The operation module 110 performs operations near a preset plane during the movement of the self-moving device. If the self-moving device is a lawnmower robot, the operation module 110 can be a blade; if the self-moving device is a sweeping robot, the operation module 110 can be a sweeping brush. The walking module 120 drives the self-moving device, providing mobility, and includes, for example, a motor and a set of wheels driven by the motor. The data acquisition module 130 collects environmental information about the working area of the self-moving device, including, for example, a camera and a LiDAR sensor. The control module includes a processor, a memory, and a network interface connected via a system bus. The memory may include a storage medium and internal memory.
[0083] The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any obstacle avoidance method for the self-moving device.
[0084] The processor provides computing and control capabilities to support the operation of the entire self-moving device.
[0085] Internal memory provides an environment for the execution of computer programs stored in the storage medium. When the computer program is executed by the processor, it enables the processor to perform any obstacle avoidance method for the self-moving device.
[0086] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that the structure shown in Figure 5 does not constitute a limitation on the self-moving device to which the present application solution is applied. A specific self-moving device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0087] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0088] In one embodiment, the processor is configured to run a computer program stored in a memory to perform the following steps: during the operation of the self-moving device, controlling the self-moving device to collect environmental information of the working area; if obstacle information exists in the environmental information, determining the corresponding obstacle attribute based on the obstacle information; if the obstacle attribute belongs to a preset obstacle, executing a preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets a preset condition, wherein the preset obstacle avoidance strategy includes at least: increasing the distance of the working module relative to the preset plane.
[0089] In some implementations, executing the preset obstacle avoidance strategy corresponding to the obstacle information further includes: reducing the moving speed of the self-moving device and increasing the distance between the working module and the preset plane.
[0090] In some embodiments, the obstacle information includes: height information and size information; reducing the moving speed of the self-moving device and increasing the distance of the working module relative to the preset plane includes at least one of the following: determining the distance adjustment amount of the working module based on the height information, and increasing the distance of the working module relative to the preset plane based on the distance adjustment amount; determining the speed adjustment amount of the self-moving device based on the size information, and reducing the moving speed of the self-moving device based on the speed adjustment amount.
[0091] In some implementations, executing a preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets a preset condition includes: during the execution of the preset obstacle avoidance strategy, obtaining the movement distance of the self-moving device; calculating the relative position information of the self-moving device relative to the obstacle based on the distance information and the movement distance; and stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value.
[0092] In some embodiments, stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value includes: controlling the self-moving device to execute a preset operation strategy when the relative position information increases to a preset value, wherein the preset operation strategy includes at least: reducing the distance of the operation module relative to the preset plane.
[0093] In some implementations, obtaining the travel distance of the self-moving device during the execution of the preset obstacle avoidance strategy includes: obtaining wheel speed information of the self-moving device during the execution of the preset obstacle avoidance strategy; integrating the wheel speed information to obtain the travel distance of the self-moving device.
[0094] In some implementations, when obstacle information exists in the environmental information, determining the corresponding obstacle attribute based on the obstacle information includes: determining the height information of the obstacle based on the obstacle information; and if the height information is less than a preset height, determining the obstacle attribute as the preset obstacle.
[0095] In some embodiments, the obstacle information includes at least one of the following: image information and point cloud information; the step of determining the obstacle attribute as the preset obstacle when the height information is less than a preset height includes at least one of the following: determining the obstacle type of the obstacle based on the image information; determining the height information and size information of the obstacle based on the point cloud information when the obstacle type belongs to a preset type; and determining the obstacle attribute as the preset obstacle when the height information is less than a preset height and the size information is less than a preset size.
[0096] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the self-moving device described above can be referred to the corresponding process in the aforementioned obstacle avoidance method embodiment of the self-moving device, and will not be repeated here.
[0097] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to various embodiments of the obstacle avoidance method of the self-moving device of this application.
[0098] The computer-readable storage medium can be an internal storage unit of the self-moving device described in the foregoing embodiments, such as a hard drive 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 drive, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the self-moving device.
[0099] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0100] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0101] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An obstacle avoidance method for a self-moving device, characterized in that, The self-moving device is equipped with a work module, which is used to perform work operations near a preset plane during the movement of the self-moving device; the method includes: during the execution of the work operation by the self-moving device, controlling the self-moving device to collect environmental information of the work area; if obstacle information exists in the environmental information, determining the corresponding obstacle attribute based on the obstacle information; if the obstacle attribute belongs to a preset obstacle, executing a preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets a preset condition, wherein the preset obstacle avoidance strategy includes at least: increasing the distance of the work module relative to the preset plane.
2. The obstacle avoidance method for self-moving devices according to claim 1, characterized in that, The execution of the preset obstacle avoidance strategy corresponding to the obstacle information further includes: reducing the moving speed of the self-moving device and increasing the distance between the working module and the preset plane.
3. The obstacle avoidance method for self-moving devices according to claim 2, characterized in that, The obstacle information includes: height information and size information; reducing the moving speed of the self-moving device and increasing the distance of the working module relative to the preset plane includes at least one of the following: determining the distance adjustment amount of the working module based on the height information, and increasing the distance of the working module relative to the preset plane based on the distance adjustment amount; determining the speed adjustment amount of the self-moving device based on the size information, and reducing the moving speed of the self-moving device based on the speed adjustment amount.
4. The obstacle avoidance method for a self-moving device according to claim 1, characterized in that, The execution of the preset obstacle avoidance strategy corresponding to the obstacle information until the distance information of the obstacle meets the preset condition includes: during the execution of the preset obstacle avoidance strategy, obtaining the movement distance of the self-moving device; calculating the relative position information of the self-moving device relative to the obstacle based on the distance information and the movement distance; and stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value.
5. The obstacle avoidance method for a self-moving device according to claim 4, characterized in that, The step of stopping the execution of the preset obstacle avoidance strategy when the relative position information increases to a preset value includes: controlling the self-moving device to execute a preset operation strategy when the relative position information increases to a preset value, wherein the preset operation strategy includes at least: reducing the distance of the operation module relative to the preset plane.
6. The obstacle avoidance method for a self-moving device according to claim 4, characterized in that, The step of obtaining the movement distance of the self-moving device during the execution of the preset obstacle avoidance strategy includes: obtaining the wheel speed information of the self-moving device during the execution of the preset obstacle avoidance strategy; integrating the wheel speed information to obtain the movement distance of the self-moving device.
7. The obstacle avoidance method for a self-moving device according to any one of claims 1-6, characterized in that, When obstacle information exists in the environmental information, determining the corresponding obstacle attribute based on the obstacle information includes: determining the height information of the obstacle based on the obstacle information; and if the height information is less than a preset height, determining the obstacle attribute as the preset obstacle.
8. The obstacle avoidance method for a self-moving device according to claim 7, characterized in that, The obstacle information includes at least one of the following: image information and point cloud information; the step of determining the obstacle attribute as the preset obstacle when the height information is less than the preset height includes at least one of the following: determining the obstacle type of the obstacle based on the image information; determining the height information and size information of the obstacle based on the point cloud information when the obstacle type belongs to the preset type; and determining the obstacle attribute as the preset obstacle when the height information is less than the preset height and the size information is less than the preset size.
9. A self-moving device, characterized in that, The self-moving device is equipped with a work module, a walking module, a data acquisition module, and a control module. The work module is used to perform work operations near a preset plane during the movement of the self-moving device. The walking module is used to drive the self-moving device to move. The data acquisition module is used to acquire environmental information of the working area where the self-moving device is located. The control module includes a processor, a memory, and a computer program stored in the memory and executable by the processor. When the computer program is executed by the processor, it implements the steps of the obstacle avoidance method of the self-moving device 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, wherein when the computer program is executed by a processor, it implements the steps of the obstacle avoidance method for the self-moving device as described in any one of claims 1 to 8.