Mower path tracking method, electronic equipment, chip and mower

By using B-spline fitting and control point adjustment in lawn mower, multiple constraints are met, and the problem of incomplete constraints in traditional path tracking algorithms is solved, and the tracking effect and safety of lawn mower paths are improved.

CN118915733APending Publication Date: 2024-11-08YOSEMITE SHANGHAI ROBOTICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410956632.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The constraints in the traditional lawn mower path tracking algorithm are not comprehensive enough, resulting in poor lawn mower path tracking effect.

Method used

By determining the reference path and control points, using B-spline fitting, satisfying the smoothing, velocity, acceleration, collision and reference path distance constraints, adjusting the control points until all constraints are met, and an optimized moving path is obtained.

Benefits of technology

Improve the accuracy and safety of lawn mower path tracking, ensure that lawn mowers travel along the optimized path, and enhance the controllability and safety of the path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118915733A_ABST
    Figure CN118915733A_ABST
Patent Text Reader

Abstract

The invention provides a lawn mower path tracking method, electronic equipment, a chip and a lawn mower, and the method comprises the steps: determining a reference path according to the current position and the target end point position of the lawn mower, and determining a plurality of control points; performing B spline curve fitting according to the reference path and the plurality of control points to obtain a fitted curve; judging whether the fitting curve meets all constraint conditions in the constraint item set or not; if not, a plurality of control points are adjusted, and B spline curve fitting is carried out again until a fitting curve meeting all constraint conditions is obtained; if yes, the mower is controlled to run along the fitted curve. The constraint term 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, and the fitting curve is judged through the constraint conditions of multiple dimensions to obtain a better moving path. Therefore, optimization of the moving path of the mower and accurate control of the mower are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of lawn mower control, and in particular to a lawn mower path tracking method, electronic equipment, chip and lawn mower. Background Art

[0002] Path tracking refers to the process of determining the path of a target object moving in space through algorithms and techniques. Path tracking is extremely important for lawn mowers, as it can help lawn mowers plan the optimal moving path, thereby optimizing the moving trajectory of the lawn mower. The performance of the path tracking algorithm determines the tracking accuracy of the path, which affects the accuracy and safety and reliability of the lawn mower during driving. The traditional path tracking algorithm implementation process is: first fit a moving path, and then determine whether the moving path is the optimal moving path for the lawn mower by judging whether the speed and acceleration of the lawn mower on the moving path meet the constraints.

[0003] However, the traditional path tracking algorithm does not have comprehensive constraints for determining whether the fitted moving path is optimal, which results in poor path tracking results for lawn mowers. Therefore, how to improve the path tracking results for lawn mowers is an urgent problem to be solved. Summary of the invention

[0004] The present application provides a lawn mower path tracking method, electronic equipment, chip and lawn mower, which can optimize the moving path of the lawn mower and improve the path tracking effect.

[0005] In a first aspect, the present application provides a lawn mower path tracking method, wherein the method comprises:

[0006] Determine a reference path according to the current position of the lawn mower and the target end position of the lawn mower; wherein the reference path is a preset path with the current position as the starting point and the target end position as the end point;

[0007] Identify multiple control points;

[0008] Perform B-spline curve fitting based on the multiple control points and the discrete points on the reference path to obtain a fitting curve;

[0009] Determining whether the fitting curve satisfies all constraints in a constraint set, wherein the constraint set includes: a smoothness constraint, a speed constraint, an acceleration constraint, a collision constraint, and a reference path distance constraint;

[0010] If not, adjusting the multiple control points, and performing B-spline curve fitting based on the adjusted multiple control points and the discrete points on the reference path, until a fitting curve that satisfies all the constraint conditions is obtained;

[0011] If the condition is satisfied, the lawn mower is controlled to travel along the fitting curve.

[0012] In some embodiments, a first penalty function of the fitting curve is obtained according to the positions of the plurality of control points, the number of discrete points of the B-spline curve fitting, and the B-spline curve fitting order, wherein the first penalty function corresponds to the smoothness constraint condition;

[0013] Deriving the fitting curve to obtain a velocity curve and an acceleration curve, obtaining a velocity penalty function according to the velocity curve and obtaining 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 velocity constraint condition and the acceleration penalty function corresponds to the acceleration constraint condition;

[0014] Obtaining a third penalty function according to first distances between the plurality of control points and corresponding nearest obstacles; the third penalty function corresponds to the collision constraint condition;

[0015] A fourth penalty function is obtained according to a second distance between the fitting curve and the reference path; the second distance is the shortest distance between the fitting curve and the reference path; the fourth penalty function corresponds to the reference path distance constraint;

[0016] 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;

[0017] If the fifth penalty function is less than or equal to a preset threshold, determining that the fitting curve satisfies all the constraint conditions;

[0018] 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.

[0019] In some embodiments, obtaining the first penalty function of the fitting curve according to the position of each control point in the control point set, the number of discrete points of the B-spline curve fitting, and the B-spline curve fitting order includes:

[0020] Based on the formula: Get the first penalty function f s ; where N represents the number of discrete points to be fitted, and p b Indicates the B-spline curve fitting order, Q i represents the i-th control point.

[0021] In some embodiments, the derivation of the fitting curve to obtain a speed curve and an acceleration curve, obtaining a speed penalty function according to the speed curve and obtaining an acceleration penalty function according to the acceleration curve, and taking the sum of the speed penalty function and the acceleration penalty function as the second penalty function includes:

[0022] According to the formula: Get the speed penalty function f v ;in, V max represents the preset speed threshold; μ represents a point on the fitting curve, x, y, z represent the coordinates of the point μ on the fitting curve; N represents the number of discrete points of the B-spline curve fitting, p b Indicates the B-spline curve fitting order; V iμ represents the velocity of point μ on the fitting curve, where i is the subscript of the control point, V iμ Related to the i-th control point;

[0023] According to the formula: Get the acceleration penalty function f a ;in, A max Indicates a preset acceleration threshold;

[0024] The sum of the speed penalty function and the acceleration penalty function is determined as the second penalty function.

[0025] In some embodiments, obtaining a third penalty function according to first distances between the plurality of control points and corresponding nearest obstacles comprises:

[0026] According to the formula: Calculate the third penalty function f c ;

[0027] in, N represents the number of discrete points for fitting, p b Indicates the B-spline curve fitting order, Q i represents the i-th control point, d(Q i ) represents the control point Q i The minimum distance to the obstacle.

[0028] In some embodiments, obtaining a fourth penalty function according to a second distance between the fitting curve and the reference path includes:

[0029] According to the formula: Get the fourth penalty function f ref ;

[0030] Where N represents the number of discrete points of B-spline curve fitting, p b Indicates the B-spline curve fitting order, Q i represents the i-th control point, Q i,ref Denotes the control point Q i The corresponding preset distance value.

[0031] In some embodiments, the adjusting the multiple control points and performing B-spline curve fitting based on the adjusted multiple control points and discrete points on the reference path until a fitting curve satisfying all the constraint conditions is obtained includes:

[0032] Adjust the position of a first control point among the multiple control points, and perform B-spline curve fitting based on the adjusted first control point, an unadjusted second control point among the multiple 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 a control point among the multiple control points that is closest to the two endpoints of the reference path respectively; and the first control point includes all control points among the multiple control points except the second control point.

[0033] In a second aspect, the present application provides a lawn mower path tracking device, comprising:

[0034] A reference path determination module, used to determine a reference path according to a current position of the lawn mower and a target end position of the lawn mower; wherein the reference path is a preset path with a starting point at the current position and an end point at the target end position;

[0035] A control point determination module, used for determining a plurality of control points;

[0036] a curve fitting module, configured to perform B-spline curve fitting based on the plurality of control points and discrete points on the reference path to obtain a fitting curve; and determine whether the fitting curve satisfies all constraints in a constraint set, wherein the constraint set includes: a smoothness constraint, a speed constraint, an acceleration constraint, a collision constraint, and a reference path distance constraint;

[0037] If not, the curve fitting module is further used to adjust the multiple control points, and perform B-spline curve fitting based on the adjusted multiple control points and the discrete points on the reference path, until a fitting curve that satisfies all the constraint conditions is obtained;

[0038] If satisfied, the control module is used to control the lawn mower to travel along the fitting curve.

[0039] In a third aspect, the present application provides an electronic device, including: a memory and a processor;

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

[0041] The processor is configured to run the computer program instructions so that the electronic device implements the lawn mower path tracking method described in the first aspect and any one of the first aspects.

[0042] In a fourth aspect, the present application provides a readable storage medium, including: computer program instructions;

[0043] At least one processor of the electronic device runs the computer program instructions, so that the electronic device implements the lawn mower path tracking method described in the first aspect and any one of the first aspects.

[0044] In a fifth aspect, the present application provides a chip, comprising: 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 lawn mower path tracking method described in the first aspect and any one of the first aspects.

[0045] In a sixth aspect, the present application provides a computer program product, and at least one processor of an electronic device runs the computer program product, so that the electronic device implements the lawn mower path tracking method described in the first aspect and any one of the first aspects.

[0046] The embodiment of the present application provides a lawn mower path tracking method, electronic device, chip and lawn mower, wherein the method includes: determining a reference path according to the current position of the lawn mower and the target terminal position, and determining multiple control points. Then, performing B-spline curve fitting according to the reference path and multiple control points to obtain a fitting curve; judging whether the fitting curve satisfies all the constraints in the constraint item set, if not, adjusting multiple control points, and performing B-spline curve fitting again until a fitting curve that satisfies all the constraints is obtained; if satisfied, controlling the lawn mower to travel along the fitting curve. The constraint item set of the present application includes: smoothness constraint conditions, speed constraint conditions, acceleration constraint conditions, collision constraint conditions and reference path distance constraint conditions. The fitting curve is judged by the constraints of the above multiple dimensions to obtain a better moving path, thereby optimizing the moving path of the lawn mower and improving the path tracking effect of the lawn mower. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A structural schematic diagram of a lawn mower provided in an embodiment of the present application;

[0048] Figure 2 A flow chart of a lawn mower path tracking method provided by an embodiment of the present application;

[0049] Figure 3A and Figure 3B A schematic diagram of the positional relationship between multiple control points and a reference path shown in an embodiment of the present application;

[0050] Figure 4 A flowchart of a lawn mower path tracking method provided by another embodiment of the present application;

[0051] Figure 5 A flowchart of a lawn mower path tracking method provided by another embodiment of the present application;

[0052] Figure 6 A schematic diagram of the structure of a lawn mower path tracking device provided in one embodiment of the present application;

[0053] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0054] In this application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c alone can represent: a, b, c, a and b, a and c, or a, b, and c, where a, b, and c can be single or multiple. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0055] The directions or positional relationships indicated by terms such as "center", "longitudinal", "lateral", "up", "down", "left", "right", "front", and "back" are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present application and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present application.

[0056] The present application provides a lawn mower path tracking method, electronic device, chip and lawn mower, wherein the method includes: determining a reference path according to the current position of the lawn mower and the target terminal position, and determining multiple control points. Then, performing B-spline curve fitting according to the reference path and multiple control points to obtain a fitting curve; judging whether the fitting curve satisfies all the constraints in the constraint item set, if not, adjusting multiple control points, and performing B-spline curve fitting again until a fitting curve that satisfies all the constraints is obtained; if satisfied, controlling the lawn mower to travel along the fitting curve. The constraint item set of the present application includes: smoothness constraints, speed constraints, acceleration constraints, collision constraints and reference path distance constraints. The fitting curve is judged by the constraints of the above multiple dimensions to obtain a better moving path, thereby optimizing the moving path of the lawn mower and improving the path tracking effect of the lawn mower.

[0057] Figure 1 This is a hardware structure diagram of a lawn mower provided in one embodiment of the present application. Figure 1 As shown, the lawn mower 100 includes: Figure 1 As shown, the lawn mower robot 100 provided in this embodiment includes at least: a lawn mower component 110, a moving component 120, a processor 130, a memory 140 and a bus 150. The lawn mower component 110, the moving component 120, the processor 130 and the memory 140 can communicate with each other through the bus 150.

[0058] The lawn mowing robot 100 may also include other sensors, such as a positioning module 160, an image sensor 170, etc. The positioning module 160 may include, but is not limited to, one or more of an RTK positioning component, a GPS positioning module, an inertial navigation positioning unit (IMU), a laser radar, etc.

[0059] The mowing assembly 110 is used to perform mowing operations, and the mowing assembly 110 at least includes a cutter disc and a cutter disc driving structure.

[0060] The moving assembly 120 is used to realize the moving operation of the lawn mowing robot 100 , and the moving assembly 120 at least includes wheels and a wheel driving structure.

[0061] The processor 130 may call the computer program instructions in the memory 140 to execute the lawn mower path tracking method in the following embodiments.

[0062] The processor 130 and the memory 140 may each include one or more integrated components, which is not specifically limited in the embodiments of the present application.

[0063] In addition, the logic instructions in the memory 150 described above may be implemented in the form of software function modules and when sold or used as independent products, may be stored in a computer-readable storage medium.

[0064] Based on the above Figure 1 In the description of the illustrated embodiment, the lawn mower path tracking method provided in the embodiment of the present application can be executed by a software module and / or a hardware module of a lawn mower robot. In order to simplify the description, the lawn mower path tracking method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings, taking the lawn mower robot as an example.

[0065] It should be noted that the lawn mower path tracking method provided in the present disclosure can be applied to, but not limited to, lawn mowers, and can also be applied to robots or smart devices with similar problems.

[0066] Figure 2 This is a flow chart of a lawn mower path tracking method provided by an embodiment of the present application. Figure 2 As shown, the method of this embodiment includes:

[0067] S201: Determine a reference path according to a current position of a lawn mower and a target end position of the lawn mower.

[0068] The current position of the lawn mower may be provided by a positioning module on the lawn mower. When the current position provided by the positioning module is the position of the lawn mower in the earth coordinate system, the lawn mower processor may convert the position of the lawn mower in the earth coordinate system into a local coordinate system, which is a coordinate system established according to the lawn mowing operation map of the lawn mower.

[0069] The target end position of the lawn mower's movement can be determined by the lawn mower according to the scenario. For example, in the recharging scenario, the lawn mower needs to move to the charging pile for charging, so the location of the charging pile is the target end position. For another example, in a mowing operation scenario, the target end position is determined according to a pre-planned mowing path. For example, the position on the mowing path that is a preset distance (such as 20 meters) from the current position of the lawn mower can be determined as the target end position, or the first turning point on the mowing path with a turning angle greater than a preset turning angle (such as 120 degrees) can be determined as the target end position. This application does not limit the implementation method for determining the target end position.

[0070] In some embodiments, the lawn mower stores data of multiple preset paths, and the data of each preset path includes: the starting point of the path, the end point of the path, the total length of the path, the position of the point on the preset path, etc. Among them, the points on the preset path can be determined by sampling and processing on the preset path according to the preset step length. The preset step length refers to the size or distance of each sampling process. When tracking the path of the lawn mower, the current position and the target end point position of the lawn mower are matched with the data of multiple preset paths, and the preset path that successfully matches is determined as the reference path.

[0071] When matching, the current position and the target end position of the lawn mower are matched with the positions of points on the preset path respectively. When the current position of the lawn mower matches the starting point of the preset path, and the target end position matches the end point of the preset path, then the preset path is determined to be the reference path. When the current position of the lawn mower matches an intermediate point on the preset path, and the target end position matches the end point or an intermediate point of the preset path, then the reference path is a partial path intercepted from the preset path according to the successfully matched points.

[0072] In other embodiments, the reference path can be automatically planned in real time by the lawn mower according to the current position and the target end position in combination with the operation map.

[0073] S202: Determine a plurality of control points.

[0074] In the present application, the control points are points in the mowing map used for B-spline curve fitting, and the control points can affect the curvature of the fitting curve, that is, affect the shape and direction of the fitting curve.

[0075] In some embodiments, the processor may determine the number of control points and the position of each control point according to the reference path, wherein the position of the control point may be the coordinate of the control point in the local coordinate system.

[0076] Figure 3A and Figure 3B The positional relationship between multiple control points and the reference path is exemplarily shown.

[0077] See also Figure 3A , multiple control points are discretely distributed on both sides of the reference path, where some control points are distributed on one side of the reference path and the rest of the control points are distributed on the other side of the reference path. Figure 3B , all control points are discretely distributed on one side of the reference path.

[0078] S203 , performing B-spline curve fitting based on multiple control points and discrete points on the reference path to obtain a fitting curve.

[0079] In the present application, the process of performing B-spline curve fitting according to multiple control points and discrete points on a reference path is substantially consistent with the existing B-spline fitting process.

[0080] Among them, B-spline curve fitting can obtain a high-order differentiable, continuous and smooth curve, which is conducive to generating a tracking path that conforms to the kinematics of the lawn mower.

[0081] S204, determining whether the fitting curve satisfies all constraints in a constraint set, where the constraint set includes: a smoothness constraint, a speed constraint, an acceleration constraint, a collision constraint, and a reference path distance constraint.

[0082] The smoothness constraint condition represents the irregularity of the fitting curve and the noise removal effect. The better the smoothness, the less subtle movements and distortions in the planned path, and the better the controllability of the lawn mower's driving path, thereby ensuring that the lawn mower moves along the planned driving path as much as possible. In this way, the driving path of the lawn mower is more in line with the dynamic constraints and can move more safely along the planned path.

[0083] The speed constraint represents the maximum speed at which the lawn mower is allowed to be controlled.

[0084] The acceleration constraint represents the maximum acceleration that the lawn mower is allowed to be controlled at.

[0085] The collision constraint condition represents the safe distance that the lawn mower needs to maintain to avoid obstacles during its movement.

[0086] The reference path distance constraint condition indicates that the optimized control points are close to the maximum allowed difference between the pre-given control points, so that the optimized fitting curve can be as close to the reference path as possible.

[0087] The lawn mower calculates the penalty functions corresponding to the dimensions of smoothness, speed, acceleration, collision, and reference path distance 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 positions of control points, and the positions of obstacles.

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

[0089] In some 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 satisfies a pre-set judgment condition. If it does, it is considered that the fitting curve satisfies all constraint conditions; if it does not, it is considered that the fitting curve does not satisfy all constraint conditions, and the B-spline curve needs to be refitted.

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

[0091] Since the control points affect the shape and direction of the fitting curve, the fitting curve is fine-tuned by adjusting the control points.

[0092] All control points may be adjusted, or some control points may be adjusted, and this application does not limit this.

[0093] The adjustment strategy of the control point can be: try to stay away from the obstacle, that is, the distance between the control point and the obstacle after adjustment is greater than the distance between the control point and the obstacle before adjustment. The farther the distance between the control point and the obstacle is, the higher the score is, and the score can reflect the performance of the fitting curve.

[0094] S206: Control the lawn mower to move along the fitting curve.

[0095] The speed, acceleration and direction of the lawn mower can be determined by taking the derivative and slope of the fitting curve, and based on this, the lawn mower is controlled to move forward according to the determined speed, acceleration and direction.

[0096] The method of this embodiment obtains a fitting curve that satisfies the constraints of smoothness, speed, acceleration, collision and reference path distance through B-spline curve fitting as the driving path of the lawn mower. Compared with the prior art, the present application expands the constraints and adds smoothness constraints, collision constraints and reference path distance constraints. The fitting curve obtained thereby has a better path tracking effect, and the lawn mower moves along the fitting curve more safely and reliably.

[0097] Next, we will introduce how to calculate the penalty function corresponding to each dimension.

[0098] 1. The first penalty function f corresponding to the smoothness constraint s

[0099] 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 .

[0100] In some embodiments, the first penalty function f s Satisfies the following formula (1):

[0101]

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

[0103] Formula (1) is integrated by squaring all norms separately and then adding them together. s The smaller the value of f, the smoother the fitting curve and the better the continuity; on the contrary, s The larger the value, the rougher the fitting curve, the more frequent the direction changes or the larger the amplitude of the direction changes, and the worse the continuity.

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

[0105] The velocity curve is obtained by taking a derivative of the fitting curve, and the acceleration curve is obtained by taking a derivative of the velocity curve.

[0106] The speed of any point on the fitting curve can be determined according to the speed curve, and the acceleration of any point on the fitting curve can be determined according to the acceleration curve. Based on this, the speed penalty function and the acceleration penalty function are obtained by calculation; and the sum of the speed penalty function and the acceleration penalty function is used as the second penalty function.

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

[0108]

[0109] Where μ∈{x,y,z} represents a point on the fitting curve, and x, y, z represent the coordinates of the point μ on the fitting curve. iμ represents the velocity of point μ on the fitting curve, where i is the subscript of the control point, V iμ Related to the i-th control point, which can be determined by the velocity curve.

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

[0111]

[0112] V max Represents the preset speed threshold, i.e. the maximum speed at which the lawn mower can be controlled. V μ represents the velocity of point μ on the fitting curve, V iμ As V μ Substitute it into formula (3) to calculate.

[0113] Exemplarily, the acceleration penalty function satisfies formula (4):

[0114]

[0115] A iμrepresents the acceleration of point μ on the fitting curve, where i is the subscript of the control point, A iμ Related to the i-th control point, A iμ The size of can be determined from the acceleration curve.

[0116] F a (A iμ ) satisfies formula (5):

[0117]

[0118] A max A represents the preset acceleration threshold, i.e. the maximum acceleration at which the lawn mower can be controlled. μ Represents the acceleration of point μ on the fitting curve. The calculation method is similar to formula (3).

[0119] The second penalty function f k Satisfies formula (6):

[0120] f k =f ν +f a Formula (6)

[0121] Among them, f k The smaller the value of f, the smaller the speed and acceleration of the lawn mower, and it is more difficult to exceed the maximum speed and maximum acceleration allowed by the lawn mower. On the contrary, f k The larger the value is, the smaller the speed and acceleration of the lawn mower are, and it is easier to exceed the maximum speed and maximum acceleration allowed to be controlled by the lawn mower.

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

[0123] In the present application, the third penalty function corresponding to the collision constraint condition 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):

[0124]

[0125] Among them, F c (d(Q i )) is the same as d(Q i ) and d thr The relevant cost function satisfies formula (8):

[0126]

[0127] Among them, d(Q i ) represents the control point Q i The distance to the nearest obstacle; d thrRepresents a pre-specified distance threshold.

[0128] Among them, f c The smaller the value of f, the smaller the distance between the lawn mower and the obstacle, and the more likely it is to collide with the obstacle; conversely, c The larger the value, the greater the distance between the lawn mower and the obstacle, and the lawn mower can avoid obstacles and avoid collisions.

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

[0130] In the present application, it is expected that the difference between the control points before and after optimization does not exceed expectations, that is, it is expected that the fitting curve can be as close to the reference path as possible.

[0131] Exemplarily, the present application integrates the norms between the control points and the known quantities corresponding to the control points through a fourth penalty function, thereby describing the difference between the optimized fitting curve and the reference path.

[0132] The fourth penalty function f ref Satisfies formula (9):

[0133]

[0134] Among them, Q i,ref Provided by the upper layer with control point Q i Related known quantities, i.e. reference control points.

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

[0136] The first penalty function corresponding to the smoothness constraint, the second penalty function corresponding to the speed 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 method of the penalty functions corresponding to the dimensions of smoothness, speed, collision, and reference path distance is not limited to the above formulas (1) to (9), and can also be obtained by other methods, which is not limited in this disclosure.

[0137] Next, an implementation method of how to determine whether a fitting curve satisfies a set of constraint conditions based on the first to fourth penalty functions is introduced.

[0138] See also Figure 4 In the embodiment shown, the method of this embodiment includes:

[0139] S401. Calculate and obtain a first penalty function, a second penalty function, a third penalty function, and a fourth penalty function.

[0140] The first penalty function to the fourth penalty function can be calculated by referring to formula (1) to formula (9).

[0141] S402: Whether the first penalty function is greater than or equal to a first preset value.

[0142] For the smoothness constraint, if the first penalty function is greater than or equal to the first preset value, it is determined that the fitting curve meets the smoothness constraint and S403 is executed; if the first penalty function does not meet the first preset value, it is determined that the fitting curve does not meet the smoothness constraint and jumps to S407.

[0143] S403: Whether the second penalty function is less than a second preset value.

[0144] For speed constraints:

[0145] In some embodiments, the sum of the speed 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 it is determined that the fitting curve meets the speed constraint condition. If the second speed penalty function is greater than or equal to the second preset value, then it is determined that the fitting curve does not meet the speed constraint condition.

[0146] In some other embodiments, if the speed penalty function f ν Greater than the speed threshold V in the speed constraint max , it is determined that the fitting curve does not meet the speed constraint condition regarding the maximum speed at which the lawn mower can be controlled; if the speed penalty function f ν Less than or equal to the speed threshold V in the speed constraint condition max , then it is determined that the fitting curve meets the speed constraint condition regarding the maximum speed at which the lawn mower can be controlled. If the acceleration penalty function f a Greater than the acceleration threshold A in the speed constraint max If the acceleration penalty function f a Less than or equal to the acceleration threshold A in the speed constraint max , it is determined that the fitting curve meets the speed constraint condition regarding the maximum acceleration of the lawn mower that can be controlled.

[0147] If the speed penalty function satisfies the speed threshold V max , and the acceleration penalty function satisfies the acceleration threshold A max, then it is determined that the fitting curve meets the speed constraint condition, and S404 is executed. If any of the speed penalty function and the acceleration penalty function does not meet the corresponding threshold, then it is determined that the fitting curve does not meet the speed constraint condition, and the process jumps to S407.

[0148] S404: Whether the third penalty function is greater than or equal to a third preset value.

[0149] For collision constraint conditions, the determination process includes the following steps:

[0150] If the third penalty function is greater than or equal to the third preset value, it is determined that the fitting curve meets the collision constraint condition, and S405 is executed; if the third penalty function does not meet the third preset value, it is determined that the fitting curve does not meet the collision constraint condition, and jump to S407.

[0151] S405: Whether the fourth penalty function is less than a fourth preset value.

[0152] For the reference path distance constraint, the determination process includes the following steps:

[0153] If the fourth penalty function is less than the fourth preset value, it is determined that the fitting curve meets the reference path distance constraint; if the fourth penalty function is greater than or equal to the fourth preset value, it is determined that the fitting curve does not meet the reference path distance constraint.

[0154] S406: Determine whether the fitting curve satisfies all constraints.

[0155] S407: Determine whether the fitting curve satisfies all constraint conditions.

[0156] pass Figure 4 The method of the embodiment can accurately determine which constraint condition the fitting curve does not satisfy. Based on this, when adjusting the control point, the control point can be adjusted in a targeted manner in combination with the constraint condition that the fitting curve does not satisfy, providing a data basis for the control point adjustment.

[0157] See also Figure 5 As shown, the method of this embodiment includes:

[0158] S501. Calculate and obtain a first penalty function, a second penalty function, a third penalty function, and a fourth penalty function.

[0159] S502: Perform 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.

[0160] S503, determine whether the fifth penalty function is less than the fifth preset value. If less than, jump to S504, determine whether the fitting curve meets all constraints; if greater than or equal to, jump to S505, determine whether the fitting curve does not meet all constraints, at this time, do not need to pay attention to which constraint the fitting curve does not meet.

[0161] For example, the fifth penalty function is calculated by formula (10):

[0162] f total =λ 1 f s +λ 2 f c +λ 3 (f v +f a )+λ 4 f ref Formula (10)

[0163] Among them, f total represents the fifth penalty function, λ 1 , 2 , 3 , 4 are the weighting coefficients of the first penalty function to the fourth penalty function respectively.

[0164] This application quantifies the performance of the fitting curve in terms of smoothness, speed, collision and reference path distance into numerical values, and then uses Figure 4 The single comparison method shown in the examples or Figure 5 The overall comparison method shown in the embodiment is simple and efficient, which is conducive to improving the efficiency of path tracking processing.

[0165] Figure 6 This is a structural diagram of a lawn mower path tracking device provided by an embodiment of the present application. Figure 6 As shown, the lawn mower path tracking device 600 provided in this embodiment includes:

[0166] The reference path determination module 601 is used to determine a reference path according to the current position of the lawn mower and the target end position of the lawn mower; wherein the reference path is a preset path starting from the current position and ending at the target end position.

[0167] The control point determination module 602 is used to determine a plurality of control points.

[0168] A curve fitting module 603 is used to perform B-spline curve fitting based on the multiple control points and the discrete points on the reference path to obtain a fitting curve;

[0169] The determination module 604 is used to determine whether the fitting curve satisfies all constraints in a constraint set, wherein the constraint set includes: a smoothness constraint, a speed constraint, an acceleration constraint, a collision constraint, and a reference path distance constraint.

[0170] If not, the control point determination module 602 is further configured to adjust the multiple control points.

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

[0172] If the conditions are met, the control module 605 controls the lawn mower to travel along the fitting curve.

[0173] In some embodiments, the determination module 604 is specifically used to determine whether the fitting curve satisfies all constraints in the following manner:

[0174] 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 B-spline curve fitting order, wherein the first penalty function corresponds to the smoothness constraint condition;

[0175] Deriving the fitting curve to obtain a velocity curve and an acceleration curve, obtaining a velocity penalty function according to the velocity curve and obtaining 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 velocity constraint condition and the acceleration penalty function corresponds to the acceleration constraint condition;

[0176] Obtaining a third penalty function according to first distances between the plurality of control points and corresponding nearest obstacles; the third penalty function corresponds to the collision constraint condition;

[0177] A fourth penalty function is obtained according to a second distance between the fitting curve and the reference path; the second distance is the shortest distance between the fitting curve and the reference path; the fourth penalty function corresponds to the reference path distance constraint;

[0178] 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;

[0179] If the fifth penalty function is less than or equal to a preset threshold, it is determined that the fitting curve satisfies all the constraints; if the fifth penalty function is greater than the preset threshold, it is determined that the fitting curve does not satisfy all the constraints.

[0180] The determination module 604 can calculate the first penalty function to the fifth penalty function through the above formula (1) to formula (10). The calculation process can be referred to the detailed description above. For the sake of brevity, it will not be repeated here.

[0181] In some embodiments, the control point determination module 602 is specifically used to adjust the position of the first control point among the multiple control points, and perform B-spline curve fitting based on the adjusted first control point, the unadjusted second control point among the multiple control points, and the 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 multiple control points that is closest to the two endpoints of the reference path respectively; and the first control point includes all control points among the multiple control points except the second control point.

[0182] The lawn mower path tracking device provided in this embodiment can be used to implement the technical solution of any of the aforementioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0183] Figure 7 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 7 As shown, the electronic device 700 provided in this embodiment includes: a memory 701 and a processor 702 .

[0184] The memory 701 may be an independent physical unit, and may be connected to the processor 702 via a bus 703. The memory 701 and the processor 702 may also be integrated together and implemented via hardware. The memory 701 is used to store program instructions, and the processor 702 calls the program instructions to execute the technical solution of any of the above method embodiments.

[0185] Optionally, when part or all of the methods of the above embodiments are implemented by software, the electronic device 700 may also include only a processor 702. The memory 701 for storing programs is located outside the electronic device 700, and the processor 702 is connected to the memory through circuits / 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 a 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.

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

[0187] Illustratively, the present disclosure provides a chip system, the chip system comprising: a processor; the processor is used to execute the technical solution of any of the above method embodiments.

[0188] Exemplarily, the present disclosure provides a readable storage medium on which computer program instructions are stored. The computer program instructions are executed by a processor of an electronic device so that the electronic device executes the technical solution of any of the above method embodiments.

[0189] Illustratively, the present disclosure provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the technical solution of any of the above method embodiments.

[0190] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0191] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be 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 the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A lawn mower path tracking method, characterized in that: include: Determine a reference path according to the current position of the lawn mower and the target end position of the lawn mower; wherein the reference path is a preset path with the current position as the starting point and the target end position as the end point; Identify multiple control points; Perform B-spline curve fitting based on the multiple control points and the discrete points on the reference path to obtain a fitting curve; Determining whether the fitting curve satisfies all constraints in a constraint set, wherein the constraint set includes: a smoothness constraint, a speed constraint, an acceleration constraint, a collision constraint, and a reference path distance constraint; If not, adjusting the multiple control points, and performing B-spline curve fitting based on the adjusted multiple control points and the discrete points on the reference path, until a fitting curve that satisfies all the constraint conditions is obtained; If the condition is satisfied, the lawn mower is controlled to travel along the fitting curve.

2. The method according to claim 1, characterized in that: The step of determining whether the fitting curve satisfies various constraint conditions in the constraint set includes: 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 B-spline curve fitting order, wherein the first penalty function corresponds to the smoothness constraint condition; Deriving the fitting curve to obtain a velocity curve and an acceleration curve, obtaining a velocity penalty function according to the velocity curve and obtaining 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 velocity constraint condition and the acceleration penalty function corresponds to the acceleration constraint condition; Obtaining a third penalty function according to first distances between the plurality of control points and corresponding nearest obstacles; the third penalty function corresponds to the collision constraint condition; A fourth penalty function is obtained according to a second distance between the fitting curve and the reference path; the second distance is the shortest distance between the fitting curve and the reference path; the fourth penalty function corresponds to the reference path distance constraint; 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, determining 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 according to claim 2, characterized in that The step of obtaining a first penalty function of the fitting curve according to the position of each control point in the control point set, the number of discrete points of the B-spline curve fitting, and the B-spline curve fitting order includes: Based on the formula: Get the first penalty function f s ; where N represents the number of discrete points of the fitting, p b Indicates the B-spline curve fitting order, Q i represents the i-th control point.

4. The method according to claim 2, characterized in that: The method of derivatizing the fitting curve to obtain a speed curve and an acceleration curve, obtaining a speed penalty function according to the speed curve and obtaining an acceleration penalty function according to the acceleration curve, and taking the sum of the speed penalty function and the acceleration penalty function as a second penalty function comprises: According to the formula: Get the speed penalty function f v ;in, V max represents the preset speed threshold; μ represents a point on the fitting curve, x, y, z represent the coordinates of the point μ on the fitting curve; N represents the number of discrete points of the B-spline curve fitting, p b Indicates the B-spline curve fitting order; V iμ represents the velocity of point μ on the fitting curve, where i is the subscript of the control point, V iμ Related to the i-th control point; According to the formula: Get the acceleration penalty function f a ;in, A max Indicates a preset acceleration threshold; The sum of the speed penalty function and the acceleration penalty function is determined as the second penalty function.

5. The method according to claim 2, characterized in that: The obtaining a third penalty function according to the first distances between the plurality of control points and the corresponding nearest obstacles comprises: According to the formula: Calculate the third penalty function f c ; in, N represents the number of discrete points for fitting, p b Indicates the B-spline curve fitting order, Q i represents the i-th control point, d(Q i ) represents the control point Q i The minimum distance to the obstacle.

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

7. The method according to claim 1, characterized in that The adjusting the multiple control points and performing B-spline curve fitting based on the adjusted multiple control points and discrete points on the reference path until a fitting curve satisfying all the constraint conditions is obtained includes: Adjust the position of a first control point among the multiple control points, and perform B-spline curve fitting based on the adjusted first control point, an unadjusted second control point among the multiple 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 a control point among the multiple control points that is closest to the two endpoints of the reference path respectively; and the first control point includes all control points among the multiple control points except the second control point.

8. An electronic device, characterized in that: include: Memory and processor; The memory is configured to store computer program instructions; The processor is configured to execute the computer program instructions so that the electronic device implements the method according to any one of claims 1 to 7.

9. A chip, characterized in that: include: 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 method according to any one of claims 1 to 7.

10. A lawn mower, characterized in that: include: The electronic device as claimed in claim 8, or the chip as claimed in claim 9.

Citation Information

Cited By

  • Mower path tracking method, electronic device, chip and mower

    WO2026016867A3