Path planning method, path planning device and computer equipment

CN116880485BActive Publication Date: 2026-10-16YOSEMITE SHANGHAI ROBOTICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310855405.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2026-10-16
Estimated Expiration
2043-07-12

AI Technical Summary

Technical Problem

[0004]鉴于上述问题,本申请实施例提供了一种路径规划方法、路径规划装置及计算机设备,克服了或者至少部分地解决了上述割草机器人在沿草坪边界进行割草工作时会导致部分区域遗漏,残留较多的草的问题

Benefits of technology

[0024] A fourth aspect of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path planning method provided in the first aspect of the present application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116880485B_ABST
    Figure CN116880485B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a path planning method, a path planning device and computer equipment, relates to the technical field of path planning, and the method comprises the following steps: controlling a mowing robot to travel at least one round along the boundary of a mowing area to obtain a plurality of position information of the mowing area; fitting processing is performed on the plurality of position information to obtain a fitting curve; polyline processing is performed on sampling points on the fitting curve to obtain a target polyline; and the target polyline is determined as a mowing path of the mowing area, so that the working efficiency of the mowing robot is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of path planning, and more particularly to a path planning method, a path planning device, and a computer device. Background Technology

[0002] With the continuous development of science and technology, intelligent robots are gradually entering users' daily lives and work, becoming people's powerful assistants.

[0003] In existing technologies, taking lawn mowing robots as an example, before mowing a lawn, the lawn needs to be planned and a mowing path needs to be established. The mowing work is carried out according to the mowing path. However, in reality, the terrain at the edge of the lawn is mostly complex and there may be obstacles. Therefore, there may be an error between the mowing path established along the lawn boundary and the actual terrain. As a result, when the lawn mowing robot mows along the lawn boundary, some areas will be missed, leaving more grass and reducing the working efficiency of the lawn mowing robot. Summary of the Invention

[0004] In view of the above problems, this application provides a path planning method, a path planning device, and a computer equipment, which overcomes or at least partially solves the problem that the above-mentioned lawn mowing robot will miss some areas and leave a lot of grass when it performs lawn mowing work along the lawn boundary.

[0005] A first aspect of this application provides a path planning method, comprising: controlling a lawnmower robot to travel at least one lap along the boundary of a lawnmower area to obtain multiple location information of the lawnmower area; performing fitting processing on the multiple location information to obtain a fitting curve; performing polyline processing on the sampling points on the fitting curve to obtain a target polyline; and determining the target polyline as the lawnmower path of the lawnmower area.

[0006] In the above scheme, controlling the lawnmower robot to travel at least one lap along the boundary of the mowing area can improve the accuracy of multiple location information of the mowing area, thereby improving the accuracy of the fitting curve obtained by fitting multiple location information. Furthermore, the sampling points on the fitting curve are processed into polygonal lines to obtain target polygonal lines. The target polygonal lines are determined as the mowing path of the mowing area, which can divide the boundary of the mowing area into multiple straight lines, enabling the lawnmower robot to work accurately along the mowing path. This avoids the problem that the lawnmower robot will miss some areas and leave a lot of grass when working along the boundary in cases where the boundary of the mowing area is complex or there are obstacles in the mowing area, thereby improving the working efficiency of the lawnmower robot.

[0007] In addition, defining the target polyline as the mowing path for the mowing area can prevent the mowing robot from moving along an invalid path during operation, thereby further improving the working efficiency of the mowing robot.

[0008] In one alternative approach, the step of performing polygonal processing on the sampling points on the fitted curve to obtain the target polygonal line includes:

[0009] Step 1: Obtain multiple sampling points on the fitted curve;

[0010] Step 2: Obtain a first set from any position of the plurality of sampling points, wherein the sampling order of the sampling points in the first set is continuous, and the initial number of sampling points in the first set is a preset number;

[0011] Step 3: Linearize the first set to obtain the first straight line;

[0012] Step 4: When the first distance between the first set and the first line is less than or equal to a preset distance, obtain the next sampling point located after the first set from the plurality of sampling points, and update the next sampling point and the first set to the first set. Repeat step 3 until all sampling points of the plurality of sampling points are straightened.

[0013] Step 5: When the first distance between the first set and the first straight line is greater than a preset distance, obtain a second set from the plurality of sampling points. The second set includes the next sampling point after the first set. The sampling order of the sampling points in the second set is continuous. The initial number of sampling points in the second set is the preset number. Update the second set to the first set. Repeat step 3 until all sampling points of the plurality of sampling points have been straightened.

[0014] In the above scheme, multiple sampling points on the fitted curve are obtained, and a first set is obtained from any position of the multiple sampling points. The first set is linearized to obtain a first straight line. By judging the relationship between the first distance between the first straight line and the first set and the preset distance, all sampling points on the fitted curve are linearized. This can improve the accuracy of the straight line obtained by each linearization process, thereby improving the accuracy of obtaining the target broken line. This avoids the problem of the lawnmower missing certain areas when performing lawnmower work and improves the working efficiency of the lawnmower.

[0015] In an alternative approach, the method further includes: determining the distance from each sampling point in the first set to the first straight line; and determining the first distance based on each of the distances.

[0016] In one alternative approach, determining the first distance based on each of the distances includes:

[0017] The sum of the squares of each of the distances is determined as the first distance;

[0018] Alternatively, the sum of each of the distances can be determined as the first distance;

[0019] Alternatively, the mean of each of the distances can be determined as the first distance.

[0020] In one alternative approach, the location information is longitude and latitude based on a world coordinate system; or, the location information is the x-coordinate and y-coordinate based on a first coordinate system, wherein the first coordinate system is a rectangular coordinate system with the initial traveling position of the lawnmower robot as the origin, the traveling direction of the lawnmower robot as the X-axis, and one lateral direction of the lawnmower robot as the Y-axis.

[0021] In one optional approach, the fitting process of the plurality of location information to obtain a fitting curve includes: using a B-spline curve algorithm or the least squares method to fit the plurality of location information to obtain the fitting curve.

[0022] A second aspect of this application provides a path planning device, comprising: a control module for controlling a lawnmower robot to travel at least one lap along the boundary of a mowing area to obtain multiple location information of the mowing area; a processing module for fitting the multiple location information to obtain a fitting curve; the processing module is further configured to perform polyline processing on the sampling points on the fitting curve to obtain a target polyline; and a determination module for determining the target polyline as the mowing path of the mowing area.

[0023] A third aspect of the present application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the path planning method provided in the first aspect of the present application.

[0024] A fourth aspect of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path planning method provided in the first aspect of the present application.

[0025] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of this application are described below. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating the path planning method provided in this application embodiment;

[0028] Figure 2 A schematic diagram illustrating the location information provided in the embodiments of this application;

[0029] Figure 3 A schematic diagram of the fitting curve provided for an embodiment of this application;

[0030] Figure 4 This is a schematic flowchart of a method for obtaining a target polyline provided in an embodiment of this application;

[0031] Figure 5 This is a schematic diagram illustrating the process of obtaining the target polyline provided in an embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the path planning device provided in the embodiments of this application;

[0033] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims and drawings of this application are intended to cover non-exclusive inclusion.

[0036] The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of the phrase "embodiment" in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0037] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists, A and B exist simultaneously, or B exists. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0038] Furthermore, the terms "first," "second," etc., in the specification and claims of this application or in the aforementioned drawings are used to distinguish different objects rather than to describe a specific order, and may explicitly or implicitly include one or more of the features.

[0039] In the description of this application, unless otherwise stated, "multiple" means two or more (including two), and similarly, "multiple groups" means two or more (including two groups).

[0040] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0041] For example, embodiments of this application provide a path planning method, a path planning device, and a computer device. Based on the fact that the movement trajectory of a lawnmower robot in the actual lawnmower process is a polyline, the lawnmower robot's mowing path can also be planned as a polyline, so that the lawnmower robot's mowing path can simulate the movement trajectory of the lawnmower robot, and can achieve accurate and complete mowing of the mowing area.

[0042] The route planning method provided in this application is executed by a computer device, or by a route planning device within the computer device. The route planning device can be implemented through a combination of software and / or hardware. For example, the route planning device can be an application (APP), a webpage, or a public account. For simplicity, this application uses a route planning device as an example for illustration.

[0043] Among them, computer equipment can be servers, desktop computers, mobile phones, tablets, laptops, wearable devices, in-vehicle equipment, or augmented reality (AR) / virtual reality (VR) devices, etc.

[0044] It should be noted that the lawnmower robot in this application embodiment can also be other devices that can move automatically along a pre-set boundary line, such as a sweeping robot, an automatic vacuum cleaner, or an automatic sweeping vehicle.

[0045] Below, in conjunction with Figure 1 The path planning method provided in the embodiments of this application will be described.

[0046] Figure 1 This is a flowchart illustrating the path planning method provided in an embodiment of this application. Figure 1 As shown, the method includes:

[0047] Step 101: Control the lawnmower robot to travel along the boundary of the mowing area at least once to obtain multiple location information of the mowing area.

[0048] The mowing area is the area where the mowing robot performs its mowing work. The mowing area can be, for example, a park lawn, a golf course, a playground, or a residential lawn.

[0049] The boundary of the mowing area is the outer edge of the mowing area. The boundary of the mowing area may include the outer boundary of the mowing area map or the boundary of obstacles within the mowing area.

[0050] In some examples, when path planning is required for a mowing area, the path planning device can control the mowing robot to travel around the boundary of the mowing area, taking into account the speed or accuracy of the mowing robot, thereby obtaining multiple location information of the mowing area.

[0051] In other examples, when path planning is required for a mowing area, considering that controlling the mowing robot to travel around the boundary of the mowing area once may miss a part of the boundary, the path planning device can control the mowing robot to travel around the boundary of the mowing area multiple times, thereby obtaining multiple location information of the mowing area, which can improve the completeness and accuracy of the obtained multiple location information of the mowing area.

[0052] Among them, multiple location information of the mowing area is used to indicate the specific location of multiple location points within the mowing area.

[0053] The path planning device can obtain multiple location information of the mowing area in various ways.

[0054] As a feasible implementation method, the path planning device controls the mowing robot to collect one location information of the mowing area at a preset time interval. When the path planning device controls the mowing robot to collect multiple times, multiple location information can be obtained.

[0055] For example, with a preset duration of 2 seconds, the path planning device controls the lawnmower robot to start from the initial position and collect one location information every 2 seconds. If the total duration is 300 seconds, the number of location information collected will be 150.

[0056] As another feasible implementation, the path planning device controls the mowing robot to collect one location information of the mowing area at preset intervals. When the path planning device controls the mowing robot to collect multiple times, multiple location information can be obtained.

[0057] For example, with a preset distance of 3 meters, the path planning device controls the lawnmower robot to start from the initial position and acquire a location information every 3 meters. If the total distance is 300 meters, the number of location information collected is 100.

[0058] In some examples, the location information is longitude and latitude based on the world coordinate system.

[0059] The path planning device can obtain location information through the following methods 11, 12 or 13.

[0060] Method 11: Install a real-time kinematic (RTK) sensor and a multi-satellite multi-frequency global navigation satellite system (GNSS) antenna on the lawnmower. The RTK sensor calculates the difference between the differential positioning data obtained by the RTK sensor and the coordinate data obtained by the multi-satellite multi-frequency GNSS antenna to obtain the positioning data of the lawnmower. The positioning data of the lawnmower is used as the location information.

[0061] Method 12: Install a Global Positioning System (GPS) on the lawnmower robot to obtain location information based on GPS.

[0062] Method 13: Obtain map information of the lawn mowing area, and obtain location information based on the map information. The map information of the lawn mowing area can be obtained through the cloud or other devices (such as map acquisition devices, map display devices, etc.).

[0063] In other examples, the location information is based on the x-coordinate and y-coordinate of a first coordinate system. This first coordinate system is a Cartesian coordinate system with the initial position of the lawnmower as the origin, the direction of travel of the lawnmower as the X-axis, and one lateral direction of the lawnmower as the Y-axis. For example, the location information of the mowing area could be... Figure 2 Point A(x) shown A yA ).

[0064] Step 102: Perform fitting processing on multiple location information to obtain a fitting curve.

[0065] In some examples, the path planning device can use the B-spline curve (B-Spline) algorithm or the least squares method to fit multiple location information to obtain a fitted curve.

[0066] by Figure 2 Taking a portion of the location information from the multiple locations of the mowing area shown as an example, the path planning device performs fitting processing on the aforementioned portion of location information to obtain a fitting curve, which is as follows: Figure 3 The solid line 1 is shown.

[0067] In the example above, the path planning device performs fitting processing on multiple location information to obtain a fitting curve, making the line obtained from multiple location information smoother, reducing the amount of computation in subsequent polyline processing, and further increasing the smoothness of the lawn mowing robot when working along the target polyline obtained from the fitting curve, thereby saving working time and improving the working efficiency of the lawn mowing robot.

[0068] In addition, the path planning device uses the B-spline curve algorithm to fit multiple positional information, resulting in a more accurate fitted curve. This leads to a more accurate target polygonal line obtained through the fitted curve, thus improving the accuracy of the lawnmower robot when mowing along the target polygonal line.

[0069] Step 103: Perform polygonization on the sampling points on the fitted curve to obtain the target polygon.

[0070] Step 104: Determine the target polyline as the mowing path for the mowing area.

[0071] Considering that the actual movement trajectory of a lawnmower robot during the mowing process is a polygonal line, the robot is more efficient and produces better mowing results when moving along a straight line than when moving along a curve. Therefore, the path planning device transforms the fitted curve into a polygonal line to obtain the target polygonal line. The lawnmower robot then uses this target polygonal line as its mowing path, avoiding missing any areas that need mowing and thus improving its efficiency. In some examples, the path planning device may use the least squares method or polynomial fitting method to transform the sampling points on the fitted curve into a polygonal line to obtain the target polygonal line.

[0072] In other examples, the path planning device can divide the sampling points on the fitted curve into multiple groups, with each group containing sampling points in a continuous sampling order, calculate the fitted line corresponding to each group of sampling points, obtain multiple fitted lines, and obtain the target polyline based on the multiple fitted lines.

[0073] The target broken line is a line composed of multiple line segments connected end to end, which allows the lawnmower robot to perform lawnmowing work along the target broken line.

[0074] In this embodiment, the path planning device improves the accuracy of multiple location information of the mowing area by controlling the mowing robot to travel at least one lap along the boundary of the mowing area. This improves the accuracy of the fitting curve obtained by fitting multiple location information. Furthermore, the sampling points on the fitting curve are processed into polylines to obtain target polylines. The target polylines are determined as the mowing path of the mowing area. This divides the boundary of the mowing area into multiple straight lines, enabling the mowing robot to work accurately along the mowing path. This avoids the problem of the mowing robot missing some areas and leaving a lot of grass when working along the boundary in cases where the boundary of the mowing area is complex or there are obstacles in the mowing area. This improves the working efficiency of the mowing robot.

[0075] In addition, defining the target polyline as the mowing path for the mowing area can prevent the mowing robot from moving along an invalid path during operation, thereby further improving the working efficiency of the mowing robot.

[0076] Figure 4 This is a schematic flowchart of a method for obtaining a target polyline provided in an embodiment of this application. Figure 4 As shown, the method includes:

[0077] Step 401: Obtain multiple sampling points on the fitted curve.

[0078] Among them, the multiple sampling points on the fitted curve are sampling points obtained by sampling the fitted curve.

[0079] In some examples, the path planning device can use the equal step size method to sample the fitted curve and obtain multiple sampling points. Specifically, sampling is performed by evenly distributing points along the direction of the fitted curve at equal step sizes, such as 5 mm, 10 mm, or 15 mm.

[0080] Step 402: Obtain a first set from any position of multiple sampling points. The sampling order of the sampling points in the first set is continuous, and the initial number of sampling points in the first set is a preset number.

[0081] The preset quantity is an integer greater than 0, such as 3, 5 or 10.

[0082] For example, with a preset quantity of 3, the path planning device acquires 3 consecutive sampling points at any position of multiple sampling points, which are then used as the first set.

[0083] In the example above, the path planning device selects a portion of the sampling points from multiple sampling points as the first set, and divides the multiple sampling points into multiple segments for polyline processing. Compared with directly performing polyline processing on all sampling points from multiple sampling points, it can improve the accuracy of the target polyline obtained from the fitted curve, thereby improving the accuracy of the lawn mowing robot in mowing along the target polyline, and further improving the working efficiency of the lawn mowing robot.

[0084] Step 403: Linearize the first set to obtain the first straight line.

[0085] In some examples, the path planning device may use methods such as least squares, gradient descent, or Gauss-Newton to linearize the first set.

[0086] Step 404: Determine whether the first distance between the first set and the first line is less than or equal to the preset distance; if yes, proceed to step 405; if no, proceed to step 406.

[0087] The first distance is used to express the relative positional relationship between the first set and the first line. The first distance can be obtained by calculating the distance between each sampling point in the first set and the first line.

[0088] The preset distance can be, for example, 0.1 mm, 0.2 mm, 0.5 mm, etc.

[0089] In the above example, by judging the relationship between the first distance and the preset distance, the path planning device can improve the accuracy of the first straight line obtained from the first set, avoid the situation where some sampling points in the first set deviate significantly from the first straight line, and thus improve the accuracy of obtaining the target polyline.

[0090] Step 405: Obtain the next sampling point after the first set from multiple sampling points, and update the next sampling point and the first set to the first set. Repeat step 403 until all sampling points of multiple sampling points have been linearized.

[0091] When the path planning device determines that the first distance between the first set and the first straight line is less than or equal to a preset distance, it adds the next sampling point located after the first set to the first set. This allows the first straight line to be obtained from more sampling points within a preset error (i.e., a preset distance). Thus, while ensuring a smaller error, a target polyline composed of fewer straight lines is obtained. Furthermore, when the lawnmower robot works along the target polyline, the time wasted by the lawnmower robot in turning direction is reduced, thereby improving the working efficiency of the lawnmower robot.

[0092] Step 406: Obtain a second set from multiple sampling points. The second set includes the next sampling point after the first set. The sampling order of the sampling points in the second set is continuous. The initial number of sampling points in the second set is a preset number. Update the second set to the first set. Repeat step 403 until all sampling points of multiple sampling points have been linearized.

[0093] In this process, when the path planning device determines that the first distance between the first set and the first straight line is greater than a preset distance, it obtains a second set, updates the second set to the first set, and performs straightening processing on the first set. This can reduce the error of the obtained first straight line, thereby improving the accuracy of the target polyline obtained from the fitted curve.

[0094] Below, in conjunction with Figure 5 Taking a set of multiple sampling points [P1, P2, P3, P4, P5, P6, P7] with a preset quantity of 3 as an example, the process of obtaining the target polyline is explained.

[0095] Figure 5 This is a schematic diagram illustrating the process of obtaining the target polyline provided in an embodiment of this application. For example... Figure 5 As shown, the path planning device determines the set [P1, P2, P3] as the first set from the set of multiple sampling points. The path planning device straightens the set [P1, P2, P3] to obtain the first straight line L79. The path planning device calculates the first distance from L79 to the set [P7, P8, P9].

[0096] At this point, the first distance from L79 to set [P7, P8, P9] is less than or equal to a preset distance. Thus, the path planning device determines set [P1, P2, P3, P4] as the first set, and performs straightening processing on set [P1, P2, P3, P4] to obtain the first straight line L14. The path planning device calculates the first distance from the first straight line L14 to set [P1, P2, P3, P4].

[0097] At this point, the first distance from the first straight line L14 to the set [P1, P2, P3, P4] is greater than a preset distance. Therefore, the path planning device determines the set [P5, P6, P7] as the second set from the set of multiple sampling points. The path planning device updates the set [P5, P6, P7] to the first set, and performs straightening processing on the set [P5, P6, P7] to obtain the first straight line L57. The path planning device calculates the first distance from the first straight line L57 to the set [P5, P6, P7].

[0098] At this point, the first distance from the first straight line L57 to the set [P5, P6, P7] is greater than the preset distance. Thus, the path planning device straightens all the sampling points in the set of multiple sampling points. Consequently, the path planning device obtains the target polyline composed of L14 and L57, which is the mowing path for the mowing area.

[0099] In this embodiment, the path planning device acquires multiple sampling points on the fitted curve, obtains a first set from any position of the multiple sampling points, performs linearization on the first set to obtain a first straight line, and performs linearization on all sampling points on the fitted curve by judging the relationship between the first distance between the first straight line and the first set and the preset distance. This improves the accuracy of the straight line obtained by each linearization process and improves the accuracy of obtaining the target polyline, thereby avoiding the problem of the lawnmower missing certain areas when performing lawnmower work and improving the working efficiency of the lawnmower.

[0100] Based on the description of the above embodiments, the path planning device can determine the distance from each sampling point in the first set to the first straight line. Therefore, the path planning device can determine a first distance based on each distance.

[0101] In some examples, the path planning device determines the first distance as the sum of the squares of each distance.

[0102] For example, if the first set includes sampling points P1, P2 and P3, and the first line is L13, then calculate the distances d1 from P1 to L13, d2 from P2 to L13 and d3 from P3 to L13 respectively, and determine the sum of the squares of d1, d2 and d3 as the first distance.

[0103] It is evident that defining the sum of the squares of each distance as the first distance makes the value of each distance larger than the value of the first distance, thus more clearly representing the distance relationship between the sampling points in the first set and the first line.

[0104] In other examples, the path planning device determines the sum of each distance as the first distance.

[0105] For example, if the first set includes sampling points P1, P2 and P3, and the first line is L13, then calculate the distances d1 from P1 to L13, d2 from P2 to L13 and d3 from P3 to L13 respectively, and determine the sum of d1, d2 and d3 as the first distance.

[0106] As can be seen, by defining the sum of each distance as the first distance, the value of each distance is larger than the value of the first distance, thus making the distance relationship between the sampling points in the first set and the first line clearer.

[0107] In other examples, the path planning device determines the mean of each distance as the first distance.

[0108] For example, if the first set includes sampling points P1, P2 and P3, and the first line is L13, then calculate the distances d1 from P1 to L13, d2 from P2 to L13 and d3 from P3 to L13 respectively, and determine the average of d1, d2 and d3 as the first distance.

[0109] It is evident that by defining the mean of each distance as the first distance, the distance relationship between the sampling points in the first set and the first line can be represented more evenly and accurately.

[0110] Figure 6 This is a schematic diagram of the path planning device provided in an embodiment of this application. Figure 6 As shown, the device includes: a control module 601, a processing module 602, and a determination module 603;

[0111] The control module 601 is used to control the lawn mowing robot to travel at least one circle along the boundary of the mowing area and obtain multiple location information of the mowing area.

[0112] Processing module 602 is used to perform fitting processing on multiple location information to obtain a fitting curve;

[0113] The processing module 602 is also used to perform polyline processing on the sampling points on the fitted curve to obtain the target polyline;

[0114] The determination module 603 is used to determine the target polyline as the mowing path of the mowing area.

[0115] It should be noted that the path planning device in this application embodiment can be used to execute the technical solutions of the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.

[0116] In some embodiments, the processing module 602 is specifically configured to perform the following steps 1 to 5:

[0117] Step 1: Obtain multiple sampling points on the fitted curve;

[0118] Step 2: Obtain the first set from any position of multiple sampling points. The sampling order of the sampling points in the first set is continuous, and the initial number of sampling points in the first set is a preset number.

[0119] Step 3: Linearize the first set to obtain the first straight line;

[0120] Step 4: When the first distance between the first set and the first line is less than or equal to the preset distance, obtain the next sampling point located after the first set from multiple sampling points, and update the next sampling point and the first set to the first set. Repeat step 3 until all sampling points of multiple sampling points are linearized.

[0121] Step 5: When the first distance between the first set and the first straight line is greater than the preset distance, obtain the second set from multiple sampling points. The second set includes the next sampling point after the first set. The sampling order of the sampling points in the second set is continuous. The initial number of sampling points in the second set is the preset number. Update the second set to the first set. Repeat step 3 until all sampling points of multiple sampling points are linearized.

[0122] In some embodiments, the processing module 602 is further configured to: determine the distance from each sampling point in the first set to the first straight line; and determine a first distance based on each distance.

[0123] In some embodiments, the processing module 602 is specifically configured to: determine the sum of squares of each distance as a first distance; or, determine the sum of each distance as a first distance; or, determine the mean of each distance as a first distance.

[0124] In some embodiments, the location information is longitude and latitude based on a world coordinate system; or, the location information is the abscissa and ordinate based on a first coordinate system, which is a rectangular coordinate system with the initial moving position of the lawnmower robot as the origin, the moving direction of the lawnmower robot as the X-axis, and one lateral direction of the lawnmower robot as the Y-axis.

[0125] In some embodiments, the processing module 602 is specifically used to: use the B-spline curve algorithm or the least squares method to fit multiple location information to obtain a fitted curve.

[0126] Figure 7 This is a schematic diagram of the structure of the computer device provided in an embodiment of this application. Figure 7 As shown, the computer device may include a processor 701 and a memory 702. The memory 702 stores a computer program. When the processor 701 executes the computer program, it implements the embodiments of this application. Figure 1 or Figure 4 The path planning method shown.

[0127] Another embodiment of this application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the embodiments of this application. Figure 1 or Figure 4 The path planning method shown.

[0128] 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 or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0129] Those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.

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

Claims

1. A path planning method, characterized in that, The method includes: Control the lawnmower robot to travel at least one lap along the boundary of the mowing area to obtain multiple location information of the mowing area; The multiple location information are fitted to obtain a fitting curve; The sampling points on the fitted curve are processed into a polygonal line to obtain the target polygonal line; The target polyline is defined as the mowing path of the mowing area; the mowing path is the trajectory of the mowing robot as it performs mowing work along the boundary of the mowing area. The step of performing polygonal processing on the sampling points on the fitted curve to obtain the target polygonal line includes: Step 1: Obtain multiple sampling points on the fitted curve; Step 2: Obtain a first set from any position of the plurality of sampling points, wherein the sampling order of the sampling points in the first set is continuous, and the initial number of sampling points in the first set is a preset number; Step 3: Linearize the first set to obtain the first straight line; Step 4: When the first distance between the first set and the first line is less than or equal to a preset distance, obtain the next sampling point located after the first set from the plurality of sampling points, and update the next sampling point and the first set to the first set. Repeat step 3 until all sampling points of the plurality of sampling points are straightened. Step 5: When the first distance between the first set and the first straight line is greater than a preset distance, obtain a second set from the plurality of sampling points. The second set includes the next sampling point after the first set. The sampling order of the sampling points in the second set is continuous. The initial number of sampling points in the second set is the preset number. Update the second set to the first set. Repeat step 3 until all sampling points of the plurality of sampling points have been straightened.

2. The path planning method according to claim 1, characterized in that, The method further includes: Determine the distance from each sampling point in the first set to the first straight line; The first distance is determined based on each of the distances.

3. The path planning method according to claim 2, characterized in that, Determining the first distance based on each of the distances includes: The sum of the squares of each of the distances is determined as the first distance; Alternatively, the sum of each of the distances can be determined as the first distance; Alternatively, the mean of each of the distances can be determined as the first distance.

4. The method according to any one of claims 1-3, characterized in that, The location information is longitude and latitude based on the world coordinate system; Alternatively, the position information may be based on the horizontal and vertical coordinates of a first coordinate system, which is a rectangular coordinate system with the initial position of the lawnmower robot as the origin, the direction of travel of the lawnmower robot as the X-axis, and one lateral direction of the lawnmower robot as the Y-axis.

5. The method according to any one of claims 1-3, characterized in that, The process of fitting the multiple location information to obtain a fitting curve includes: The B-spline curve algorithm or the least squares method is used to fit the multiple location information to obtain the fitted curve.

6. A path planning device, characterized in that, The device includes: The control module is used to control the lawnmower robot to travel at least one circle along the boundary of the mowing area and obtain multiple location information of the mowing area; The processing module is used to fit the multiple location information to obtain a fitting curve; The processing module is also used to perform polygonal processing on the sampling points on the fitted curve to obtain the target polygonal line; The determination module is used to determine the target polyline as the mowing path of the mowing area; the mowing path is the trajectory of the mowing robot as it performs mowing work along the boundary of the mowing area. Specifically, the processing module is used to execute the following steps 1 to 5: Step 1: Obtain multiple sampling points on the fitted curve; Step 2: Obtain a first set from any position of the plurality of sampling points, wherein the sampling order of the sampling points in the first set is continuous, and the initial number of sampling points in the first set is a preset number; Step 3: Linearize the first set to obtain the first straight line; Step 4: When the first distance between the first set and the first line is less than or equal to a preset distance, obtain the next sampling point located after the first set from the plurality of sampling points, and update the next sampling point and the first set to the first set. Repeat step 3 until all sampling points of the plurality of sampling points are straightened. Step 5: When the first distance between the first set and the first straight line is greater than a preset distance, obtain a second set from the plurality of sampling points. The second set includes the next sampling point after the first set. The sampling order of the sampling points in the second set is continuous. The initial number of sampling points in the second set is the preset number. Update the second set to the first set. Repeat step 3 until all sampling points of the plurality of sampling points have been straightened.

7. An electronic device, characterized in that, include: At least one memory and at least one processor; The memory is used to store computer-executable programs or instructions; The processor is used to invoke a computer-executable program or instruction in the memory, causing the electronic device to perform the path planning method according to any one of claims 1-5.

8. A path planning device, characterized in that, include: processor; The processor is configured to execute a computer-executable program or instructions in the memory, causing the path planning device to perform the path planning method according to any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer-executable program or instructions configured to perform the path planning method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Method for generating robot mower virtual boundary based on satellite positioning signal

    CN109032147A