Mower path tracking method, electronic device, chip and mower

WO2026016867A3PCT designated stage Publication Date: 2026-03-19YOSEMITE SHANGHAI ROBOTICS CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

Traditional path tracking algorithms lack comprehensive constraints to determine whether the fitted path is optimal, resulting in poor path tracking performance for lawnmowers.

Method used

By determining a reference path and multiple control points, B-spline curve fitting is performed. It is then determined whether the fitted curve meets multiple constraints such as smoothness, velocity, acceleration, collision, and distance from the reference path. The control points are adjusted until all constraints are met, resulting in an optimized movement path.

Benefits of technology

This improves the accuracy and safety of lawnmower path tracking, obtains a better movement path, and ensures the reliability and safety of the lawnmower during operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025105945_19032026_PF_FP_ABST
    Figure CN2025105945_19032026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a mower path tracking method, an electronic device, a chip and a mower. The method comprises: on the basis of the current position and a target final position of a mower, determining a reference path, and determining a plurality of control points; on the basis of the reference path and the plurality of control points, performing B-spline curve fitting to obtain a fitted curve; determining whether the fitted curve meets all constraint conditions in a constraint term set; if not, adjusting the plurality of control points, and performing B-spline curve fitting again until a fitted curve meeting all the constraint conditions is obtained; and if so, controlling the mower to travel along the fitted curve. The constraint term set in the present application includes a smoothness constraint condition, a speed constraint condition, an acceleration constraint condition, a collision constraint condition and a reference path distance constraint condition. The fitted curve is evaluated by means of the multi-dimensional constraint conditions, so as to obtain a better moving path, thereby optimizing the moving path of the mower and accurately controlling the mower.
Need to check novelty before this filing date? Find Prior Art

Description

Lawn mower path tracking methods, electronic devices, chips, and lawn mowers

[0001] This application claims priority to Chinese Patent Application No. 2024109566329, filed on July 17, 2024, entitled "Lawnmower Path Tracking Method, Electronic Device, Chip and Lawnmower", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of lawnmower control technology, and in particular to a lawnmower path tracking method, electronic device, chip, and lawnmower. Background Technology

[0003] Path tracking refers to the process of determining the path of a target object moving in space using algorithms and techniques. Path tracking is extremely important for lawnmowers, as it helps them plan the optimal movement path, thereby optimizing their trajectory. The performance of the path tracking algorithm determines the tracking accuracy, affecting the lawnmower's precision and safety during operation. Traditional path tracking algorithms involve first fitting a movement path, and then determining whether the lawnmower's speed and acceleration along that path meet constraints to determine if it is the optimal path.

[0004] However, traditional path tracking algorithms suffer from poor path tracking performance because the constraints used to determine whether the fitted path is optimal are not comprehensive enough. Therefore, improving the path tracking performance of lawnmowers is a pressing issue that needs to be addressed. Summary of the Invention

[0005] This application provides a lawnmower path tracking method, electronic device, chip, and lawnmower, which optimizes the movement path of the lawnmower and improves the path tracking effect.

[0006] In a first aspect, this application provides a lawnmower path tracking method, wherein the method includes:

[0007] A reference path is determined based on the current position of the lawnmower and the target endpoint position of the lawnmower's movement; wherein, the reference path is a preset path with the current position as the starting point and the target endpoint position as the ending point;

[0008] Identify multiple control points;

[0009] B-spline curve fitting is performed based on the multiple control points and discrete points on the reference path to obtain the fitted curve;

[0010] Determine whether the fitted curve satisfies all the constraints in the constraint set, which includes: smoothing constraints, velocity constraints, acceleration constraints, collision constraints, and reference path distance constraints.

[0011] If not satisfied, the multiple control points are adjusted, and B-spline curve fitting is performed based on the adjusted multiple control points and discrete points on the reference path until a fitting curve that satisfies all the constraints is obtained.

[0012] If the conditions are met, the lawnmower is controlled to travel along the fitted curve.

[0013] In some embodiments, a first penalty function for the fitted curve is obtained based on the positions of the plurality of control points, the number of discrete points fitted to the B-spline curve, and the order of the B-spline curve fitting. The first penalty function corresponds to the smoothing constraint condition.

[0014] Differentiating the fitted curve yields the velocity curve and the acceleration curve. A velocity penalty function and an acceleration penalty function are obtained based on the velocity curve and the acceleration penalty function, respectively. The sum of the velocity penalty function and the acceleration penalty function is used as the second penalty function. The velocity penalty function corresponds to the velocity constraint condition, and the acceleration penalty function corresponds to the acceleration constraint condition.

[0015] A third penalty function is obtained based on the first distance between the plurality of control points and the nearest corresponding obstacle; the third penalty function corresponds to the collision constraint condition.

[0016] A fourth penalty function is obtained based on a second distance between the fitted curve and the reference path; the second distance is the shortest distance between the fitted curve and the reference path; the fourth penalty function corresponds to the distance constraint condition of the reference path.

[0017] The first penalty function, the second penalty function, the third penalty function, and the fourth penalty function are weighted and calculated to obtain the fifth penalty function;

[0018] If the fifth penalty function is less than or equal to a preset threshold, then the fitted curve is determined to satisfy all the constraints.

[0019] If the fifth penalty function is greater than the preset threshold, then the fitted curve is determined not to satisfy all the constraints.

[0020] In some embodiments, obtaining the first penalty function of the fitted curve based on the position of each control point in the control point set, the number of discrete points for B-spline curve fitting, and the order of B-spline curve fitting includes:

[0021] Based on the formula: The first penalty function f is obtained. s Where N represents the number of discrete points in the fit, p b Q represents the order of B-spline curve fitting. i This represents the i-th control point.

[0022] In some embodiments, the step of differentiating the fitted curve to obtain a velocity curve and an acceleration curve, obtaining a velocity penalty function based on the velocity curve and an acceleration penalty function based on the acceleration curve, and using the sum of the velocity penalty function and the acceleration penalty function as a second penalty function includes:

[0023] According to the formula: The velocity penalty function f is obtained. v ;in, V max This represents a pre-set velocity threshold; μ represents a point on the fitted curve, x, y, z represent the coordinates of point μ on the fitted curve; N represents the number of discrete points fitted to the B-spline curve, p b V represents the order of the B-spline curve fitting; iμ V represents the velocity at point μ on the fitted curve, where i is the index of the control point, and V iμ Related to the i-th control point;

[0024] According to the formula: The acceleration penalty function f is obtained. a ;in, A max This indicates a preset acceleration threshold.

[0025] The sum of the velocity penalty function and the acceleration penalty function is determined as the second penalty function.

[0026] In some embodiments, obtaining the third penalty function based on the first distance between the plurality of control points and the corresponding nearest obstacle includes:

[0027] According to the formula: The third penalty function f is calculated. c ;

[0028] in, N represents the number of discrete points in the fit, p b Q represents the order of B-spline curve fitting. i Let d(Q) represent the i-th control point. i ) represents control point Q i The closest distance to the obstacle.

[0029] In some embodiments, obtaining the fourth penalty function based on the second distance between the fitted curve and the reference path includes:

[0030] According to the formula: The fourth penalty function f is obtained. ref ;

[0031] Where N represents the number of discrete points for the B-spline curve fitting, p b Q represents the order of B-spline curve fitting. i Let Q represent the i-th control point. i,ref Represents control point Q i The corresponding preset distance value.

[0032] In some embodiments, adjusting the plurality of control points and performing B-spline curve fitting based on the adjusted plurality of control points and discrete points on the reference path until a fitted curve satisfying all the constraints is obtained includes:

[0033] The position of the first control point among the plurality of control points is adjusted, and B-spline curve fitting is performed based on the adjusted first control point, the unadjusted second control point among the plurality of control points, and discrete points on the reference path until a fitting curve that satisfies all the constraints is obtained; wherein, the second control point is the control point among the plurality of control points that is closest to the two endpoints of the reference path respectively; the first control point includes all control points among the plurality of control points except the second control point.

[0034] Secondly, this application provides a lawnmower path tracking device, comprising:

[0035] The reference path determination module is used to determine a reference path based on the current position of the lawnmower and the target endpoint position of the lawnmower's movement; wherein, the reference path is a preset path with the current position as the starting point and the target endpoint position as the ending point;

[0036] The control point determination module is used to determine multiple control points;

[0037] The curve fitting module is used to perform B-spline curve fitting based on the multiple control points and discrete points on the reference path to obtain a fitted curve; and to determine whether the fitted curve satisfies all the constraints in the constraint set, which includes: smoothing constraints, velocity constraints, acceleration constraints, collision constraints, and reference path distance constraints.

[0038] If not satisfied, the curve fitting module is further used to adjust the plurality of control points, and perform B-spline curve fitting based on the adjusted plurality of control points and discrete points on the reference path until a fitting curve that satisfies all the constraints is obtained.

[0039] If the conditions are met, the control module is used to control the lawnmower to travel along the fitted curve.

[0040] Thirdly, this application provides an electronic device, including: a memory and a processor;

[0041] The memory is configured to store computer program instructions;

[0042] The processor is configured to run the computer program instructions, causing the electronic device to implement the lawnmower path tracking method as described in the first aspect and any one of the first aspects.

[0043] Fourthly, this application provides a readable storage medium, including: computer program instructions;

[0044] At least one processor of the electronic device executes the computer program instructions, causing the electronic device to implement the lawnmower path tracking method as described in the first aspect and any one of the first aspects.

[0045] Fifthly, this application provides a chip, including: an interface circuit and a logic circuit, wherein the interface circuit is used to receive signals from other chips outside the chip and transmit them to the logic circuit, or to send signals from the logic circuit to other chips outside the chip, and the logic circuit is used to implement the lawnmower path tracking method described in the first aspect and any one of the first aspects.

[0046] In a sixth aspect, this application provides a computer program product, wherein at least one processor of an electronic device runs the computer program product, causing the electronic device to implement the lawnmower path tracking method described in the first aspect and any one of the first aspects.

[0047] This application provides a lawnmower path tracking method, electronic device, chip, and lawnmower. The method includes: determining a reference path based on the lawnmower's current position and the target endpoint position, and determining multiple control points. Next, B-spline curve fitting is performed based on the reference path and the multiple control points to obtain a fitted curve; it is then determined whether the fitted curve satisfies all constraints in the constraint term set. If not, the multiple control points are adjusted, and B-spline curve fitting is performed again until a fitted curve that satisfies all constraints is obtained; if satisfied, the lawnmower is controlled to travel along the fitted curve. The constraint term set of this application includes: smoothness constraints, velocity constraints, acceleration constraints, collision constraints, and reference path distance constraints. By judging the fitted curve through these multiple dimensions of constraints, a better movement path is obtained, thereby optimizing the lawnmower's movement path and improving the lawnmower path tracking effect. Attached Figure Description

[0048] Figure 1 is a schematic diagram of the structure of a lawnmower provided in an embodiment of this application;

[0049] Figure 2 is a flowchart of a lawnmower path tracking method provided in an embodiment of this application;

[0050] Figures 3A and 3B are schematic diagrams illustrating the positional relationship between multiple control points and a reference path according to an embodiment of this application;

[0051] Figure 4 is a flowchart of a lawnmower path tracking method provided in another embodiment of this application;

[0052] Figure 5 is a flowchart of a lawnmower path tracking method provided in another embodiment of this application;

[0053] Figure 6 is a schematic diagram of the structure of a lawnmower path tracking device provided in an embodiment of this application;

[0054] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0055] 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 mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c alone can mean: a alone, b alone, c alone, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0056] The terms “center,” “longitudinal,” “lateral,” “up,” “down,” “left,” “right,” “front,” and “rear,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0057] This application provides a lawnmower path tracking method, electronic device, chip, and lawnmower. The method includes: determining a reference path based on the current position and target endpoint position of the lawnmower, and determining multiple control points. Next, B-spline curve fitting is performed based on the reference path and multiple control points to obtain a fitted curve; it is then determined whether the fitted curve satisfies all constraints in the constraint term set. If not, the multiple control points are adjusted, and B-spline curve fitting is performed again until a fitted curve that satisfies all constraints is obtained; if satisfied, the lawnmower is controlled to travel along the fitted curve. The constraint term set of this application includes: smoothness constraints, velocity constraints, acceleration constraints, collision constraints, and reference path distance constraints. By judging the fitted curve through these multiple dimensions of constraints, a better movement path is obtained, thereby optimizing the lawnmower's movement path and improving the lawnmower path tracking effect.

[0058] Figure 1 is a hardware structure diagram of a lawnmower provided in an embodiment of this application. Referring to Figure 1, the lawnmower 100 includes: As shown in Figure 1, the lawnmower robot 100 provided in this embodiment includes at least: a mowing component 110, a moving component 120, a processor 130, a memory 140, and a bus 150. The mowing component 110, the moving component 120, the processor 130, and the memory 140 can communicate with each other via the bus 150.

[0059] The lawnmower robot 100 may also include other sensors, such as a positioning module 160 and an image sensor 170. The positioning module 160 may include, but is not limited to, one or more of the following: an RTK positioning component, a GPS positioning module, an inertial navigation and positioning unit (IMU), and a lidar.

[0060] The mowing assembly 110 is used to perform mowing operations, and the mowing assembly 110 includes at least a blade disc and a blade disc drive structure.

[0061] The moving component 120 is used to enable the movement of the lawnmower robot 100, and the moving component 120 includes at least wheels and a wheel drive structure.

[0062] The processor 130 can call computer program instructions in the memory 140 to execute the lawnmower path tracking method in the following embodiments.

[0063] The processor 130 and the memory 140 may each include one or multiple integrated components, and this application embodiment does not specifically limit this.

[0064] Furthermore, the logical instructions in the aforementioned memory 150 can be implemented as software functional modules and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0065] Based on the description of the embodiment shown in Figure 1 above, the lawnmower path tracking method provided in this application can be executed by the software module and / or hardware module of the lawnmower robot. For simplicity, a lawnmower robot is used as an example, and the lawnmower path tracking method provided in this application will be described in detail below with reference to the accompanying drawings.

[0066] It should be noted that the lawnmower path tracking method provided in this disclosure can be applied to lawnmowers, but is not limited to them. It can also be applied to robots or smart devices with similar problems.

[0067] Figure 2 is a flowchart of a lawnmower path tracking method provided in an embodiment of this application. Referring to Figure 2, the method of this embodiment includes:

[0068] S201. Determine a reference path based on the current position of the lawnmower and the target endpoint of the lawnmower's movement.

[0069] The current position of the lawnmower can be provided by the positioning module on the lawnmower. When the current position provided by the positioning module is the lawnmower's position in the Earth coordinate system, the lawnmower's processor can transform the lawnmower's position in the Earth coordinate system to a local coordinate system, which is a coordinate system established based on the lawnmower's mowing operation map.

[0070] The target endpoint of the lawnmower's movement can be determined by the lawnmower itself based on the scenario. For example, in a recharging scenario, the lawnmower needs to move to a charging station for charging; therefore, the location of the charging station is the target endpoint. Similarly, in a mowing operation scenario, the target endpoint can be determined based on a pre-planned mowing path. For instance, the target endpoint can be a location on the mowing path at a preset distance (e.g., 20 meters) from the lawnmower's current position, or the first turning point on the mowing path with a turning angle greater than a preset angle (e.g., 120 degrees). This application does not limit the implementation method for determining the target endpoint.

[0071] In some embodiments, the lawnmower stores data for multiple preset paths. The data for each preset path includes: the path's starting point, ending point, total path length, and the position of points along the preset path. The points along the preset path are determined by sampling along the path according to a preset step size. The preset step size refers to the size or distance of each sampling step. During lawnmower path tracking, the current position of the lawnmower and the target endpoint position are matched with the data from the multiple preset paths, and the successfully matched preset path is determined as the reference path.

[0072] During the matching process, the current position of the lawnmower and the target endpoint position are matched with the positions of points located on a preset path. If the current position of the lawnmower matches the start point of the preset path, and the target endpoint position matches the end point of the preset path, then this preset path is determined as a reference path. If the current position of the lawnmower matches an intermediate point on the preset path, and the target endpoint position matches either the end point or an intermediate point on the preset path, then the reference path is a portion of the preset path extracted based on the successfully matched points.

[0073] In other embodiments, the reference path can be automatically and in real time planned by the lawnmower based on its current location and the target endpoint location in conjunction with the work map.

[0074] S202. Determine multiple control points.

[0075] In this application, control points are points on a mowing map used for B-spline curve fitting. Control points can affect the curvature of the fitted curve, that is, affect the shape and direction of the fitted curve.

[0076] In some embodiments, the processor may determine the number of control points and the position of each control point based on a reference path, wherein the position of the control point may be the coordinates of the control point in a local coordinate system.

[0077] Figures 3A and 3B exemplify the positional relationship between multiple control points and the reference path.

[0078] Please refer to Figure 3A. Multiple control points are discretely distributed on both sides of the reference path, with some control points located on one side and the remainder on the other. Please refer to Figure 3B. All control points are discretely distributed on one side of the reference path.

[0079] S203. Perform B-spline curve fitting based on multiple control points and discrete points on the reference path to obtain the fitted curve.

[0080] In this application, the process of fitting B-spline curves based on multiple control points and discrete points on the reference path is basically the same as the existing B-spline fitting process.

[0081] Among them, B-spline curve fitting can obtain high-order differentiable, continuous, and smooth curves, which is beneficial for generating tracking paths that conform to the kinematics of lawnmowers.

[0082] S204. Determine whether the fitted curve satisfies all the constraints in the constraint set. The constraint set includes: smoothing constraint, velocity constraint, acceleration constraint, collision constraint, and reference path distance constraint.

[0083] Smoothing constraints represent the irregularity of the fitted curve and the effect of noise removal. The better the smoothness, the fewer the subtle movements and distortions in the planned path, and the better the controllability of the lawnmower's travel path. This ensures that the lawnmower travels along the planned path as much as possible. In this way, the lawnmower's travel path is more in line with dynamic constraints and can move more safely according to the planned path.

[0084] The speed constraint condition represents the maximum speed at which the lawnmower is allowed to be controlled.

[0085] The acceleration constraint condition represents the maximum acceleration that the lawnmower is allowed to control.

[0086] Collision constraints represent the safe distance that a lawnmower needs to maintain to avoid obstacles while moving.

[0087] The reference path distance constraint represents the maximum allowable difference between the optimized control point and the pre-given control point, thus ensuring that the optimized fitted curve is as close as possible to the reference path.

[0088] The lawnmower calculates penalty functions for several dimensions, including smoothness, speed, acceleration, collision, and distance from the reference path, by using information such as the number of discrete points participating in B-spline curve fitting on the reference path, the B-spline fitting order, the number of control points, the position of the control points, and the position of obstacles.

[0089] In some embodiments, it is determined individually whether the penalty function of each dimension satisfies the corresponding constraint conditions. If the penalty function of one or more dimensions does not satisfy the corresponding constraint conditions, then the B-spline curve fitting is performed again.

[0090] In other embodiments, the penalty functions of each dimension are integrated to calculate an overall penalty function, and then it is determined whether the overall penalty function meets the preset judgment conditions. If it does, the fitted curve is considered to meet all the constraints; if it does not, the fitted curve is considered to not meet all the constraints, and B-spline curve fitting needs to be performed again.

[0091] S205. Adjust multiple control points and return to execute S203.

[0092] Since control points affect the shape and direction of the fitted curve, the fitted curve can be fine-tuned by adjusting the control points.

[0093] All control points can be adjusted, or only some control points can be adjusted; this application does not limit this.

[0094] The strategy for adjusting control points can be to keep them as far away from obstacles as possible, meaning the distance between the adjusted control points and obstacles should be greater than the distance between the control points and obstacles before adjustment. The farther the control points are from obstacles, the higher the score, and the score reflects the performance of the fitted curve.

[0095] S206. Control the lawnmower to travel along the fitted curve.

[0096] By differentiating and calculating the slope of the fitted curve, the driving speed, acceleration, and direction of the lawnmower can be determined. Based on this, the lawnmower can be controlled to move forward at the determined driving speed, acceleration, and direction.

[0097] The method in this embodiment obtains a fitted curve that simultaneously satisfies the constraints of several dimensions, including smoothness, velocity, acceleration, collision, and reference path distance, through B-spline curve fitting, which serves as the driving path of the lawnmower. Compared with the prior art, this application expands the constraints by adding smoothness constraints, collision constraints, and reference path distance constraints. The resulting fitted curve has a better path tracking effect, and the lawnmower travels along the fitted curve more safely and reliably.

[0098] Next, we will explain how to calculate the penalty function for each dimension.

[0099] 1. The first penalty function f corresponding to the smoothing constraint s

[0100] Calculate the norm of the distance between any adjacent control points under different B-spline fitting orders, and then integrate all norms to obtain the first penalty function f. s .

[0101] In some embodiments, the first penalty function f s It satisfies the following formula (1):

[0102] Where || is the norm symbol; N represents the number of discrete points in the fit; p b Q represents the order of the B-spline curve fitting, which is usually a preset value; i This represents the i-th control point.

[0103] Formula (1) integrates all norms by squaring them separately and then adding them together. s The smaller the value of f, the smoother and more continuous the fitted curve; conversely, the larger the value of f, the better the continuity. s The larger the value, the coarser the fitted curve, the more frequent or greater the directional changes, and the worse the continuity.

[0104] 2. The second penalty function corresponding to the velocity constraint condition

[0105] The velocity curve is obtained by taking the first derivative of the fitted curve, and the acceleration curve is obtained by taking the second derivative of the velocity curve.

[0106] The velocity curve can be used to determine the velocity at any point on the fitted curve, and the acceleration curve can be used to determine the acceleration at any point on the fitted curve. Based on this, the velocity penalty function and the acceleration penalty function are calculated. The sum of the velocity penalty function and the acceleration penalty function is then used as the second penalty function.

[0107] For example, the velocity penalty function f v Satisfies formula (2):

[0108] Where μ∈{x,y,z} represents a point on the fitted curve, and x, y, z represent the coordinates of the point μ on the fitted curve. V iμ V represents the velocity at point μ on the fitted curve, where i is the index of the control point, and V iμ It is related to the i-th control point and can be determined through the velocity curve.

[0109] F ν (V iμ It satisfies formula (3):

[0110] V max This indicates a preset speed threshold, which is the maximum speed at which the lawnmower can be controlled. V μV represents the velocity at point μ on the fitted curve. iμ As V μ Substitute the values ​​into formula (3) to calculate.

[0111] For example, the acceleration penalty function satisfies formula (4):

[0112] A iμ Let A represent the acceleration at point μ on the fitted curve, where i is the index of the control point, and A is the acceleration at point μ on the fitted curve. iμ Related to the i-th control point, A iμ The magnitude can be determined from the acceleration curve.

[0113] Fa(A iμ It satisfies formula (5):

[0114] A max This represents the preset acceleration threshold, i.e., the maximum controllable acceleration of the lawnmower. A μ This represents the acceleration of point μ on the fitted curve. The calculation method is similar to that of formula (3).

[0115] Second penalty function f k Satisfies formula (6): f k =f ν +f a Formula (6)

[0116] Among them, f k The smaller the value of f, the lower the speed and acceleration of the lawnmower, and the more difficult it is to exceed the maximum speed and acceleration that the lawnmower is allowed to control; conversely, the larger the value of f, the lower the speed and acceleration of the lawnmower. k The larger the value, the smaller the speed and acceleration of the lawnmower, and the easier it is to exceed the maximum speed and maximum acceleration that the lawnmower is allowed to control.

[0117] 3. The third penalty function corresponding to the collision constraint condition

[0118] In this application, the third penalty function corresponding to the collision constraint is used to describe the repulsive force exerted by the obstacle on each control point. For example, the third penalty function f... c Satisfies formula (7):

[0119] Among them, F c (d(Q i )) is related to d(Q i ) and d thr The relevant cost function satisfies formula (8):

[0120] Where d(Qi) represents the control point Qi Distance to the nearest obstacle; d thr This indicates a pre-specified distance threshold.

[0121] Among them, f c The smaller the value of f, the smaller the distance between the lawnmower and the obstacle, and the more likely it is to collide with the obstacle; conversely, the larger the value of f, the more likely it is to collide with the obstacle. c The larger the value, the greater the distance between the lawnmower and the obstacle, and the more the lawnmower can avoid the obstacle and prevent a collision.

[0122] 4. The fourth penalty function corresponding to the reference path distance

[0123] In this application, it is expected that the difference between the control points before and after optimization will not exceed the expected value, that is, it is expected that the fitted curve can be as close as possible to the reference path.

[0124] For example, this application integrates the norms between the control points and the known quantities corresponding to the control points using a fourth penalty function, thereby describing the difference between the optimized fitted curve and the reference path.

[0125] Fourth penalty function f ref Satisfies formula (9):

[0126] Among them, Q i,ref Provided to the upper layer and control point Q i Relevant known quantities, i.e., reference control points.

[0127] Among them, f ref The smaller the value of f, the smaller the difference between the fitted curve and the reference path; conversely, the larger the value of f, the smaller the difference between the fitted curve and the reference path. ref The larger the value, the smaller the difference between the fitted curve and the reference path.

[0128] The first penalty function corresponding to the smoothness constraint, the second penalty function corresponding to the velocity constraint, the third penalty function corresponding to the collision constraint, and the fourth penalty function corresponding to the reference path distance constraint can be obtained through the above formulas (1) to (9). It should be noted that the calculation methods of the penalty functions corresponding to the smoothness, velocity, collision, and reference path distance dimensions are not limited to those shown in the above formulas (1) to (9), and can also be obtained through other methods. This disclosure does not limit the calculation methods.

[0129] Next, we will introduce how to determine whether the fitted curve satisfies the set of constraints based on the first to fourth penalty functions.

[0130] Please refer to the embodiment shown in Figure 4. The method in this embodiment includes:

[0131] S401. Calculate the first penalty function, the second penalty function, the third penalty function, and the fourth penalty function.

[0132] The first to fourth penalty functions can be calculated by referring to formulas (1) to (9).

[0133] S402. Is the first penalty function greater than or equal to the first preset value?

[0134] Regarding the smoothing constraint, if the first penalty function is greater than or equal to the first preset value, the fitted curve is determined to meet the smoothing constraint and S403 is executed; if the first penalty function does not meet the first preset value, the fitted curve is determined not to meet the smoothing constraint and jumps to S407.

[0135] S403. Is the second penalty function less than the second preset value?

[0136] Regarding the speed constraint:

[0137] In some embodiments, the sum of the velocity penalty function and the acceleration penalty function is determined as the second penalty function; if the second penalty function is less than a second preset value, then the fitted curve is determined to satisfy the velocity constraint condition. If the second velocity penalty function is greater than or equal to the second preset value, then the fitted curve is determined not to satisfy the velocity constraint condition.

[0138] In other embodiments, if the velocity penalty function f ν The speed is greater than the speed threshold V in the speed constraint condition. max Then it is determined that the fitted curve does not meet the requirement of the maximum controllable speed of the lawnmower in the speed constraint conditions; if the speed penalty function f ν The speed threshold V is less than or equal to the speed constraint condition. max Then the fitted curve is determined to satisfy the requirement of the maximum controllable speed of the lawnmower in the speed constraint conditions. If the acceleration penalty function f... a The acceleration threshold A in the velocity constraint condition is greater than max In this case, the fitted curve does not meet the requirement of the maximum controllable acceleration of the lawnmower in the velocity constraint conditions; if the acceleration penalty function f a The acceleration threshold A in the velocity constraint condition is less than or equal to the acceleration threshold A. max If the fitted curve satisfies the requirement of the maximum controllable acceleration of the lawnmower in the velocity constraint conditions, then the fitted curve is determined to meet the requirement of the maximum controllable acceleration of the lawnmower in the velocity constraint conditions.

[0139] If the velocity penalty function satisfies the velocity threshold V max And the acceleration penalty function satisfies the acceleration threshold A maxIf the fitted curve satisfies the velocity constraint, then execute S404. If either the velocity penalty function or the acceleration penalty function fails to meet the corresponding threshold, then the fitted curve fails to satisfy the velocity constraint, and proceed to S407.

[0140] S404. Is the third penalty function greater than or equal to the third preset value?

[0141] The determination process for collision constraints includes the following steps:

[0142] If the third penalty function is greater than or equal to the third preset value, the fitted curve is determined to meet the collision constraint condition, and S405 is executed; if the third penalty function does not meet the third preset value, the fitted curve is determined to not meet the collision constraint condition, and the process jumps to S407.

[0143] S405. Is the fourth penalty function less than the fourth preset value?

[0144] The determination process for the reference path distance constraint includes the following steps:

[0145] If the fourth penalty function is less than the fourth preset value, the fitted curve is determined to meet the reference path distance constraint condition; if the fourth penalty function is greater than or equal to the fourth preset value, the fitted curve is determined not to meet the reference path distance constraint condition.

[0146] S406. Determine that the fitted curve satisfies all constraints.

[0147] S407. Determine that the fitted curve does not meet all the constraints.

[0148] The method described in Figure 4 allows for accurate identification of which constraint the fitted curve fails to meet. Based on this, when adjusting control points, the control points can be adjusted specifically according to the constraints not met by the fitted curve, providing data support for control point adjustments.

[0149] Please refer to Figure 5. The method in this embodiment includes:

[0150] S501. Calculate the first penalty function, the second penalty function, the third penalty function, and the fourth penalty function.

[0151] S502. The fifth penalty function is obtained by weighting the first penalty function, the second penalty function, the third penalty function and the fourth penalty function.

[0152] S503. Determine whether the fifth penalty function is less than the fifth preset value. If it is less, jump to S504 to determine if the fitted curve satisfies all constraints; if it is greater than or equal to, jump to S505 to determine if the fitted curve does not satisfy all constraints. At this point, it is not necessary to focus on which constraint the fitted curve does not satisfy.

[0153] For example, the fifth penalty function is calculated using formula (10): f total =λ1f s +λ2f c +λ3(f v +fa)+λ4f ref Formula (10)

[0154] Among them, f total Let λ1, λ2, λ3, and λ4 represent the weighting coefficients of the first to fourth penalty functions, respectively.

[0155] This application quantifies the performance of the fitted curve in several dimensions, including smoothness, speed, collision, and reference path distance, into numerical values, and then makes a judgment by the individual comparison method shown in the embodiment of Figure 4 or the overall comparison method shown in the embodiment of Figure 5. This is simple, efficient, and conducive to improving the efficiency of path tracking processing.

[0156] Figure 6 is a structural diagram of a lawnmower path tracking device provided in an embodiment of this application. Referring to Figure 6, the lawnmower path tracking device 600 provided in this embodiment includes:

[0157] The reference path determination module 601 is used to determine a reference path based on the current position of the lawnmower and the target endpoint position of the lawnmower's movement; wherein the reference path is a preset path with the current position as the starting point and the target endpoint position as the ending point.

[0158] The control point determination module 602 is used to determine multiple control points.

[0159] The curve fitting module 603 is used to perform B-spline curve fitting based on the plurality of control points and discrete points on the reference path to obtain a fitted curve.

[0160] The determination module 604 is used to determine whether the fitted curve satisfies all the constraints in the constraint set, which includes: smoothing constraints, velocity constraints, acceleration constraints, collision constraints, and reference path distance constraints.

[0161] If the conditions are not met, the control point determination module 602 is also used to adjust the plurality of control points.

[0162] The curve fitting module 603 is used to perform B-spline curve fitting based on the adjusted multiple control points and discrete points on the reference path until a fitted curve that satisfies all the constraints is obtained.

[0163] If the conditions are met, the control module 605 controls the lawnmower to travel along the fitted curve.

[0164] In some embodiments, the determination module 604 is specifically used to determine whether the fitted curve satisfies all constraints by means of the following:

[0165] Based on the positions of the multiple control points, the number of discrete points for B-spline curve fitting, and the B-spline curve fitting order, a first penalty function for the fitted curve is obtained, and the first penalty function corresponds to the smoothing constraint condition.

[0166] Differentiating the fitted curve yields the velocity curve and the acceleration curve. A velocity penalty function and an acceleration penalty function are obtained based on the velocity curve and the acceleration penalty function, respectively. The sum of the velocity penalty function and the acceleration penalty function is used as the second penalty function. The velocity penalty function corresponds to the velocity constraint condition, and the acceleration penalty function corresponds to the acceleration constraint condition.

[0167] A third penalty function is obtained based on the first distance between the plurality of control points and the nearest corresponding obstacle; the third penalty function corresponds to the collision constraint condition.

[0168] A fourth penalty function is obtained based on a second distance between the fitted curve and the reference path; the second distance is the shortest distance between the fitted curve and the reference path; the fourth penalty function corresponds to the distance constraint condition of the reference path.

[0169] The first penalty function, the second penalty function, the third penalty function, and the fourth penalty function are weighted and calculated to obtain the fifth penalty function;

[0170] If the fifth penalty function is less than or equal to a preset threshold, the fitted curve is determined to satisfy all the constraints; if the fifth penalty function is greater than the preset threshold, the fitted curve is determined not to satisfy all the constraints.

[0171] Among them, the determination module 604 can calculate the first penalty function to the fifth penalty function through the above formulas (1) to (10). The calculation process can be described in detail above. For the sake of brevity, it will not be repeated here.

[0172] In some embodiments, the control point determination module 602 is specifically used to adjust the position of the first control point among the plurality of control points, and to perform B-spline curve fitting based on the adjusted first control point, the unadjusted second control point among the plurality of control points, and discrete points on the reference path until a fitted curve that satisfies all the constraints is obtained; wherein, the second control point is the control point among the plurality of control points that is closest to the two endpoints of the reference path respectively; the first control point includes all control points among the plurality of control points except for the second control point.

[0173] The lawnmower path tracking device provided in this embodiment can be used to implement the technical solution of any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0174] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Referring to Figure 7, the electronic device 700 provided in this embodiment includes a memory 701 and a processor 702.

[0175] The memory 701 can be a separate physical unit, connected to the processor 702 via a bus 703. Alternatively, the memory 701 and processor 702 can be integrated and implemented in hardware. The memory 701 stores program instructions, which the processor 702 calls to execute the technical solutions of any of the above method embodiments.

[0176] Optionally, when some or all of the methods in the above embodiments are implemented by software, the electronic device 700 may also include only the processor 702. A memory 701 for storing programs is located outside the electronic device 700, and the processor 702 is connected to the memory via circuitry / wires to read and execute the programs stored in the memory. The processor 702 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 702 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0177] The memory 701 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory may also include a combination of the above types of memory.

[0178] For example, this disclosure provides a chip system, which includes a processor; the processor is used to execute the technical solutions of any of the above method embodiments.

[0179] For example, this disclosure provides a readable storage medium having computer program instructions stored thereon, which are executed by a processor of an electronic device to cause the electronic device to perform the technical solutions of any of the above method embodiments.

[0180] For example, this disclosure provides a computer program product that, when run on an electronic device, causes the electronic device to execute the technical solutions of any of the above method embodiments.

[0181] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0182] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A lawnmower path tracking method, characterized by, The method comprises the following steps: determining a reference path according to a current position of the mower and a target end position of the mower movement; wherein the reference path is a preset path with the current position as the start point and the target end position as the end point; determining a plurality of control points; performing B-spline curve fitting based on the plurality of control points and discrete points on the reference path to obtain a fitting curve; determining whether the fitting curve satisfies all the constraint conditions in a constraint condition set, wherein the constraint condition set comprises a smooth constraint condition, a speed constraint condition, an acceleration constraint condition, a collision constraint condition, and a reference path distance constraint condition; if not, adjusting the plurality of control points, performing B-spline curve fitting based on the adjusted plurality of control points and the discrete points on the reference path, until a fitting curve satisfying all the constraint conditions is obtained; if yes, controlling the mower to travel along the fitting curve.

2. The method of claim 1, wherein, The determination of whether the fitting curve satisfies each constraint condition in the constraint set comprises: obtaining a first penalty function of the fitting curve according to the positions of the plurality of control points, the number of discrete points of the B-spline curve fitting, and the order of the B-spline curve fitting, wherein the first penalty function corresponds to the smooth constraint condition; deriving a velocity curve and an acceleration curve from the fitting curve, obtaining a velocity penalty function according to the velocity curve and an acceleration penalty function according to the acceleration curve, and taking the sum of the velocity penalty function and the acceleration penalty function as a second penalty function, wherein the velocity penalty function corresponds to the speed constraint condition, and the acceleration penalty function corresponds to the acceleration constraint condition; obtaining a third penalty function according to a first distance between the plurality of control points and the corresponding nearest obstacle, wherein the third penalty function corresponds to the collision constraint condition; obtaining a fourth penalty function according to a second distance between the fitting curve and the reference path, wherein the second distance is the nearest distance between the fitting curve and the reference path, and the fourth penalty function corresponds to the reference path distance constraint condition; performing weighted calculation on the first penalty function, the second penalty function, the third penalty function, and the fourth penalty function to obtain a fifth penalty function; if the fifth penalty function is less than or equal to a preset threshold, it is determined that the fitting curve satisfies all the constraint conditions; if the fifth penalty function is greater than the preset threshold, it is determined that the fitting curve does not satisfy all the constraint conditions.

3. The method of claim 2, wherein, The obtaining of the first penalty function of the fitting curve according to the positions of the control points in the control point set, the number of discrete points of the B-spline curve fitting, and the order of the B-spline curve fitting comprises: Based on the formula: The first penalty function f s is obtained, wherein N represents the number of discrete points fitted, p b represents the order of B-spline curve fitting, Q i represents the i-th control point.

4. The method of claim 2, wherein, the deriving of a velocity curve and an acceleration curve from the fitting curve, the obtaining of a velocity penalty function according to the velocity curve and an acceleration penalty function according to the acceleration curve, and the taking of the sum of the velocity penalty function and the acceleration penalty function as a second penalty function, comprises: According to the formula: obtaining the speed penalty function f v ; wherein, V max denotes a preset speed threshold; μ denotes a point on the fitted curve, x, y, z denote the coordinates of the point μ on the fitted curve; N denotes the number of discrete points of the B-spline curve fitting, p b denotes the order of the B-spline curve fitting; V iμ denotes the speed of the point μ on the fitted curve, wherein i is the subscript of the control point, V iμ is related to the i th control point; According to the formula: obtaining the acceleration penalty function f a ; wherein, A max denotes a pre-set acceleration threshold value; determining the sum of the velocity penalty function and the acceleration penalty function as the second penalty function.

5. The method of claim 2, wherein, The third penalty function obtained according to the first distances between the plurality of control points and the corresponding nearest obstacles comprises: According to the formula: The third penalty function f is calculated c ; wherein N denotes the number of discrete points fitted, p b denotes the order of the B-spline curve fit, Q i denotes the i-th control point, d(Q i ) denotes the distance between the control point Q i and the closest obstacle.

6. The method of claim 2, wherein, The fourth penalty function obtained according to the second distances between the fitting curve and the reference path comprises: According to the formula: obtaining the fourth penalty function f ref ; Wherein, N represents the number of discrete points of the B-spline curve fitting, p b represents the order of the B-spline curve fitting, Q i represents the i-th control point, Q i,ref is a preset distance value.

7. The method of claim 1, wherein, The adjusting the plurality of control points, performing B-spline curve fitting based on the adjusted plurality of control points and the discrete points on the reference path until a fitting curve satisfying all the constraint conditions is obtained, comprises: Adjusting the position of a first control point in the plurality of control points, performing B-spline curve fitting based on the adjusted first control point, a second control point in the plurality of control points which is not adjusted and the discrete points on the reference path until a fitting curve satisfying all the constraint conditions is obtained; wherein the second control point is the control point in the plurality of control points which is closest to two end points of the reference path respectively; and the first control point comprises all the control points in the plurality of control points except the second control point.

8. An electronic device, comprising: Comprise: a memory and a processor; the memory is configured to store computer program instructions; the processor is configured to run the computer program instructions, so that the electronic device implements the method as claimed in any one of claims 1 to 7.

9. A chip, characterized by Comprise: an interface circuit and a logic circuit, the interface circuit is used for receiving signals from other chips outside the chip and transmitting to the logic circuit, or sending signals from the logic circuit to other chips outside the chip, and the logic circuit is used for implementing the method as claimed in any one of claims 1 to 7.

10. A lawnmower characterised in that, Comprise: the electronic device as claimed in claim 8, or the chip as claimed in claim 9.

Citation Information

Patent Citations

  • Mobile equipment obstacle avoiding method and device, mobile equipment and storage medium

    CN113433936A

  • Processing method and device, vehicle and storage medium

    CN113568403A

  • Unmanned mower trajectory tracking control method and computer readable storage medium

    CN114568108A

  • Unmanned aerial vehicle path planning method and system based on gradient descent method

    CN116203990A

  • Multi-rotor unmanned aerial vehicle online safety trajectory generation method under multiple constraints

    CN116719347A