Obstacle-bypassing control method and autonomous moving device
By constructing obstacle maps and obstacle avoidance paths, the self-moving device maintains a minimum distance from obstacles during obstacle avoidance, solving the problem of large unworked areas around obstacles and improving work quality.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- JIANGSU DONGCHENG M&E TOOLS CO LTD
- Filing Date
- 2025-11-12
- Publication Date
- 2026-06-04
AI Technical Summary
When self-moving equipment encounters obstacles, it usually changes direction and route, resulting in a large unworked area around the obstacle, which affects the quality of work.
By constructing an obstacle map, obtaining the outline of the target obstacle, and determining the obstacle avoidance path based on this, the self-moving device can maintain a minimum distance from the obstacle during the obstacle avoidance process, ensuring no collision and increasing the working coverage area.
It increases the working coverage area around obstacles and improves the working quality of self-moving equipment.
Smart Images

Figure CN2025134300_04062026_PF_FP_ABST
Abstract
Description
An obstacle avoidance control method and a self-moving device Technical Field
[0001] This application relates to the field of machine control technology, and in particular to an obstacle avoidance control method and a self-moving device. Background Technology
[0002] Self-moving devices, such as automatic lawnmowers and automatic sweepers, are increasingly favored by users because they can automatically complete tasks such as mowing and cleaning. In related technologies, self-moving devices move according to preset routes or rules during operation. When an obstacle is detected nearby, they often change direction and route to avoid it and continue working. To ensure safe route switching, a certain gap is left between the self-moving device and the obstacle, resulting in a large unworked area around the obstacle, affecting the work quality of the self-moving device. For example, automatic lawnmowers will have a large unmowed area around obstacles, and automatic sweepers will have a large uncleaned area around obstacles. Summary of the Invention
[0003] In view of the shortcomings of the prior art, the purpose of this application is to provide an obstacle avoidance control method and a self-moving device that can improve the working coverage area around obstacles.
[0004] In a first aspect, this application provides an obstacle avoidance control method applied to a self-moving device, comprising:
[0005] Step S1: Obtain the location information of obstacles in the working area of the self-moving device, and construct an obstacle map based on the location information of the obstacles;
[0006] Step S2: Obtain the outline of the target obstacle based on the obstacle map;
[0007] Step S3: Determine the obstacle avoidance path corresponding to the obstacle based on the outline of the target obstacle. The obstacle avoidance path is a navigation route that guides the self-moving device to move around the obstacle.
[0008] Step S4: Based on the obstacle avoidance path, control the self-moving device to move around the obstacle and perform the work task;
[0009] Wherein, the minimum distance between the obstacle bypass path and the actual outline of the corresponding obstacle in the obstacle map is Dx, 0.5*P<Dx<P;
[0010] And / or, the obstacle avoidance path is configured such that, during the movement of the self-moving device around the obstacle, the minimum distance between the center of movement of the self-moving device and the obstacle is Ds, 0.5*P<Ds<P;
[0011] Wherein, P is the maximum body width of the self-moving device; the self-moving device includes two drive wheels arranged opposite each other, and the center of movement of the self-moving device is the midpoint of the line connecting the two drive wheels in the direction of their rotation center.
[0012] In one embodiment, step S4 further includes:
[0013] The obstacle avoidance navigation position is determined based on the obstacle avoidance path and the current position of the self-moving device;
[0014] Based on the obstacle avoidance navigation position, the self-moving device is guided to move from its current position to the obstacle avoidance navigation position, and then from the obstacle avoidance navigation position to the obstacle avoidance path until the obstacle avoidance condition is met;
[0015] In response to the self-moving device meeting the obstacle avoidance condition, the self-moving device is controlled to move around the obstacle and perform work tasks based on the obstacle avoidance path;
[0016] Wherein, the obstacle avoidance navigation position is a navigation point or navigation area, the obstacle avoidance navigation position is located outside the obstacle avoidance path, and the minimum distance between the obstacle avoidance navigation position and the obstacle avoidance path is greater than or equal to a first distance threshold D1;
[0017] The conditions for initiating obstacle avoidance are set based on the obstacle avoidance path.
[0018] In one embodiment, step S4 further includes:
[0019] Based on the obstacle avoidance path, a navigation anchor point is determined, and the navigation anchor point provides guidance for the self-moving device to move from the obstacle avoidance navigation position to the obstacle avoidance path;
[0020] Based on the navigation anchor point, the self-moving device is guided to move from the obstacle avoidance navigation position toward the navigation anchor point until the obstacle avoidance condition is met.
[0021] In one embodiment, the obstacle avoidance navigation location is configured as an obstacle avoidance navigation point;
[0022] Determining the obstacle avoidance navigation position based on the obstacle avoidance path and the current position of the self-moving device includes:
[0023] Obtain the corner points of the obstacle avoidance path, and determine the corresponding initial navigation point based on each corner point;
[0024] The initial navigation point that meets the preset conditions is determined as a reachable navigation point;
[0025] Based on the current location of the self-moving device, the nearest reachable navigation point to the self-moving device is determined as the obstacle avoidance navigation point;
[0026] Wherein, the initial navigation point is located on a straight line that passes through the corresponding corner point and is tangent to the obstacle avoidance path, and the initial navigation point is a first preset distance Dq from the corresponding corner point;
[0027] The preset conditions are: the minimum distance between the initial navigation point and the obstacle avoidance path is greater than or equal to the first distance threshold D1, where D1 ≤ Dq; and / or, the distance between the initial navigation point and the boundary of the obstacle map is greater than or equal to the second distance threshold D2.
[0028] In one embodiment, determining the navigation anchor point based on the obstacle avoidance path includes:
[0029] The corner point corresponding to the obstacle avoidance navigation point is determined as the navigation anchor point.
[0030] In one embodiment, step S4 further includes:
[0031] When the self-moving device reaches the obstacle avoidance navigation position, based on the direction of the navigation anchor point, the target attitude of the self-moving device is adjusted so that the self-moving device rotates to face the navigation anchor point, and then moves in a straight line towards the navigation anchor point.
[0032] In one embodiment, the obstacle avoidance start condition includes:
[0033] The distance between the self-moving device and the target navigation point is less than the third distance threshold D3;
[0034] And / or, the angle between the orientation of the self-moving device and the reference tangent passing through the target navigation point is less than a preset angle Af;
[0035] The target navigation point is set on the obstacle avoidance path to guide the self-moving device to move towards the obstacle avoidance path; the reference tangent is a straight line that passes through the target navigation point and is tangent to the obstacle avoidance path.
[0036] In one embodiment, the obstacle avoidance path is a continuous closed-loop path;
[0037] Step S4 further includes:
[0038] In response to the self-moving device meeting the obstacle avoidance condition, the self-moving device is controlled to move around the obstacle and perform a work task based on the obstacle avoidance path. At the same time, motion closed-loop detection is initiated to detect whether the motion path forms a closed loop.
[0039] Based on the motion closed-loop detection, the movement path of the self-moving device is detected to form a closed loop, and the self-moving device is controlled to stop moving around the obstacle.
[0040] In one embodiment, step S3 further includes:
[0041] At least a portion of the concave profile on the target obstacle contour that points inward toward the obstacle is converted into a non-concave profile to generate an obstacle bypass path.
[0042] In one embodiment, the step of converting at least a portion of the concave profile of the target obstacle contour toward the interior of the obstacle into a non-concave profile is configured as follows:
[0043] The target obstacle contour is transformed by convex hull transformation, converting the concave contours in the target obstacle contour toward the inside of the obstacle into the shape of a convex hull to generate the obstacle bypass path.
[0044] In one embodiment, step S1 further includes:
[0045] Construct a grid map corresponding to the working area of the self-moving device, and set an obstacle probability value to characterize the possibility of obstacles in each grid in the grid map;
[0046] The self-moving device moves within the working area, acquires obstacle location information in the grid map, and maps it to the corresponding grid.
[0047] Based on the obstacle location information obtained by the self-mobile device at different locations, the obstacle probability value of each grid is continuously updated; when the self-mobile device finds an obstacle in a certain grid at a new location, the obstacle probability value of that grid is increased by a preset value.
[0048] When the obstacle probability value of the grid is greater than or equal to a preset probability threshold K, the grid is marked as an obstacle grid;
[0049] The obstacle map is constructed based on whether each grid cell in the grid map is an obstacle grid cell.
[0050] In one embodiment, step S1 further includes:
[0051] The obstacle grid is marked with a first color; the area traversed by the self-moving device is marked as a movable area and marked with a second color; the other areas of the grid map are marked with a third color; thus, the obstacle map is obtained.
[0052] Step S2 further includes:
[0053] The obstacle map, which has been marked with colors, is binarized to convert the movable area and the other areas into the same color, while the obstacle grid is converted into a different color from the movable area and the other areas.
[0054] In one embodiment, step S2 further includes:
[0055] The obstacle map is inflated to filter out narrow passage areas that the self-moving device cannot pass through;
[0056] The obstacle map that has undergone the dilation process is then subjected to erosion to reduce the obstacle boundaries and obtain the obstacle region.
[0057] Based on the obstacle map that has undergone the erosion process, the outline of the obstacle region is extracted, and the outline of the target obstacle is obtained based on the extracted obstacle outline.
[0058] In one embodiment, step S2 further includes:
[0059] In the obstacle map, determine the working boundary corresponding to the working area of the self-moving device;
[0060] The obstacle region is contour extracted to obtain several obstacle contours;
[0061] Remove the obstacle contours from the plurality of obstacle contours that are less than the fourth distance threshold D4 from the working boundary to obtain the target obstacle contour.
[0062] In one embodiment, the target obstacle profile includes a plurality of obstacle profiles corresponding to a plurality of said obstacles;
[0063] Multiple obstacle avoidance paths are obtained based on the outlines of the multiple obstacles;
[0064] Based on the distance between the multiple obstacle avoidance paths and the current position of the self-moving device, the obstacle avoidance path closest to the current position of the self-moving device is selected as the current obstacle avoidance target, and the self-moving device is controlled to perform obstacle avoidance work on the current obstacle avoidance target.
[0065] After the self-moving device completes the obstacle avoidance operation for the current obstacle avoidance target, it selects the obstacle avoidance path closest to the current position of the self-moving device as the next obstacle avoidance target, and controls the self-moving device to perform the obstacle avoidance operation for the next obstacle avoidance target; until the obstacle avoidance operation for all obstacle avoidance paths is completed.
[0066] The obstacle avoidance work involves moving around the obstacle corresponding to the obstacle avoidance path and performing work tasks.
[0067] In one embodiment, step S4 further includes:
[0068] Collision detection is performed as the self-moving device moves around the obstacle;
[0069] In response to a collision being detected in a first preset area, the movement of the self-moving device around the obstacle is terminated.
[0070] In response to a collision detected in a second preset area, the self-moving device is controlled to move backward and then forward. If a collision is still detected, the movement of the self-moving device around the obstacle is terminated.
[0071] Wherein, the distance from the first preset area to the obstacle is greater than the distance from the second preset area to the obstacle.
[0072] In one embodiment, the self-moving device is configured as an automatic lawnmower, which includes a mowing module and a moving module;
[0073] Step S4 is further configured as follows: based on the obstacle avoidance path, the movement module of the automatic lawnmower is controlled to move the automatic lawnmower around the obstacle, and the mowing module is controlled to perform the mowing task while the automatic lawnmower moves around the obstacle.
[0074] Secondly, this application provides an obstacle avoidance control method applied to self-moving devices, including:
[0075] Step S01: Obtain the location information of obstacles in the working area of the self-moving device, and construct an obstacle map based on the location information of the obstacles;
[0076] Step S02: Obtain the outline of the target obstacle based on the obstacle map;
[0077] Step S03: Convert at least a portion of the concave contour on the target obstacle profile toward the interior of the obstacle into a non-concave contour to generate an obstacle avoidance path, which is used as a navigation route to guide the self-moving device to move around the obstacle.
[0078] Step S04: Based on the obstacle avoidance path, control the self-moving device to move around the obstacle and perform work tasks.
[0079] In one embodiment, step S03 is further configured as follows:
[0080] The target obstacle contour is transformed by convex hull transformation, converting the concave contours in the target obstacle contour toward the inside of the obstacle into the shape of a convex hull to generate the obstacle bypass path.
[0081] Thirdly, this application provides a self-moving device, comprising:
[0082] The mobility module is used to move the self-moving device.
[0083] The work module is used to perform work tasks;
[0084] The control module is used to control the operation of the moving module and the working module;
[0085] The self-moving device is characterized in that it further includes:
[0086] The sensing module is used to sense the location information of obstacles around the self-moving device;
[0087] A positioning module is used to obtain the current location information of the self-moving device;
[0088] The control module is configured as follows:
[0089] Obtain the location information of the obstacles in the working area of the self-moving device, and construct an obstacle map based on the location information of the obstacles;
[0090] Obtain the outline of the target obstacle based on the obstacle map;
[0091] Based on the outline of the target obstacle, a bypass path corresponding to the obstacle is determined, and the bypass path is a navigation route that guides the self-moving device to move around the obstacle;
[0092] Based on the obstacle avoidance path, the self-moving device is controlled to move around the obstacle and perform work tasks;
[0093] Wherein, the minimum distance between the obstacle bypass path and the actual outline of the corresponding obstacle in the obstacle map is Dx, 0.5*P<Dx<P;
[0094] And / or, the obstacle avoidance path is configured such that, during the movement of the self-moving device around the obstacle, the minimum distance between the center of movement of the self-moving device and the obstacle is Ds, 0.5*P<Ds<P;
[0095] Wherein, P is the maximum body width of the self-moving device; the self-moving device includes two drive wheels arranged opposite each other, and the center of movement of the self-moving device is the midpoint of the line connecting the two drive wheels in the direction of their rotation center.
[0096] Compared with the prior art, this application has the following beneficial effects: it can increase the working coverage area around obstacles and improve the working quality of self-moving equipment. Attached Figure Description
[0097] Figure 1 is a flowchart of an obstacle avoidance control method according to an embodiment of this application;
[0098] Figure 2 is a three-dimensional structural diagram of a self-moving device according to an embodiment of this application;
[0099] Figure 3 is a schematic diagram of the self-moving device shown in Figure 2 from a bottom view.
[0100] Figure 4 is a schematic diagram of the current position of the self-moving device relative to the obstacle avoidance path in one embodiment of this application;
[0101] Figure 5 is a schematic diagram of the state of the self-mobile device moving to the obstacle avoidance navigation point position in the embodiment shown in Figure 4;
[0102] Figure 6 is a schematic diagram of the self-mobile device adjusting its posture to face the navigation anchor point in the embodiment shown in Figure 4.
[0103] Figure 7 is a schematic diagram of the state of the self-mobile device moving to a position that meets the obstacle avoidance start condition in the embodiment shown in Figure 4;
[0104] Figure 8 is a schematic diagram of the state of the self-moving device in the embodiment shown in Figure 4 during the process of moving around an obstacle;
[0105] Figure 9 is a schematic diagram of the state of the self-moving device in the embodiment shown in Figure 4 when the movement forms a closed loop.
[0106] Figure 10 is an obstacle map generated by an obstacle avoidance control method according to an embodiment of this application;
[0107] Figure 11 shows the obstacle map shown in Figure 10 after binarization.
[0108] Figure 12 is a map obtained after the map shown in Figure 11 has undergone dilation and erosion processing;
[0109] Figure 13 shows the working boundary obtained based on the obstacle map shown in Figure 10;
[0110] Figure 14 shows the obstacle outlines extracted from the map shown in Figure 12;
[0111] Figure 15 shows the target obstacle outline obtained by removing the obstacle outline near the working boundary based on the map shown in Figure 14;
[0112] Figure 16 shows the obstacle bypass path obtained by transforming the map shown in Figure 15 using a convex hull.
[0113] Figure 17 is a schematic diagram of constructing corner points, initial navigation points, and reachable navigation points based on the obstacle avoidance path shown in Figure 16.
[0114] Figure 18 is a flowchart of an obstacle avoidance control method according to another embodiment of this application;
[0115] Figure 19 is a schematic circuit block diagram of a self-moving device according to an embodiment of this application;
[0116] Figure 20 is a schematic circuit diagram of a lawnmower obstacle-avoiding cutting system according to an embodiment of this application. Detailed Implementation
[0117] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the application. For example, terms such as "upper," "lower," "front," and "rear" that indicate orientation or positional relationship are based solely on the orientation or positional relationship shown in the accompanying drawings and are used only for the convenience of describing the application and simplifying the description, and do not indicate or imply that the device / component referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as limiting the application.
[0118] In related technologies, self-moving devices move according to preset routes or rules during operation. When an obstacle is detected nearby, the device often changes direction and route to avoid it and continue working. To ensure safe route switching, a gap is left between the self-moving device and the obstacle, resulting in a large uncut area around the obstacle, affecting the working quality of the device. Taking an automatic lawnmower as an example, during mowing, it can cut along a "bow"-shaped path. When it detects an obstacle, it changes direction and route. At this time, there is a certain distance between the lawnmower and the obstacle. Furthermore, the cutting disc is usually installed closer to the rear of the lawnmower's direction of movement, resulting in a large distance between the cutting disc and the obstacle. Therefore, a large uncut area exists around the obstacle.
[0119] To address the aforementioned problems, referring to Figure 1, one embodiment of this application provides an obstacle avoidance control method applied to a self-moving device 100. The obstacle avoidance control method includes:
[0120] Step S1: Obtain the location information of obstacles in the working area of the mobile device 100, and construct an obstacle map based on the location information of the obstacles;
[0121] Step S2: Obtain the outline of the target obstacle (also known as the obstacle profile) based on the obstacle map;
[0122] Step S3: Determine the obstacle avoidance path (also known as the obstacle avoidance basic contour) corresponding to the target obstacle contour. The obstacle avoidance path is the navigation route that guides the self-moving device to move around the obstacle.
[0123] Step S4: Control the self-moving device to move around obstacles and perform work tasks based on the obstacle avoidance path.
[0124] The self-moving device 100 can be an automatic lawnmower, automatic snowplow, automatic sweeper, automatic mop, automatic vacuum cleaner, or other automatic working equipment. The obstacle avoidance control method of this application will be explained below using an automatic lawnmower as an example.
[0125] In some embodiments, the minimum distance between the obstacle avoidance path and the actual outline of the corresponding obstacle in the obstacle map is Dx, 0.5*P<Dx<P; where P is the maximum body width of the self-moving device (also known as the body width).
[0126] It should be noted that the minimum distance between the obstacle avoidance path and the actual outline of the corresponding obstacle in the obstacle map is Dx, where 0.5*P < Dx < P. This should be understood as: the minimum distance from any point on the obstacle avoidance path to the actual outline of the corresponding obstacle in the obstacle map is greater than 0.5*P and less than P. Referring to Figures 2 and 3, the self-moving device 100 includes a length extension direction L and a width extension direction W. The maximum body width P of the self-moving device is the distance between the first plane P1 and the second plane P2, which are perpendicular to the width extension direction W of the self-moving device 100 and respectively abut against the two sides of the self-moving device 100 in the width direction W. The obstacle is a static obstacle.
[0127] It is understandable that if the distance between the obstacle avoidance path and the actual outline of the obstacle in the obstacle map is greater than half the maximum body width P of the self-moving device, it can ensure that the self-moving device will not collide with the obstacle during the movement around the obstacle. On the other hand, if the distance between the obstacle avoidance path and the actual outline of the obstacle in the obstacle map is less than the maximum body width P of the self-moving device, it can ensure that the self-moving device always maintains a small gap with the obstacle during the movement around the obstacle, so as to improve the working coverage area around the obstacle.
[0128] In a specific example, the maximum width P of the self-moving device is 40cm, and the minimum distance Dx between the obstacle avoidance path and the actual outline of the obstacle on the obstacle map can be configured to be 20-40cm. In this case, when the self-moving device moves around the obstacle, the distance between the outer side of the self-moving device and the obstacle is 0-20cm. Preferably, the minimum distance Dx between the obstacle avoidance path and the actual outline of the obstacle on the obstacle map is configured to be 30cm, so that the distance between the outer side of the self-moving device and the obstacle is 10cm. Dx can be set according to actual needs.
[0129] Furthermore, the minimum distance between the obstacle avoidance path and the actual outline of the corresponding obstacle in the obstacle map is configured as follows: 0.5*P < Dx < 0.5*P + F, 0cm < F < 20cm. Optionally, 0cm < F < 15cm. For example, Dx = 0.5*P + 10cm. It can be understood that in this embodiment, the preset fixed value F can be adjusted as needed, thereby adjusting the distance between the obstacle avoidance path and the actual outline of the corresponding obstacle in the obstacle map, which changes the distance between the outer side of the self-moving device 100 and the obstacle during the obstacle avoidance process.
[0130] In some embodiments, the obstacle avoidance path is configured such that, during the movement of the self-moving device around the obstacle, the minimum distance between the movement center of the self-moving device and the obstacle is Ds, 0.5*P<Ds<P; where P is the maximum body width of the self-moving device; the self-moving device 100 includes two drive wheels arranged opposite to each other, and the movement center of the self-moving device is the midpoint of the line connecting the two drive wheels in the direction of their rotation center.
[0131] Referring to Figures 2 and 3, the self-moving device 100 includes a first drive wheel 101 and a second drive wheel 102 arranged opposite to each other, and the movement center of the self-moving device is the midpoint C of the line connecting the first drive wheel 101 and the second drive wheel 102 in the direction of their rotation center.
[0132] It is understandable that configuring the obstacle avoidance path in this way ensures that the minimum distance between the mobile device's center of movement and the obstacle is greater than half the width P of the mobile device's body, thus preventing the mobile device from colliding with the obstacle during obstacle avoidance. Meanwhile, the minimum distance between the mobile device's center of movement and the obstacle is less than the maximum width P of the mobile device's body, ensuring that the mobile device maintains a small gap with the obstacle during obstacle avoidance, thereby increasing the working coverage area around the obstacle.
[0133] As an example, the maximum width P of the self-moving device is 40cm. Half of the width P is 20cm. The obstacle avoidance path is configured so that the distance between the movement center of the self-moving device and the obstacle is 30cm. That is, when the self-moving device moves around the obstacle, the outer edge of the self-moving device is 10cm away from the obstacle. This ensures that the self-moving device does not collide with the obstacle, while also maintaining a small gap between the self-moving device and the obstacle during movement, thus increasing the working coverage area around the obstacle.
[0134] Further, in some embodiments, referring to FIG4, step S4 further includes: determining an obstacle avoidance navigation position based on the obstacle avoidance path and the current position of the self-moving device; guiding the self-moving device to move from its current position to the obstacle avoidance navigation position based on the obstacle avoidance navigation position, and then moving from the obstacle avoidance navigation position to the obstacle avoidance path until the obstacle avoidance start condition is met; in response to the self-moving device meeting the obstacle avoidance start condition, controlling the self-moving device to move around the obstacle and perform a work task based on the obstacle avoidance path; wherein, the obstacle avoidance navigation position is a navigation point or navigation area, the obstacle avoidance navigation position is located outside the obstacle avoidance path, and the minimum distance between the obstacle avoidance navigation position and the obstacle avoidance path is greater than or equal to a first distance threshold D1; the obstacle avoidance start condition is set based on the obstacle avoidance path.
[0135] It is understandable that, since the obstacle avoidance navigation position is located outside the obstacle avoidance path and at a certain distance from it, the self-moving device has more space to travel from its current position to the obstacle avoidance navigation position compared to going directly to the obstacle avoidance path. Therefore, the self-moving device can quickly reach the obstacle avoidance navigation position from its current position, and then enter the obstacle avoidance path from there, enabling it to quickly and accurately reach the target location. This avoids the possibility of entering narrow spaces when directly navigating the obstacle avoidance path, requiring multiple replannings to reach the target location, or even getting trapped in a narrow space. This makes the self-moving device more intelligent and more efficient. Furthermore, in some embodiments, the working area of the self-moving device includes multiple obstacles, and the corresponding working map includes multiple obstacle avoidance paths corresponding to these obstacles. The minimum distance between the obstacle avoidance navigation position and the corresponding obstacle avoidance path is greater than or equal to a first distance threshold D1, and the minimum distance between the obstacle avoidance navigation position and other obstacle avoidance paths is greater than or equal to a fifth distance threshold D5. The fifth distance threshold D5 and the first distance threshold D1 may be equal or unequal. It is understood that this embodiment can prevent the self-moving device from colliding with other obstacles or entering narrow spaces.
[0136] Furthermore, in some embodiments, referring to FIG4, step S4 further includes: determining a navigation anchor point based on the obstacle avoidance path, wherein the navigation anchor point provides guidance direction for the self-moving device to move from the obstacle avoidance navigation position to the obstacle avoidance path; and guiding the self-moving device to move from the obstacle avoidance navigation position toward the navigation anchor point based on the navigation anchor point until the obstacle avoidance condition is met.
[0137] It is understandable that by setting navigation anchor points in conjunction with obstacle avoidance navigation positions, the self-moving device can be guided to quickly reach the target location, further improving the speed at which the self-moving device enters the obstacle avoidance path, making the self-moving device more intelligent and more efficient.
[0138] Referring to Figure 4, as an example, the obstacle avoidance navigation location is configured as an obstacle avoidance navigation point. Determining the obstacle avoidance navigation location based on the obstacle avoidance path and the current position of the self-moving device includes: obtaining the corner points of the obstacle avoidance path, and determining the corresponding initial navigation point based on each corner point; determining the initial navigation point that meets the preset conditions as a reachable navigation point; and determining the reachable navigation point closest to the self-moving device as the obstacle avoidance navigation point based on the current position of the self-moving device. The initial navigation point is located on a straight line passing through the corresponding corner point and tangent to the obstacle avoidance path, and the initial navigation point is at a first preset distance Dq from the corresponding corner point. The preset conditions are: the minimum distance between the initial navigation point and the obstacle avoidance path is greater than or equal to a first distance threshold D1 (also called a second preset distance), D1≤Dq; and / or, the distance between the initial navigation point and the boundary of the obstacle map is greater than or equal to a second distance threshold D2 (also called a third preset distance).
[0139] Further, 20cm ≤ Dq ≤ 80cm. For example, referring to Figure 4, the dashed box S represents the obstacle avoidance path, Z represents the obstacle area, G represents the boundary of the obstacle map, the first preset distance Dq is configured to 60cm, the first distance threshold D1 is configured to 30cm, and the second distance threshold D2 is configured to 25cm. The preset conditions are configured as follows: the minimum distance between the initial navigation point and the obstacle avoidance path is greater than or equal to 30cm, and the distance between the initial navigation point and the boundary G of the obstacle map is greater than or equal to 25cm. Obtain the corner points A1, B1, C1, and D1 of the obstacle avoidance path S. Draw tangents from each corner point A1, B1, C1, and D1 in a counter-clockwise direction. For example, if A1 and B1 are adjacent corner points, extend the line connecting A1 and B1 outwards in a counter-clockwise direction to obtain the tangent for corner point B1. Identify the points A2, B2, C2, and D2 on the tangent that are 60cm away from their corresponding corner points as initial navigation points. Specifically, A2 corresponds to corner point A1, B2 to corner point B1, C2 to corner point C1, and D2 to corner point D1. Based on preset conditions, since the distance between C2 and the boundary G of the obstacle map is less than 25cm, A2, B2, and D2 are identified as reachable navigation points. Finally, based on the current position of the self-moving device, identify the nearest reachable navigation point A2 as the obstacle avoidance navigation point. It should be noted that this distance is an absolute distance. Of course, in other embodiments, the initial navigation point can also be constructed in a clockwise direction, and there is no limitation here.
[0140] It is understandable that the obstacle avoidance paths corresponding to obstacles in Figures 4 to 6 are only schematic diagrams, intended to facilitate the explanation of the method for determining obstacle avoidance navigation points. In practical applications, the obstacle avoidance path determined based on the obstacle outline tends to make the distance between the obstacle avoidance path and the obstacle outline constant or uniformly varied by a small amplitude. For example, for the square outline obstacle shown in Figure 4, the corners of the obstacle avoidance path can be rounded or chamfered.
[0141] Further, determining navigation anchor points based on the obstacle avoidance path includes: identifying corner points corresponding to obstacle avoidance navigation points as navigation anchor points. For example, referring to Figure 4, corner point A1 corresponding to obstacle avoidance navigation point A2 is identified as a navigation anchor point.
[0142] Furthermore, step S4 also includes: when the self-moving device reaches the obstacle avoidance navigation position, based on the direction of the navigation anchor point, adjusting the target attitude of the self-moving device so that the self-moving device rotates to face the direction of the navigation anchor point, and then moves in a straight line towards the direction of the navigation anchor point.
[0143] Referring to Figures 4 to 6, in Figure 4, A2 is determined as the obstacle avoidance navigation point and A1 as the navigation anchor point based on the current position of the self-moving device. After determining the obstacle avoidance navigation point and the navigation anchor point, the self-moving device first moves from its current position to the obstacle avoidance navigation point A2, that is, from the position in Figure 4 to the position in Figure 5. Then, according to the position of the navigation anchor point A1, the target attitude of the self-moving device is adjusted so that the self-moving device rotates to face the navigation anchor point A1, that is, the self-moving device adjusts from the attitude in Figure 5 to the attitude in Figure 6. Then, it moves in a straight line towards the navigation anchor point in the attitude in Figure 6 until the obstacle avoidance condition is met. It can be understood that when the self-moving device moves, it only moves according to the determined obstacle avoidance navigation point, and does not move according to the initial navigation point or reachable navigation point.
[0144] Furthermore, in some embodiments, the obstacle avoidance conditions include: the distance between the self-moving device and the target navigation point is less than a third distance threshold D3; and / or, the angle between the orientation direction of the self-moving device and the reference tangent line passing through the target navigation point is less than a preset angle Af; wherein, the target navigation point is set on the obstacle avoidance path to guide the self-moving device to move towards the obstacle avoidance path; the reference tangent line is a straight line passing through the target navigation point and tangent to the obstacle avoidance path.
[0145] For example, the target navigation point is configured as a navigation anchor point, i.e., a corner point on the obstacle avoidance path corresponding to the obstacle avoidance navigation point; the third distance threshold D3 is configured as 5cm; the preset angle Af is configured as 15°; the obstacle avoidance start condition is configured as follows: the distance between the self-moving device and the target navigation point is less than 5cm, and the angle between the self-moving device's body orientation direction and the reference tangent line passing through the target navigation point is less than 15°. Here, the self-moving device's body orientation direction is the orientation corresponding to the self-moving device's current posture, i.e., the length extension direction of the self-moving device in its current posture; the reference tangent line passing through the target navigation point is the straight line connecting the navigation anchor point and the obstacle avoidance navigation point. It is understandable that when a self-moving device navigates based on obstacle avoidance navigation points and navigation anchor points, in one scenario, the self-moving device moves from the obstacle avoidance navigation point to the navigation anchor point along the tangential direction. However, since the movement of the self-moving device often has errors, when the obstacle avoidance condition is met, it can be considered that the self-moving device has moved to the vicinity of the obstacle avoidance path. Therefore, the self-moving device can be controlled to move around the obstacle based on the obstacle avoidance path. In another scenario, when the self-moving device moves to the vicinity of the obstacle avoidance path, there may be a small distance between it and the obstacle avoidance path. Navigation based on the obstacle avoidance path ensures that the distance between the self-moving device and the obstacle avoidance path never exceeds the preset range, which enhances the robustness of the control. The self-moving device does not have to move strictly according to the preset points and preset paths.
[0146] Furthermore, in some embodiments, the obstacle avoidance path is a continuous closed-loop path; step S4 further includes: in response to the self-moving device meeting the obstacle avoidance start condition, controlling the self-moving device to move around the obstacle and perform work tasks based on the obstacle avoidance path, and simultaneously initiating motion closed-loop detection, which is used to detect whether the motion path forms a closed loop; based on the motion closed-loop detection detecting that the motion path of the self-moving device forms a closed loop, controlling the self-moving device to end its movement around the obstacle.
[0147] It can be understood that if the movement path of the self-moving device forms a closed loop, it means that the self-moving device starts from the starting point that meets the conditions for starting obstacle avoidance, circles the obstacle once, and returns to the starting point. Referring to Figures 7 to 9, the self-moving device meets the conditions for starting obstacle avoidance at the position shown in Figure 7, and then moves and works around the obstacle based on the obstacle avoidance path. Referring to the position shown in Figure 8, finally, when it reaches the position shown in Figure 9, the movement path forms a closed loop, ending the movement around the obstacle. Taking an automatic lawnmower as an example, at this point, the automatic lawnmower has completed cutting around the obstacle once and can end the obstacle avoidance cutting task.
[0148] It should be noted that "automobile device moving around obstacles based on obstacle avoidance path" means controlling the movement of the autonomous mobile device based on the obstacle avoidance path and real-time perceived environmental information, so that the autonomous mobile device macroscopically follows the obstacle avoidance trend indicated by the obstacle avoidance path. It generally moves along the direction of the obstacle avoidance path, while allowing a controllable and reasonable deviation between its current position and the obstacle avoidance path.
[0149] Furthermore, in some embodiments, step S4 further includes: performing collision detection during the movement of the self-moving device around the obstacle; terminating the movement of the self-moving device around the obstacle in response to a collision detected in a first preset area; controlling the self-moving device to move backward and then forward in response to a collision detected in a second preset area, and terminating the movement of the self-moving device around the obstacle if a collision is still detected; wherein the distance from the first preset area to the obstacle is greater than the distance from the second preset area to the obstacle.
[0150] Specifically, the first preset area is the side of the self-moving device away from the obstacle, and the second preset area is the side of the self-moving device closer to the obstacle. Referring to the direction shown in Figure 3, the front of the self-moving device is divided into left and right areas. When the self-moving device moves clockwise around the obstacle, the left side and the front left side area of the self-moving device are defined as the first preset area, and the right side and the front right side area of the self-moving device are defined as the second preset area. It can be understood that the first preset area is the side of the self-moving device away from the obstacle, and the second preset area is the side of the self-moving device closer to the obstacle. On the side of the self-moving device closer to the obstacle, there may be tall grass, causing the detected collision to be a false trigger. Therefore, the obstacle is moved backward and then forward again to reconfirm whether the false trigger is caused by an identification error. On the side of the self-moving device away from the obstacle, there is no possibility of a false trigger, and if a collision is detected, the movement of the self-moving device around the obstacle ends. This embodiment is an anomaly handling strategy that can avoid unnecessary downtime of the self-moving device and improve work efficiency.
[0151] Furthermore, the self-moving device is configured as an automatic lawnmower, which includes a mowing module and a moving module; step S4 is further configured to: control the moving module of the automatic lawnmower to move around the obstacle based on the obstacle avoidance path, and control the mowing module to perform the mowing task while the automatic lawnmower moves around the obstacle.
[0152] In some embodiments, step S1 further includes: constructing a grid map corresponding to the working area of the self-mobile device, and setting an obstacle probability value to characterize the probability that each grid in the grid map contains an obstacle; moving the self-mobile device in the working area, acquiring obstacle location information in the grid map and mapping it to the corresponding grid; continuously updating the obstacle probability value of each grid according to the obstacle location information acquired by the self-mobile device at different locations; when the self-mobile device acquires that a grid contains an obstacle at a new location, the obstacle probability value of that grid is increased by a preset value; when the obstacle probability value of a grid is greater than or equal to a preset probability threshold K, the grid is marked as an obstacle grid; and constructing an obstacle map according to whether each grid in the grid map is an obstacle grid.
[0153] It is understood that in this embodiment, when an obstacle is detected in a certain grid, the obstacle probability value of that grid is increased by a preset value. That is, the obstacle probability value of each grid is calculated by counting. The algorithm is simple, has low computational requirements for the self-moving device, can save hardware costs, and improve work efficiency.
[0154] For example, an obstacle probability value is set to represent the probability that each grid in the grid map contains an obstacle, with the initial obstacle probability value of each grid set to 0. Based on obstacle location information obtained by the mobile device at different locations, the obstacle probability value of each grid is continuously updated. When the mobile device detects an obstacle in a grid at a new location, the obstacle probability value of that grid increases by 1. When the obstacle probability value of a grid is greater than or equal to a preset probability threshold K, the grid is marked as an obstacle grid. K can be configured to 3, 4, 5, 6, 7, 8, etc.
[0155] Specifically, the obstacle probability value for the same grid cell is detected and calculated by the mobile device using laser scanning at different locations. For example, if the mobile device detects an obstacle at a target grid cell when it moves to the first position, the obstacle probability value of that target grid cell is incremented by 1. When the mobile device moves to the second position and detects another obstacle at the same target grid cell, the obstacle probability value of that target grid cell is incremented by 1 again, and so on. When the accumulated obstacle probability value of the target grid cell reaches a preset probability threshold K (i.e., the obstacle probability value of the target grid cell is ≥ the preset probability threshold K), the target grid cell is marked as an obstacle area. It should be noted that, to avoid missed mowing due to false obstacle scanning, the area traversed by the mobile device can be marked as a movable area. If the mobile device moves to a target grid cell and does not detect an obstacle, or is able to move or pass through the target grid cell, the obstacle probability value of that target grid cell is reset to zero, and the marking of the target grid cell is restored to a movable area.
[0156] Furthermore, upon completion of movement within a preset area, if the obstacle probability value of a target grid is less than a preset probability threshold K, the movement mode within the preset area is adjusted, and the obstacle map is reconstructed. Specifically, the self-moving device performs a "bow"-shaped cutting or movement within each preset area; when an obstacle is detected, local obstacle avoidance is performed, and obstacle information is recorded in real time. During obstacle avoidance, if a position point on the next "bow"-shaped path is reached, the next "bow"-shaped path is prioritized. If the self-moving device initially scans obstacles laterally within the preset area in a "bow" shape, and upon completion of movement within the preset area, a target grid is detected that may contain an obstacle, and the obstacle probability value of that target grid is less than the preset probability threshold K, then the device moves again within the preset area to detect the obstacle, and during the rescan, it moves longitudinally within the preset area in a "bow" shape to scan for obstacles. By changing the movement mode when detecting obstacles again within the preset area, the accuracy of obstacle scanning is improved. In addition, after completing movement and scanning within the preset area, the self-moving device moves along the outer boundary of the preset area to record the map boundary.
[0157] In some embodiments, step S1 further includes: marking the obstacle grid with a first color; marking the area traversed by the mobile device as a movable area and marking it with a second color; marking other areas of the grid map with a third color; obtaining an obstacle map; step S2 further includes: performing binarization processing on the color-marked obstacle map to convert the movable area and other areas into the same color, and converting the obstacle grid into a different color from the movable area and other areas.
[0158] Binarization is an image processing technique used to convert a color or grayscale image into an image with only two possible values (usually 0 and 1, or black and white). For example, the first color is white, the second color is gray, and the third color is black. That is, obstacle grids are marked as white, movable areas are marked as gray, and other areas are marked as black, resulting in the obstacle map shown in Figure 10. After binarization, the obstacle grids in the obstacle map are white, while movable areas and other areas are black, representing non-obstacle areas. Then, isolated points in the map, i.e., scattered points caused by detection errors, are removed, resulting in the map shown in Figure 11. It can be understood that different colors can be used to distinguish different areas in the map, facilitating subsequent image processing.
[0159] The self-moving device moves within the work area, simultaneously scanning obstacles with a laser and recording their location information and movable areas, which are then mapped onto a grid map. After completing the movement and scanning of the work area, an obstacle map is generated.
[0160] In some embodiments, step S2 further includes: dilating the obstacle map to filter out narrow passage areas that the mobile device cannot pass through; eroding the dilated obstacle map to reduce the obstacle boundaries and obtain the obstacle region; extracting the outline of the obstacle region based on the eroded obstacle map, and obtaining the outline of the target obstacle based on the extracted obstacle outline.
[0161] Specifically, the binarized obstacle map is first dilated to expand the obstacle boundaries and filter out narrow passages that the mobile device cannot pass through. Then, the dilated obstacle map is eroded to shrink the obstacle boundaries and obtain the obstacle area, ensuring that subsequent obstacle avoidance paths are close to the obstacles and increasing the work coverage area around the obstacles. After dilation and erosion, the map shown in Figure 12 is obtained.
[0162] In some embodiments, step S2 further includes: determining the working boundary corresponding to the working area of the self-moving device in the obstacle map, as shown in Figure 13; extracting the contours of the obstacle area to obtain several obstacle contours, as shown in Figure 14; removing obstacle contours from the several obstacle contours that are less than the fourth distance threshold D4 from the working boundary to obtain the target obstacle contour, as shown in Figure 15.
[0163] It is understandable that removing the outline of obstacles near the work boundary eliminates the need to work around obstacles near the work boundary, thus preventing the self-moving device from driving into narrow passages or corners, or from driving out of the work boundary while moving around obstacles.
[0164] It should be noted that, in specific embodiments, obstacle contours that meet user requirements can be directly achieved through expansion and erosion processes, ensuring that the distance requirement is met between the obstacle contour and the actual obstacle contour. Alternatively, when extracting the obstacle contour, the current obstacle contour can be appropriately expanded outwards by a certain distance to ensure that the distance requirement is met. The distance requirement ensures that the minimum distance between the subsequently generated obstacle avoidance path and the actual obstacle contour is greater than 0.5*P and less than P, or that the subsequently generated obstacle avoidance path ensures that the minimum distance between the self-moving device's center of movement and the obstacle is greater than 0.5*P and less than P during the obstacle avoidance process, guaranteeing that the self-moving device will not collide with the obstacle during its movement.
[0165] In some embodiments, step S3 further includes: performing a convex hull transformation on the target obstacle contour, converting the concave contours in the target obstacle contour that extend toward the interior of the obstacle into the shape of a convex hull, so as to generate an obstacle bypass path.
[0166] It should be noted that a convex hull is a shape that encloses all given points. For a set of points on a plane, the convex hull is the smallest convex closed set of the set. For any two points in the set, the line segment connecting these two points is also completely contained within the set. Convex hull transformation can convert the indentations in the obstacle contour that extend into the obstacle into the shape of a convex hull. The target obstacle contour shown in Figure 15, after convex hull transformation, yields the contour shown in Figure 16 as the obstacle avoidance path. It can be understood that compared to the target obstacle contour in Figure 15, the obstacle avoidance path in Figure 16 achieves a smoother transition at the indentations of the contour, providing a more optimized obstacle avoidance path. This can prevent the self-moving device from getting stuck or colliding with the obstacle during its movement around the obstacle. At the same time, by converting only the indentations into a convex hull, the self-moving device can ensure smooth movement around the obstacle without excessively sacrificing the working coverage area. In addition, this embodiment also has good adaptability to irregular obstacles, improving the working quality around the obstacle and increasing the working coverage area around the obstacle. It eliminates the need for manual processing, saving labor costs and making it more intelligent.
[0167] In addition, refer to Figure 17 for a diagram showing the obstacle avoidance path obtained by obtaining corner points, determining initial navigation points, and determining reachable navigation points.
[0168] Furthermore, in some embodiments, the target obstacle contour includes multiple obstacle contours corresponding to multiple obstacles; multiple obstacle avoidance paths corresponding to multiple obstacles are obtained based on the multiple obstacle contours; based on the distance between the multiple obstacle avoidance paths and the current position of the self-moving device, the obstacle avoidance path closest to the current position of the self-moving device is selected as the current obstacle avoidance target, and the self-moving device is controlled to perform obstacle avoidance work on the current obstacle avoidance target; after the self-moving device completes the obstacle avoidance work on the current obstacle avoidance target, the obstacle avoidance path closest to the current position of the self-moving device is selected as the next obstacle avoidance target, and the self-moving device is controlled to perform obstacle avoidance work on the next obstacle avoidance target; until the obstacle avoidance work on all obstacle avoidance paths is completed; wherein, the obstacle avoidance work is moving around the obstacles corresponding to the obstacle avoidance path and performing work tasks.
[0169] When multiple obstacles exist within the working area, the self-moving device can acquire obstacle avoidance paths corresponding to multiple obstacles and perform obstacle avoidance operations sequentially. It can be understood that in this embodiment, the next obstacle avoidance target is determined based on the distance between the obstacle avoidance path and the current position of the self-moving device, until the obstacle avoidance operation for all obstacles is completed.
[0170] The obstacle avoidance control method of this application can be applied to a self-moving device that, after completing the work of the entire work area according to a preset route, sequentially performs obstacle avoidance work on obstacles in the work area; it can also be applied to a self-moving device that directly performs obstacle avoidance work on obstacles when it moves to a corresponding obstacle. Preferably, the obstacle avoidance control method of this application is applied to a self-moving device that, after completing the work of the entire work area according to a preset route, sequentially performs obstacle avoidance work on obstacles in the work area. For example, the self-moving device is an automatic lawnmower, which, after completing the cutting of the entire work area according to a "bow" shaped route, sequentially cuts around obstacles in the work area.
[0171] Referring to Figure 18, this application also provides an obstacle avoidance control method, applied to a self-moving device, including:
[0172] Step S01: Obtain the location information of obstacles in the working area of the mobile device, and construct an obstacle map based on the location information of the obstacles;
[0173] Step S02: Obtain the outline of the target obstacle based on the obstacle map;
[0174] Step S03: Convert at least a portion of the concave contour on the target obstacle profile toward the interior of the obstacle into a non-concave contour to generate an obstacle avoidance path, which is used as a navigation route to guide the self-moving device around the obstacle.
[0175] Step S04: Control the self-moving device to move around obstacles and perform work tasks based on the obstacle avoidance path.
[0176] It is understood that this embodiment provides a more optimized obstacle avoidance path by converting at least a portion of the concave contour on the target obstacle's outline towards the obstacle's interior into a non-concave contour. This prevents the self-moving device from getting stuck or colliding with the obstacle during its movement around it. Simultaneously, converting only the concave areas into convex hulls ensures smooth movement of the self-moving device around obstacles without excessively sacrificing the working coverage area. Furthermore, this embodiment exhibits good adaptability to irregular obstacles, improving the working quality around obstacles and increasing the working coverage area around obstacles. It eliminates the need for manual processing, saving labor costs and making it more intelligent.
[0177] Step S03 further includes: performing a convex hull transformation on the target obstacle contour, converting the concave contours in the target obstacle contour that extend into the obstacle into the shape of a convex hull, so as to generate an obstacle bypass path.
[0178] The obstacle avoidance control method in this embodiment can be combined with the obstacle avoidance control method in any of the foregoing embodiments, and will not be described again here.
[0179] Referring to FIG19, this application provides a self-moving device 100, including: a moving module 110 for moving the self-moving device 100; a working module 120 for performing working tasks; a control module 130 for controlling the working of the moving module 110 and the working module 120; a sensing module 140 for sensing the location information of obstacles around the self-moving device 100; a positioning module 150 for acquiring the current location information of the self-moving device 100; the control module 130 is configured to control the moving module 110 and the working module 120 based on the obstacle location information and the current location information of the self-moving device, so as to realize the obstacle avoidance control method described above.
[0180] In some embodiments, the self-moving device is an automatic lawnmower, and the moving module 110 is the self-drive module of the automatic lawnmower, including wheels and a self-drive motor for driving the wheels. The working module 120 is the mowing module, including cutting blades and a mowing motor for driving the cutting blades to rotate. The control module 130 connects to and controls the self-drive motor and the mowing motor. The sensing module 140 includes a lidar sensor. The positioning module 150 includes one or more of an RTK positioning module, a GPS module, and a BeiDou module.
[0181] This application also provides an obstacle avoidance and cutting system for a self-moving device, as shown in Figure 20, comprising: a map building module for recording obstacle positions and building an obstacle map in real time during movement; an obstacle extraction module for extracting obstacle regions from the obstacle map and extracting obstacle contours based on the obstacle regions; a transformation module for performing convex hull transformation on the obstacle contours to obtain a basic obstacle avoidance contour; and an obstacle avoidance navigation module for building obstacle avoidance navigation points based on the corner points on the basic obstacle avoidance contour and performing obstacle avoidance and cutting based on the obstacle avoidance navigation points.
[0182] It is not difficult to see that this embodiment is a device embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details mentioned in the above method embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiments.
[0183] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by this invention; however, this does not mean that other units are absent from this embodiment.
[0184] This application provides an electronic device, including a memory and a processor. The memory stores a computer program that can be executed by the processor, and when the processor executes the computer program, it implements the obstacle avoidance control method described above.
[0185] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0186] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.
[0187] This application provides a computer-readable storage medium storing processor-executable program code, the program code being configured to enable the processor to implement the obstacle avoidance control method described above when executing the program code.
[0188] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0189] In one specific embodiment, the obstacle avoidance control method is applied to a self-moving device, where the self-moving device 100 is an automatic lawnmower. The obstacle avoidance control method includes:
[0190] Step S1: Construct a grid map corresponding to the working area of the self-moving device 100, and set an obstacle probability value to represent the possibility of obstacles in each grid in the grid map;
[0191] The device moves within the work area, acquires obstacle location information from the grid map, and maps it to the corresponding grid.
[0192] Based on obstacle location information obtained by the mobile device at different locations, the obstacle probability value of each grid is continuously updated; when the mobile device finds an obstacle in a grid at a new location, the obstacle probability value of that grid is increased by a preset value; when the obstacle probability value of a grid is greater than or equal to a preset probability threshold K, the grid is marked as an obstacle grid.
[0193] Mark the obstacle grid with the first color; mark the area traversed by the mobile device as a movable area and mark it with the second color; mark the other areas of the grid map with the third color; obtain the obstacle map;
[0194] Step S2: Binarize the obstacle map that has been marked with color to convert the movable area and other areas into the same color, and convert the obstacle grid into a different color from the movable area and other areas; then remove isolated scattered points in the map.
[0195] The obstacle map, after binarization and removal of isolated scattered points, is dilated to filter out narrow passage areas that cannot be traversed by mobile devices; then the dilated obstacle map is eroded to reduce the obstacle boundaries and obtain the obstacle region.
[0196] Based on the eroded obstacle map, the contours of the obstacle region are extracted to obtain several obstacle contours;
[0197] In the obstacle map, determine the working boundary corresponding to the working area of the self-moving device; remove obstacle contours from a number of obstacle contours that are less than the fourth distance threshold D4 from the working boundary to obtain the target obstacle contour.
[0198] Step S3: Perform convex hull transformation on the target obstacle contour, converting the concave contours in the direction of the obstacle’s interior into the shape of a convex hull to generate an obstacle bypass path.
[0199] Step S4: Obtain the corner points of the obstacle avoidance path, and determine the corresponding initial navigation point based on each corner point; determine the initial navigation point that meets the preset conditions as the reachable navigation point; the initial navigation point is located on the straight line that passes through the corresponding corner point and is tangent to the obstacle avoidance path, and the initial navigation point is a first preset distance Dq from the corresponding corner point;
[0200] Initial navigation points that meet the preset conditions are identified as reachable navigation points;
[0201] Based on the current location of the self-moving device, the nearest reachable navigation point to the self-moving device is determined as the obstacle avoidance navigation point; the corner point corresponding to the obstacle avoidance navigation point is determined as the navigation anchor point;
[0202] Based on the obstacle avoidance navigation point, the self-moving device is first guided to move from its current position to the obstacle avoidance navigation point. Then, based on the direction of the navigation anchor point, the target attitude of the self-moving device is adjusted so that the self-moving device rotates to face the navigation anchor point. Then, it moves in a straight line in the direction of the navigation anchor point until the conditions for starting obstacle avoidance are met.
[0203] In response to the self-moving device meeting the obstacle avoidance conditions, the self-moving device is controlled to move around the obstacle and perform work tasks based on the obstacle avoidance path, while motion closed-loop detection is initiated.
[0204] Based on motion closed-loop detection, the movement path of the self-moving device is detected to form a closed loop, and the self-moving device is controlled to stop moving around the obstacle.
[0205] In addition, collision detection is performed during the movement of the self-moving device around the obstacle; in response to a collision detected in the first preset area, the movement of the self-moving device around the obstacle is terminated; in response to a collision detected in the second preset area, the self-moving device is controlled to move backward and then forward again; if a collision is still detected, the movement of the self-moving device around the obstacle is terminated; wherein, the distance from the first preset area to the obstacle is greater than the distance from the second preset area to the obstacle.
[0206] Any obstacle avoidance control method described in the foregoing embodiments can be applied to this embodiment as long as there is no contradiction, and will not be described again here.
[0207] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, 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 covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
Claims
1. An obstacle avoidance control method, applied to self-moving equipment, characterized in that, include: Step S1: Obtain the location information of obstacles in the working area of the self-moving device, and construct an obstacle map based on the location information of the obstacles; Step S2: Obtain the outline of the target obstacle based on the obstacle map; Step S3: Determine the obstacle avoidance path corresponding to the obstacle based on the outline of the target obstacle. The obstacle avoidance path is a navigation route that guides the self-moving device to move around the obstacle. Step S4: Based on the obstacle avoidance path, control the self-moving device to move around the obstacle and perform the work task; Wherein, the minimum distance between the obstacle bypass path and the actual outline of the corresponding obstacle in the obstacle map is Dx, 0.5*P<Dx<P; And / or, the obstacle avoidance path is configured such that, during the movement of the self-moving device around the obstacle, the minimum distance between the center of movement of the self-moving device and the obstacle is Ds, 0.5*P<Ds<P; Wherein, P is the maximum body width of the self-moving device; the self-moving device includes two drive wheels arranged opposite each other, and the center of movement of the self-moving device is the midpoint of the line connecting the two drive wheels in the direction of their rotation center.
2. The obstacle avoidance control method according to claim 1, characterized in that, Step S4 further includes: The obstacle avoidance navigation position is determined based on the obstacle avoidance path and the current position of the self-moving device; Based on the obstacle avoidance navigation position, the self-moving device is guided to move from its current position to the obstacle avoidance navigation position, and then from the obstacle avoidance navigation position to the obstacle avoidance path until the obstacle avoidance condition is met; In response to the self-moving device meeting the obstacle avoidance condition, the self-moving device is controlled to move around the obstacle and perform work tasks based on the obstacle avoidance path; Wherein, the obstacle avoidance navigation position is a navigation point or navigation area, the obstacle avoidance navigation position is located outside the obstacle avoidance path, and the minimum distance between the obstacle avoidance navigation position and the obstacle avoidance path is greater than or equal to a first distance threshold D1; The conditions for initiating obstacle avoidance are set based on the obstacle avoidance path.
3. The obstacle avoidance control method according to claim 2, characterized in that, Step S4 further includes: Based on the obstacle avoidance path, a navigation anchor point is determined, and the navigation anchor point provides guidance for the self-moving device to move from the obstacle avoidance navigation position to the obstacle avoidance path; Based on the navigation anchor point, the self-moving device is guided to move from the obstacle avoidance navigation position toward the navigation anchor point until the obstacle avoidance condition is met.
4. The obstacle avoidance control method according to claim 2 or 3, characterized in that, The conditions for initiating obstacle avoidance include: The distance between the self-moving device and the target navigation point is less than the third distance threshold D3; And / or, the angle between the orientation of the self-moving device and the reference tangent passing through the target navigation point is less than a preset angle Af; The target navigation point is set on the obstacle avoidance path to guide the self-moving device to move towards the obstacle avoidance path; the reference tangent is a straight line that passes through the target navigation point and is tangent to the obstacle avoidance path.
5. The obstacle avoidance control method according to claim 1, characterized in that, Step S3 further includes: At least a portion of the concave profile on the target obstacle contour that points inward toward the obstacle is converted into a non-concave profile to generate an obstacle bypass path.
6. The obstacle avoidance control method according to claim 1, characterized in that, Step S1 further includes: Construct a grid map corresponding to the working area of the self-moving device, and set an obstacle probability value to characterize the possibility of obstacles in each grid in the grid map; The self-moving device moves within the working area, acquires obstacle location information in the grid map, and maps it to the corresponding grid. Based on the obstacle location information obtained by the self-mobile device at different locations, the obstacle probability value of each grid is continuously updated; when the self-mobile device finds an obstacle in a certain grid at a new location, the obstacle probability value of that grid is increased by a preset value. When the obstacle probability value of the grid is greater than or equal to a preset probability threshold K, the grid is marked as an obstacle grid; The obstacle map is constructed based on whether each grid cell in the grid map is an obstacle grid cell.
7. The obstacle avoidance control method according to claim 6, characterized in that, Step S1 further includes: The obstacle grid is marked with a first color; the area traversed by the self-moving device is marked as a movable area and marked with a second color; the other areas of the grid map are marked with a third color; thus, the obstacle map is obtained. Step S2 further includes: The obstacle map, which has been marked with colors, is binarized to convert the movable area and the other areas into the same color, while the obstacle grid is converted into a different color from the movable area and the other areas.
8. An obstacle avoidance control method, applied to self-moving equipment, characterized in that, include: Step S01: Obtain the location information of obstacles in the working area of the self-moving device, and construct an obstacle map based on the location information of the obstacles; Step S02: Obtain the outline of the target obstacle based on the obstacle map; Step S03: Convert at least a portion of the concave contour on the target obstacle profile toward the interior of the obstacle into a non-concave contour to generate an obstacle avoidance path, which is used as a navigation route to guide the self-moving device to move around the obstacle. Step S04: Based on the obstacle avoidance path, control the self-moving device to move around the obstacle and perform work tasks.
9. The obstacle avoidance control method according to claim 8, characterized in that, Step S03 is further configured as follows: The target obstacle contour is transformed by convex hull transformation, converting the concave contours in the target obstacle contour toward the inside of the obstacle into the shape of a convex hull to generate the obstacle bypass path.
10. A self-moving device, characterized in that, include: The mobility module is used to move the self-moving device. The work module is used to perform work tasks; The control module is used to control the operation of the moving module and the working module; The self-moving device is characterized in that it further includes: The sensing module is used to sense the location information of obstacles around the self-moving device; A positioning module is used to obtain the current location information of the self-moving device; The control module is configured as follows: Obtain the location information of the obstacles in the working area of the self-moving device, and construct an obstacle map based on the location information of the obstacles; Obtain the outline of the target obstacle based on the obstacle map; Based on the outline of the target obstacle, a bypass path corresponding to the obstacle is determined, and the bypass path is a navigation route that guides the self-moving device to move around the obstacle; Based on the obstacle avoidance path, the self-moving device is controlled to move around the obstacle and perform work tasks; Wherein, the minimum distance between the obstacle bypass path and the actual outline of the corresponding obstacle in the obstacle map is Dx, 0.5*P<Dx<P; And / or, the obstacle avoidance path is configured such that, during the movement of the self-moving device around the obstacle, the minimum distance between the center of movement of the self-moving device and the obstacle is Ds, 0.5*P<Ds<P; Wherein, P is the maximum body width of the self-moving device; the self-moving device includes two drive wheels arranged opposite each other, and the center of movement of the self-moving device is the midpoint of the line connecting the two drive wheels in the direction of their rotation center.