Path planning method and device and storage medium
By determining detection points and endpoints in the self-moving device and performing path replanning, the problem of self-moving devices being unable to complete tasks within the working area due to positioning deviations is solved, thus achieving coverage of the actual area boundary.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
AI Technical Summary
When performing tasks, the self-moving device may be unable to complete all tasks within the work area due to positioning deviation or drift.
As the self-moving device moves along the working path, a detection point is determined based on the endpoint of the first path and a preset distance. If the detection point is outside the working area, the second endpoint and the third endpoint of the connecting path are determined. The path is then replanned in conjunction with the current location point to obtain the target path.
Ensure that the self-moving device can move to the actual area boundary to avoid missing work tasks near the area boundary due to positioning errors.
Smart Images

Figure CN121635291A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of self-moving devices, and particularly relates to a path planning method, device, and storage medium. Background Technology
[0002] Currently, self-moving devices are widely used. For example, they can be applied to fields such as lawnmower robots and cleaning robots. Self-moving devices bring great convenience to users.
[0003] In related technologies, self-moving devices often execute tasks according to pre-planned work paths. However, if positioning deviations or drift occur while the self-moving device is performing tasks, it will be unable to complete all tasks within the work area. Summary of the Invention
[0004] This application provides a path planning method, device, and storage medium to solve the technical problem that self-moving devices cannot complete all work tasks within their work area.
[0005] The first aspect of this application provides a path planning method applied to a self-moving device. The method includes: when the self-moving device moves along a first path in a working path, determining a detection point based on a first endpoint of the first path and a first preset distance; if the detection point is outside the working area corresponding to the working path, determining a second endpoint based on the first endpoint and a second preset distance, and determining a third endpoint based on the second endpoint and a second path in the working path connected to the first path; and replanning the working path based on the current location of the self-moving device, the second endpoint, and the third endpoint to obtain a target path.
[0006] According to an embodiment of this application, the method further includes: determining the end point of the first path as the first endpoint based on a first movement direction in which the self-moving device moves along the first path.
[0007] According to an embodiment of this application, determining the detection point based on the first endpoint of the first path and the first preset distance includes: determining the detection point based on the first endpoint, according to the first moving direction of the self-moving device along the first path and the first preset distance.
[0008] According to an embodiment of this application, before determining the second endpoint based on the first endpoint and the second preset distance, the method further includes: obtaining a grid map corresponding to the working area, the grid map including a grid coordinate system; determining the grid coordinates corresponding to the detection point based on the grid coordinate system; and determining whether the detection point is outside the working area based on the grid coordinates and the grid map.
[0009] According to an embodiment of this application, determining the second endpoint based on the first endpoint and the second preset distance includes: determining the second endpoint based on the first endpoint, according to the first movement direction of the self-moving device along the first path and the second preset distance.
[0010] According to an embodiment of this application, determining the third endpoint based on the second endpoint and the second path in the working path connected to the first path includes: determining the third endpoint based on the second endpoint, according to the second moving direction of the self-moving device along the second path connected to the first path and the distance of the second path connected to the first path.
[0011] According to an embodiment of this application, the step of replanning the working path based on the current location of the self-moving device, the second endpoint, and the third endpoint to obtain a target path includes: determining a target distance based on the distance of the first path and the second preset distance; determining a fourth endpoint based on the target distance, starting from the third endpoint; and planning a movement path from the current location to the second endpoint, a movement path from the second endpoint to the third endpoint, and a movement path from the third endpoint to the fourth endpoint, as the target path.
[0012] According to an embodiment of this application, the method further includes: if the detection point is within the working area, the working path is not replanned.
[0013] A second aspect of this application provides a path planning device operating on a self-moving device. The device includes: a determining unit, configured to determine a detection point based on a first endpoint of the first path and a first preset distance when the self-moving device moves along a first path in a working path; the determining unit is further configured to determine a second endpoint based on the first endpoint and a second preset distance if the detection point is outside the working area corresponding to the working path, and to determine a third endpoint based on the second endpoint and a second path in the working path connected to the first path; and a planning unit, configured to replan the working path based on the current position of the self-moving device, the second endpoint, and the third endpoint to obtain a target path.
[0014] A third aspect of this application provides a self-moving device, the self-moving device comprising: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions stored in the memory to implement the path planning method.
[0015] A fourth aspect of this application provides a computer-readable storage medium storing computer-readable instructions, which are executed by a processor in a self-moving device to implement the path planning method.
[0016] In several embodiments of this application, when the self-mobile device moves along a first path in the work path, a detection point is determined by the first endpoint of the first path and a first preset distance. When the detection point is outside the work area corresponding to the work path, a second endpoint is determined by the first endpoint and a second preset distance. Then, based on the second endpoint and a second path in the work path connected to the first path, a third endpoint is determined. By combining the current position of the self-mobile device, the second endpoint, and the third endpoint, the work path is replanned to obtain a target path. When the self-mobile device moves along the target path, it can ensure that the self-mobile device moves to the actual area boundary, which can avoid the self-mobile device missing work tasks near the area boundary due to positioning deviation. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the working path when the positioning information provided in this application embodiment has not shifted.
[0018] Figure 2 This is a schematic diagram of a working path when the positioning information provided in this application embodiment has been offset.
[0019] Figure 3 This is another schematic diagram of the working path when the positioning information provided in the embodiments of this application has been offset.
[0020] Figure 4 This is a flowchart of the path planning method provided in the embodiments of this application.
[0021] Figure 5 This is a schematic diagram of path replanning provided in an embodiment of this application.
[0022] Figure 6 This is another schematic diagram of path replanning provided in the embodiments of this application.
[0023] Figure 7 This is a flowchart of a path planning method provided in another embodiment of this application.
[0024] Figure 8This is a functional block diagram of the path planning device provided in the embodiments of this application.
[0025] Figure 9 This is a schematic diagram of the structure of the self-moving device that implements the path planning method provided in the embodiments of this application.
[0026] Figure 10 This is a schematic diagram of the overall structure of the lawn mowing equipment that implements the path planning method provided in the embodiments of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0029] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Unless otherwise specified, the following embodiments and features described herein can be combined with each other.
[0030] The path planning method provided in this application can be applied to one or more self-moving devices. These self-moving devices can be lawnmowers, cleaning robots, de-icing robots, and cruise robots, etc. The path planning method provided in this application can also be applied to computer devices that communicate with the self-moving devices.
[0031] Combination Figure 1 This describes how the self-moving device performs work tasks along a pre-planned work path. Different self-moving devices have different work tasks. For example, if the self-moving device is a lawnmower, the corresponding work task is weeding; if the self-moving device is a cleaning robot, the corresponding work task is cleaning.
[0032] like Figure 1As shown, when the location information of the self-moving device does not shift or drift, the boundary line of the virtual map (the boundary line identified by the self-moving device from the working area) coincides with the actual area boundary line (the physical boundary line in the real environment). Figure 1 The rectangles in the image represent the boundaries of the virtual map and / or the actual area boundaries. The work path can be... Figure 1 The bow-shaped path in the text includes the first path (such as...). Figure 1 The long side of the working path) and the second path (such as Figure 1 (The shorter side of the working path in the middle). Figure 1 The arrows indicate the direction of movement of the self-moving device along the work path. The self-moving device moves in a straight line along the first path. When the self-moving device reaches the end of the first path, it adjusts the direction of travel of the drive wheels. When the self-moving device reaches the end of the second path, it readjusts the direction of travel of the drive wheels until the self-moving device completes the movement according to the work path.
[0033] Please see Figure 2 , Figure 3 When the location information of a mobile device shifts or drifts, it will cause the boundaries of the virtual map to become blurred (e.g., ...). Figure 2 , Figure 3 The rectangle's sides (of the dashed rectangle) and the actual region boundary (such as...) Figure 2 , Figure 3 The misalignment of the rectangular edges of the solid-line rectangle prevents the self-moving device from moving to the actual area boundary, resulting in partial areas (e.g., in the actual working area) being obscured. Figure 3 The task was omitted from execution in the region inside the ellipse.
[0034] To address this, this application provides a path planning method. When a self-moving device moves along a first path in a work path, a detection point is determined using the first endpoint of the first path and a first preset distance. When the detection point is outside the work area corresponding to the work path, a second endpoint is determined using the first endpoint and a second preset distance. Then, based on the second endpoint and a second path connected to the first path in the work path, a third endpoint is determined. By combining the current location of the self-moving device, the second endpoint, and the third endpoint, the work path is replanned to obtain a target path. When the self-moving device moves along the target path, it ensures that the self-moving device moves to the actual area boundary, avoiding the self-moving device missing tasks near the area boundary due to positioning errors. For example, it can prevent lawnmowers from missing mowing opportunities.
[0035] like Figure 4The diagram shown is a flowchart of a path planning method provided in an embodiment of this application. The path planning method is applied to self-moving devices. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted. The path planning method provided in this embodiment includes the following steps.
[0036] S401, when the self-moving device moves along the first path in the working path, the detection point is determined according to the first endpoint of the first path and the first preset distance.
[0037] In at least one embodiment of this application, the work path can be planned based on the map information of the work area using a coverage planning algorithm, wherein the work area is a pre-defined area, for example, the work area is... Figure 5 The dashed rectangle. The working path can be a bow-shaped path, or a variation of a bow-shaped path. This application does not specifically limit the shape of the working path.
[0038] In at least one embodiment of this application, the self-moving device detects obstacles in real time using its own configured sensors and determines the obstacle positions within the work area. Based on the obstacle positions, the self-moving device converts the map information of the work area into a raster map, divides the raster map into multiple sub-regions based on a preset decomposition algorithm, and connects these sub-regions to obtain the work path. The raster map includes the obstacle positions. The preset decomposition algorithm includes gradient decomposition algorithms, bow-shaped decomposition algorithms, etc.
[0039] This embodiment combines the location of obstacles in the work area to transform the map information, enabling the grid map to include obstacle information. The work path can then be planned using the grid map, thus improving the rationality of the work path planning to a certain extent.
[0040] In at least one embodiment of this application, the working path includes a first path, for example, the first path may be... Figure 5 The longer side of the bow-shaped path. The self-moving device determines the end point of the first path as the first endpoint based on the first direction of movement of the self-moving device along the first path.
[0041] Wherein, if the first moving direction is the direction from the interior of the work area to the boundary of the work area (e.g., Figure 5 If the direction indicated by the middle arrow is used, then the first endpoint is the endpoint of the boundary of the adjacent region in the first path, for example, Figure 5 The first endpoints A1, C1, and E1 are shown. If the first direction of movement is from the area boundary to the interior of the work area, then the first endpoint is the endpoint in the first path that is not adjacent to the area boundary, for example, Figure 5The first endpoints B1, D1, and F1 are shown. The number of first endpoints is the same as the number of first paths. This embodiment, by combining the first direction of movement, can accurately determine the first endpoints from the first paths.
[0042] In at least one embodiment of this application, the self-moving device determines a detection point based on a first endpoint of a first path and a first preset distance, including: the self-moving device determines the detection point based on the first endpoint, according to a first moving direction of the self-moving device along the first path and the first preset distance.
[0043] The first preset distance can be determined based on a pre-set expansion coefficient in the self-moving device, where the expansion coefficient represents the safe distance between the self-moving device and the obstacle. The first preset distance is greater than or equal to the expansion coefficient; for example, if the expansion coefficient is 25 centimeters, then the first preset distance can be 30 centimeters.
[0044] Combination Figure 5 The determination of the detection point is explained as follows: For the first endpoint A1, starting from the first endpoint A1, based on the first preset distance and the first movement direction (the direction of movement from the interior of the working area to the boundary of the working area, for example, ...), Figure 5 (The direction indicated by the middle arrow) is used to determine detection point a. For the first endpoint B1, starting from the first endpoint B1, detection point b is determined based on the first preset distance and the first movement direction (the direction of movement from the boundary of the area to the interior of the working area, for example, ...). For the first endpoint C1, starting from the first endpoint C1, detection point b is determined based on the first preset distance and the first movement direction (the direction of movement from the interior of the working area to the boundary of the working area, for example, ...). Figure 5 (The direction indicated by the middle arrow) is used to determine detection point c. For the first endpoint D1, starting from the first endpoint D1, detection point d is determined based on the first preset distance and the first movement direction (the direction of movement from the boundary of the area to the interior of the working area). For the first endpoint E1, starting from the first endpoint E1, detection point d is determined based on the first preset distance and the first movement direction (the direction of movement from the interior of the working area to the boundary of the working area, for example, ...). Figure 5 (The direction indicated by the middle arrow) is used to determine the detection point e. For the first endpoint F1, the detection point f is determined based on the first preset distance and the first moving direction (the direction from the boundary of the area to the interior of the working area), taking the first endpoint F1 as the starting point.
[0045] In this embodiment, a first preset distance is set based on the coefficient of thermal expansion, and then the first endpoint is moved by the first preset distance according to the first direction of movement to obtain the detection point. This ensures that the distance between the detection point and the first endpoint is greater than or equal to the safe distance, thereby improving the rationality of the determination of the detection point.
[0046] S402, if the detection point is outside the working area corresponding to the working path, determine the second endpoint based on the first endpoint and the second preset distance, and determine the third endpoint based on the second endpoint and the second path in the working path that connects to the first path.
[0047] In at least one embodiment of this application, the mobile device acquires a grid map corresponding to the working area, the grid map including a grid coordinate system. Based on the grid coordinate system, the mobile device determines the grid coordinates corresponding to a detection point, and based on the grid coordinates and the grid map, determines whether the detection point is outside the working area.
[0048] Specifically, if the grid coordinates are outside the grid map, the detection point is determined to be outside the working area. If the grid coordinates are inside the grid map, the detection point is determined to be inside the working area. (Combined...) Figure 5 Explain the relationship between the testing points and the work area. The testing points include... Figure 5 The detection points are a, b, c, d, e, and f. Among them, detection points a, c, and e are outside the working area, while detection points b, d, and f are inside the working area.
[0049] This embodiment converts the detection point into grid coordinates using the grid coordinate system in the grid map, which ensures that the detection point and the working area are on the same dimension, thereby improving the accuracy of detecting whether the detection point is outside the working area.
[0050] In at least one embodiment of this application, the second preset distance is greater than or equal to the first preset distance. The second preset distance can be set according to the first preset distance. For example, the second preset distance can be equal to a preset multiple of the first preset distance. The preset multiple can be a positive value greater than 1. For example, if the first preset distance is 30 cm, the second preset distance can be set to 60 cm, etc.
[0051] In at least one embodiment of this application, the self-moving device determines the second endpoint based on the first endpoint and the second preset distance, including: the self-moving device determines the second endpoint based on the first endpoint, according to the first moving direction of the self-moving device along the first path and the second preset distance.
[0052] Combination Figure 5The determination of the second endpoint is as follows: Since the detection point a corresponding to the first endpoint A1 is outside the working area, the second endpoint A2 is determined based on the first moving direction and the second preset distance, using the first endpoint A1 as the starting point. Similarly, since the detection point c corresponding to the first endpoint C1 is outside the working area, the second endpoint C2 is determined based on the first moving direction and the second preset distance, using the first endpoint C1 as the starting point. Likewise, since the detection point e corresponding to the first endpoint E1 is outside the working area, the second endpoint E2 is determined based on the first moving direction and the second preset distance, using the first endpoint E1 as the starting point.
[0053] In this embodiment, when the detection point is outside the working area, the second endpoint is determined by the first endpoint and the second preset distance, which can effectively extend the end point of the first path and make the second endpoint closer to the actual area boundary.
[0054] In at least one embodiment of this application, the working path further includes a second path, for example, the second path may be... Figure 5 The shorter side of the bow-shaped path.
[0055] In at least one embodiment of this application, the self-moving device determines a third endpoint based on a second endpoint and a second path connected to the first path in the working path, including: the self-moving device determines the third endpoint based on the second endpoint, according to a second moving direction of the self-moving device along the second path connected to the first path, and the distance of the self-moving device along the second path connected to the first path.
[0056] Combination Figure 5 To explain how the third endpoint is determined, for the second endpoint A2, the first path corresponding to the second endpoint A2 is... Figure 5 The first long side of the bow-shaped path is connected to the second path, which is the short side B1. The third endpoint A3 is determined by taking the second endpoint A2 as the starting point and determining the distance of the self-moving device along the short side B1 in the second moving direction. For the second endpoint C2, the first path corresponding to the second endpoint C2 is... Figure 5 The third long side of the bow-shaped path connects to the first path, and the second path is the short side B3 corresponding to the "third long side". Taking the second endpoint C2 as the starting point, the third endpoint C3 is determined based on the second movement direction of the self-moving device along the short side B3 and the distance of the short side B3. For the second endpoint E2, the first path corresponding to the second endpoint E2 is... Figure 5 The fifth long side of the bow-shaped path is connected to the first path as the second path. The short side B5 corresponding to the "fifth long side" is then determined by taking the second endpoint E2 as the starting point and the distance of the self-moving device along the short side B5 and the second moving direction of the short side B5.
[0057] This embodiment combines the second endpoint and the second path connected to the first path to accurately determine the third endpoint, which is beneficial for replanning the work path.
[0058] S403 replans the working path based on the current location of the self-moving device, the second endpoint, and the third endpoint to obtain the target path.
[0059] In at least one embodiment of this application, the current location point can be the location of the self-moving device on the first path, for example, the current location point is... Figure 5 The location of the mobile device. The target path can include the movement path from the current location to the second endpoint, the movement path from the second endpoint to the third endpoint, and the movement path from the third endpoint to the fourth endpoint.
[0060] In at least one embodiment of this application, the self-moving device replans its working path based on its current location, a second endpoint, and a third endpoint to obtain a target path. This includes: the self-moving device determining a target distance based on the distance of a first path and a second preset distance; the self-moving device using the third endpoint as a starting point, determining a fourth endpoint based on the target distance, and planning a movement path from the current location to the second endpoint, a movement path from the second endpoint to the third endpoint, and a movement path from the third endpoint to the fourth endpoint, as the target path.
[0061] The target distance can be determined based on the distance along the first path (e.g., Figure 5 The sum of the length of the longer side of the bow-shaped path and the second preset distance is determined.
[0062] Combination Figure 5 Explain the process of determining the fourth endpoint, starting from the third endpoint A3, based on the target distance ( Figure 5 The fourth endpoint A4 is determined by the sum of the length of the longest side and the second preset distance. Since the length of each long side in the bow-shaped path is equal, the fourth endpoint A4 is in the same position as the first endpoint B1. Taking the third endpoint C3 as the starting point, based on the target distance ( Figure 5 The fourth endpoint C4 is determined by the sum of the length of the longest side and the second preset distance. Since the length of each long side in the bow-shaped path is equal, the fourth endpoint C4 is located at the same position as the first endpoint D1. Taking the third endpoint E3 as the starting point, based on the target distance ( Figure 5 The fourth endpoint E4 is determined by the sum of the length of the middle long side and the second preset distance. Since the length of each long side in the bow-shaped path is equal, the fourth endpoint E4 is in the same position as the first endpoint F1.
[0063] Combination Figure 5 , Figure 6The determination of the target path is explained. The target path includes the movement path from the current position to the second endpoint, the movement path from the second endpoint to the third endpoint, and the movement path from the third endpoint to the fourth endpoint. If the second endpoint is endpoint A2, then the third endpoint is endpoint A3, and the fourth endpoint is endpoint A4 (corresponding to the first endpoint B1). Therefore, the target path includes the movement path from the current position to endpoint A2 (which covers the area previously missed in the task execution, such as...). Figure 6 The region inside the ellipse), the movement path from endpoint A2 to endpoint A3, and the movement path from endpoint A3 to endpoint A4 (corresponding to the first endpoint B1) (already covering the areas where tasks were previously omitted, such as...). Figure 6 The region inside the ellipse). If the second endpoint is endpoint C2, then the third endpoint is endpoint C3, and the fourth endpoint is endpoint C4 (corresponding to the first endpoint D1). The target path includes the movement path from the current position to endpoint C2 (covering areas previously missed in the task execution, such as...). Figure 6 The movement path from endpoint C2 to endpoint C3, and the movement path from endpoint C3 to endpoint C4 (corresponding to the first endpoint D1) (covering areas where tasks were previously omitted, such as...) Figure 6 The region inside the ellipse). If the second endpoint is endpoint E2, then the third endpoint is endpoint E3, and the fourth endpoint is endpoint E4 (corresponding to the first endpoint F1). The target path includes the movement path from the current position to endpoint E2 (covering areas previously missed in the task execution, such as...). Figure 6 The region inside the ellipse), the movement path from endpoint E2 to endpoint E3, and the movement path from endpoint E3 to endpoint E4 (corresponding to the first endpoint F1) (already covering the areas where tasks were previously omitted, such as...). Figure 6 (The region inside the medium ellipse).
[0064] This embodiment determines the fourth endpoint by using the distance of the first path and the second preset distance, thereby improving the positioning accuracy of the fourth endpoint. Then, by combining the current location point, the second endpoint, the third endpoint, and the fourth endpoint, the working path is replanned to obtain the target path. Since the obtained target path has a certain amount of additional movement path compared to the original working path, it can reduce the number of work tasks that are missed by the self-moving device.
[0065] In another embodiment, when the self-moving device reaches the end of the first path in the target path, the self-moving device uses its own configured sensors to detect whether it has reached the actual area boundary line. If the self-moving device has not reached the actual area boundary line, the target path is used as the working path, and steps S401 to S403 are repeated.
[0066] In this embodiment, when the self-moving device reaches the end of the first path in the target path, it can detect whether the self-moving device has reached the actual area boundary line, thereby ensuring that the self-moving device can move to the actual area boundary line and thus avoiding the self-moving device from missing the execution of work tasks.
[0067] In another embodiment, the self-moving device performs a task based on a target path.
[0068] In several embodiments of this application, when the self-moving device moves along a first path in the work path, a detection point is determined by the first endpoint of the first path and a first preset distance. When the detection point is outside the work area corresponding to the work path, a second endpoint is determined by the first endpoint and a second preset distance. Then, based on the second endpoint and a second path in the work path connected to the first path, a third endpoint is determined. By combining the current position of the self-moving device, the second endpoint, and the third endpoint, the work path is replanned to obtain a target path. When the self-moving device moves along the target path, it can ensure that the self-moving device moves to the actual area boundary, which can avoid the self-moving device missing work tasks near the area boundary due to positioning deviation.
[0069] like Figure 7 The diagram shown is a flowchart of a path planning method provided in another embodiment of this application. The path planning method is applied to self-moving devices. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted. The path planning method provided in this embodiment includes the following steps.
[0070] S701, when the self-moving device moves along the first path in the working path, the detection point is determined according to the first endpoint of the first path and the first preset distance.
[0071] For details of step S701, please refer to the above text. Figure 4 The detailed description of step S401 is provided in the previous text and will not be repeated here.
[0072] S702, determine whether the detection point is outside the working area corresponding to the working path.
[0073] In at least one embodiment of this application, the method by which the self-moving device determines whether the detection point is outside the working area corresponding to the working path can be found in the relevant description in step S402 above, and will not be repeated here.
[0074] In at least one embodiment of this application, if the detection point is within the working area corresponding to the working path, step S703 is executed; if the detection point is outside the working area, step S704 is executed.
[0075] S703 does not replan the work path.
[0076] In at least one embodiment of this application, combined with Figure 5 Regarding the replanning of the work path, since the detection point b corresponding to the first endpoint B1 is inside the work area, no replanning is performed on the work path. Therefore, it is unnecessary to replan the first path corresponding to the first endpoint B1 (e.g., Figure 5 The endpoint of the second long side in the "bow-shaped" path needs to be updated. Since the detection point d corresponding to the first endpoint D1 is inside the working area, the working path is not replanned, and therefore there is no need to update the first path (e.g., the first path corresponding to the first endpoint D1) Figure 5 The endpoint of the fourth long side in the "bow-shaped" path needs to be updated. Since the detection point f corresponding to the first endpoint F1 is inside the working area, the working path is not replanned, and therefore there is no need to update the first path (e.g., the first path corresponding to the first endpoint F1) Figure 5 Update the endpoint of the sixth long side in the bow-shaped path.
[0077] S704, determine the second endpoint based on the first endpoint and the second preset distance, and determine the third endpoint based on the second endpoint and the second path in the working path that connects to the first path.
[0078] S705 replans the working path based on the current location of the self-moving device, the second endpoint, and the third endpoint to obtain the target path.
[0079] For details on steps S704-S705, please refer to the above text. Figure 4 The detailed descriptions of steps S402-S403 are not repeated here.
[0080] In several embodiments of this application, when the self-moving device moves along a first path in the work path, a detection point is determined by the first endpoint of the first path and a first preset distance. When the detection point is outside the work area corresponding to the work path, a second endpoint is determined by the first endpoint and a second preset distance. Then, based on the second endpoint and a second path in the work path connected to the first path, a third endpoint is determined. By combining the current position of the self-moving device, the second endpoint, and the third endpoint, the work path is replanned to obtain a target path. When the self-moving device moves along the target path, it can ensure that the self-moving device moves to the actual area boundary, which can avoid the self-moving device missing work tasks near the area boundary due to positioning deviation.
[0081] like Figure 8The diagram shown is a functional block diagram of the path planning device provided in an embodiment of this application. The path planning device 11 operates on a self-moving device and includes a determining unit 110, a planning unit 111, and an acquiring unit 112. The module / unit referred to in this application refers to a series of computer-readable instruction segments that can be acquired by the processor 13 and perform a fixed function, and which are stored in the memory 12.
[0082] In one embodiment, the determining unit 110 is configured to determine a detection point based on the first endpoint of the first path and a first preset distance when the self-moving device moves along the first path in the working path; the determining unit 110 is further configured to determine a second endpoint based on the first endpoint and a second preset distance if the detection point is outside the working area corresponding to the working path, and to determine a third endpoint based on the second endpoint and a second path in the working path connected to the first path; the planning unit 111 is configured to replan the working path based on the current position point of the self-moving device, the second endpoint, and the third endpoint to obtain a target path.
[0083] In one embodiment, the determining unit 110 is further configured to determine the end point of the first path as the first endpoint based on the first moving direction of the self-moving device moving along the first path.
[0084] In one embodiment, the determining unit 110 is specifically used to: determine a detection point based on a first endpoint, according to a first moving direction of the self-moving device along a first path and a first preset distance.
[0085] In one embodiment, before determining the second endpoint based on the first endpoint and the second preset distance, the acquisition unit 112 is used to acquire a grid map corresponding to the working area, the grid map including a grid coordinate system; the determination unit 110 is also used to determine the grid coordinates corresponding to the detection point based on the grid coordinate system; the determination unit 110 is also used to determine whether the detection point is outside the working area based on the grid coordinates and the grid map.
[0086] In one embodiment, the determining unit 110 is specifically used to: determine the second endpoint based on the first endpoint, according to the first moving direction of the self-moving device moving along the first path and the second preset distance.
[0087] In one embodiment, the determining unit 110 is specifically used to: determine the third endpoint based on the second endpoint, according to the second moving direction of the self-moving device along the second path connected to the first path, and the distance of the second path connected to the first path.
[0088] In one embodiment, the planning unit 111 is specifically used to: determine the target distance based on the distance of the first path and the second preset distance; determine the fourth endpoint based on the target distance, starting from the third endpoint; and plan the movement path from the current position point to the second endpoint, the movement path from the second endpoint to the third endpoint, and the movement path from the third endpoint to the fourth endpoint as the target path.
[0089] According to an embodiment of this application, the planning unit 111 is also used to not replan the working path if the detection point is within the working area.
[0090] In several embodiments of this application, when the self-moving device moves along a first path in the work path, a detection point is determined by the first endpoint of the first path and a first preset distance. When the detection point is outside the work area corresponding to the work path, a second endpoint is determined by the first endpoint and a second preset distance. Then, based on the second endpoint and a second path in the work path connected to the first path, a third endpoint is determined. By combining the current position of the self-moving device, the second endpoint, and the third endpoint, the work path is replanned to obtain a target path. When the self-moving device moves along the target path, it can ensure that the self-moving device moves to the actual area boundary, which can avoid the self-moving device missing work tasks near the area boundary due to positioning deviation.
[0091] like Figure 9 The diagram shown is another structural schematic of the self-moving device that implements the path planning method provided in this application embodiment.
[0092] In this embodiment, the self-moving device 100 includes, but is not limited to, a memory 12, a processor 13, and computer-readable instructions, such as a path planning program, stored in the memory 12 and executable on the processor 13. The self-moving device 100 also includes a sensor 14, a working mechanism 15, a power supply 16, a positioning module 17, a drive wheel 18, and a bus 19. The processor 13 is coupled to the memory 12, sensor 14, working mechanism 15, power supply 16, positioning module 17, and drive wheel 18 via the bus 19.
[0093] Those skilled in the art will understand that the schematic diagram is merely an example of the self-moving device 100 and does not constitute a limitation on the self-moving device 100. It may include more or fewer components than shown, or combine certain components, or different components. For example, the self-moving device 100 may also include input / output devices, network access devices, etc.
[0094] Processor 13 can be a Central Processing Unit (CPU), or 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. The general-purpose processor can be a microprocessor, a processor, or any conventional processor. Processor 13 is the computing core and control center of the self-moving device 100, connecting various parts of the self-moving device 100 through various interfaces and lines, and executing the operating system of the self-moving device 100, as well as various installed applications and program code.
[0095] Memory 12 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 13, and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.
[0096] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 13. Non-volatile memory can include disk storage devices and flash memory.
[0097] In other embodiments, memory 12 may be external memory and / or internal memory of the self-moving device 100. Further, memory 12 may be a physical memory, such as a memory module, a TF card (Trans-flash Card), etc.
[0098] Combination Figure 4 , Figure 7 The memory 12 stores computer-readable instructions, and the processor 13 can execute the computer-readable instructions stored in the memory 12 to achieve, for example, Figure 4 , Figure 7 The multiple processes shown are used to implement the path planning method.
[0099] Processor 13 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0100] Processor 13 provides computing and control capabilities; for example, processor 13 is used to execute computer-readable instructions stored in memory 12 to achieve the above. Figure 4 , Figure 7 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.
[0101] Sensor 14 is used to acquire information for the self-moving device 100, such as environmental information and movement information of the self-moving device 100. The environmental information can be used to determine whether the self-moving device has reached the actual area boundary line. In one embodiment of this application, sensor 14 may include one or more sensors of the type such as lidar, camera, infrared sensor, encoder, etc.
[0102] The working mechanism 15 is used to perform corresponding work tasks, such as mowing, de-icing, patrolling, sweeping, and spraying pesticides. In some embodiments of this application, the working mechanism 15 may include a motor, a transmission mechanism, and a blade disc. When the self-moving device is a lawnmower, the motor can drive the blade disc to rotate through the transmission mechanism to achieve the mowing function. The motor can also control the movement of the blades to adjust the mowing height and the mowing area.
[0103] Power source 16 is used to power the self-moving device. In one embodiment of this application, power source 13 may include any one or more power supply devices such as batteries, fuel generators, solar power modules, and wind power modules.
[0104] The positioning module 17 is used to determine the location of the self-moving device. In some embodiments of this application, the positioning module 17 may include one or more of the following types of positioning modules: Global Positioning System (GPS), inertial navigation system, real-time kinematic (RTK) carrier phase differential system, etc.
[0105] The drive wheel 18 is used to enable movement of the self-moving device. In some embodiments of this application, the drive wheel 18 can realize the movement function of the self-moving device according to the control of the processor 13. In some embodiments of this application, the drive wheel 18 may include a left drive wheel and a right drive wheel.
[0106] Bus 19 is used at least to provide a channel for communication between the memory 12, processor 13, sensor 14, working mechanism 15, power supply 16, positioning module 17, and drive wheel 18 in the self-moving device 100.
[0107] In other embodiments of this application, the self-moving device 100 may further include a collision avoidance component and a steering assembly. The collision avoidance component can be used to prevent the drive wheels 18 from colliding with obstacles in front of the self-moving device. The steering assembly can be used to adjust the driving direction of the drive wheels 18.
[0108] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the self-moving device 100. For example, the self-moving device 100 may also include a communication module. In other embodiments of this application, the self-moving device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0109] If the modules / units integrated into the self-mobile device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can also be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when executed by a processor, the computer-readable instructions can implement the steps of the various method embodiments described above.
[0110] Computer-readable instructions include computer-readable instruction code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer-readable instruction code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), and random access memory (RAM).
[0111] like Figure 10 The diagram shown is a schematic representation of the overall structure of a lawn mowing device that implements the path planning method according to an embodiment of this application.
[0112] In this application embodiment, the path planning method can be applied to lawn mowing equipment, which can be an automatic lawn mowing robot or a semi-automatic lawn mowing robot. This application does not limit the specific type of lawn mowing equipment.
[0113] In this embodiment, the lawn mowing device 200 includes a housing 21 and a walking module 22 for supporting the movement of the housing 21 (e.g., Figure 9 The system includes a drive wheel 18, a cutting module (not shown) located at the bottom of the housing 21, a control module (not shown) located inside the housing 21 for controlling the automatic operation of the walking module 22 and the automatic operation of the cutting module, and an energy module (not shown) for powering the intelligent lawnmower 200. The lawnmower 200 also includes a lidar 23 for detecting obstacles and the external environment.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0115] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0116] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0117] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0118] Furthermore, it is clear that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices can also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A path planning method characterized by, The method is applied to a self-moving device, and comprises the following steps: When the self-moving device moves along a first path in a work path, a detection point is determined according to a first endpoint of the first path and a first preset distance; If the detection point is outside a work area corresponding to the work path, a second endpoint is determined based on the first endpoint and a second preset distance, and a third endpoint is determined based on the second endpoint and a second path connected to the first path in the work path; The work path is re-planned according to a current position point of the self-moving device, the second endpoint and the third endpoint, to obtain a target path.
2. The path planning method of claim 1, wherein, The method further comprises: The endpoint of the first path is determined as the first endpoint according to a first moving direction of the self-moving device along the first path.
3. The path planning method of claim 1, wherein, The determination of the detection point according to the first endpoint and the first preset distance comprises: The detection point is determined based on the first endpoint, the first moving direction of the self-moving device along the first path and the first preset distance.
4. The path planning method of claim 1, wherein, Before the determination of the second endpoint based on the first endpoint and the second preset distance, the method further comprises: A grid map corresponding to the work area is obtained, and the grid map comprises a grid coordinate system; A grid coordinate corresponding to the detection point is determined based on the grid coordinate system; Whether the detection point is outside the work area is determined based on the grid coordinate and the grid map.
5. The path planning method of claim 1, wherein, The determination of the second endpoint based on the first endpoint and the second preset distance comprises: The second endpoint is determined based on the first endpoint, the first moving direction of the self-moving device along the first path and the second preset distance.
6. The path planning method of claim 1, wherein, The determination of the third endpoint based on the second endpoint and the second path connected to the first path in the work path comprises: The third endpoint is determined based on the second endpoint, a second moving direction of the self-moving device along the second path connected to the first path and a distance of the second path connected to the first path.
7. The path planning method of claim 1, wherein, The re-planning of the work path according to the current position point of the self-moving device, the second endpoint and the third endpoint to obtain the target path comprises: A target distance is determined according to the distance of the first path and the second preset distance; A fourth endpoint is determined according to the target distance with the third endpoint as a starting point; A moving path from the current position point to the second endpoint, a moving path from the second endpoint to the third endpoint and a moving path from the third endpoint to the fourth endpoint are planned as the target path.
8. The path planning method of claim 1, wherein, The method further comprises: If the detection point is inside the work area, the work path is not re-planned.
9. A self-moving device, characterized in that The method comprises: A memory storing computer readable instructions; and A processor executing the computer readable instructions stored in the memory to implement the path planning method according to 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, and the computer program is executed by the processor to implement the path planning method in any one of claims 1 to 8.