A local path determination method, a determination device, equipment and a storage medium
By judging and updating the included angle and coordinate values of the planned path points, spline curves are generated, which solves the problem of high computational complexity in the existing technology and improves the efficiency of determining local paths for automated machines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEICHAI POWER CO LTD
- Filing Date
- 2023-04-17
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies involve rotating the coordinates of adjacent planned path points when generating spline curves, resulting in high computational complexity and reducing the efficiency of determining local paths for automated machines.
By determining the angle and coordinate arrangement of four adjacent planned path points, the path points are updated and spline curves are generated, reducing unnecessary coordinate rotations and improving computational efficiency.
This reduces computational complexity and improves the efficiency of spline curve generation, thereby improving the efficiency of determining local paths in automated machines.
Smart Images

Figure CN116576858B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of path planning technology, and in particular to a method, apparatus, device and storage medium for determining a local path. Background Technology
[0002] In agricultural operations, automated machines are being used more and more widely, for example, in tilling, fertilizing, spraying pesticides, and harvesting. In some scenarios, when automated machines are operating in farmland, it is necessary to plan the machine to travel along a series of planned path points to complete a curved journey.
[0003] In related technologies, completing curved driving requires determining the local path of an automated machine. Generally, this is done by rotating the coordinates of two adjacent planned path points based on their original yaw angles, obtaining the rotated coordinate values and yaw angles of the two planned path points. This ensures that the x-axis coordinate values of the multiple planned path points are not repeated and are arranged in ascending order. This process generates a spline curve and interpolates it to obtain multiple interpolated path points, thereby determining the local path of the automated machine.
[0004] However, in some cases, it is not necessary to rotate the coordinates of two adjacent planned path points when generating spline curves. That is, the above method directly rotates the coordinates of two planned path points, which may increase unnecessary computation and increase computational complexity, thereby reducing the efficiency of spline curve generation and thus reducing the efficiency of local path determination of the automatic machine. Summary of the Invention
[0005] In view of this, embodiments of this application provide a method, apparatus, device, and storage medium for determining local paths, which reduces unnecessary computation, lowers computational complexity, and improves the efficiency of spline curve generation, thereby improving the efficiency of determining local paths for the target machine.
[0006] On one hand, embodiments of this application provide a method for determining a local path, the method comprising:
[0007] Based on whether the two included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°, the four planned path points are updated to obtain four updated path points; the two included angles formed by connecting the four updated path points end to end in the fixed order are both greater than 90°.
[0008] If the x-axis coordinates of the four updated path points are arranged in order, a spline curve is generated based on the initial coordinates of the four updated path points;
[0009] If the y-axis coordinates of the four updated path points are arranged in order, the x-axis and y-axis coordinates of the initial coordinates of the four updated path points are swapped to obtain the swapped coordinates of the four updated path points, and the spline curve is generated based on the swapped coordinates of the four updated path points.
[0010] If the x-axis coordinates of the four updated path points are not in order, and the y-axis coordinates of the four updated path points are not in order, the initial coordinate system is rotated around the origin to obtain the rotated coordinate values of the four updated path points, and the spline curve is generated based on the rotated coordinate values of the four updated path points; the x-axis coordinates of the four updated path points are in order.
[0011] If the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, the spline curve is interpolated to obtain multiple interpolation path points;
[0012] The local path of the target machine is determined based on the four updated path points and the plurality of interpolated path points.
[0013] Optionally, the step of updating the four planned path points to obtain four updated path points based on whether the two included angles formed by connecting the four adjacent planned path points end to end in sequence are both greater than 90° includes:
[0014] If both of the first included angles are greater than 90°, the four planned path points will be directly determined as the four updated path points.
[0015] If only one of the two included angles is less than or equal to 90°, the preset planned path point corresponding to the first included angle less than or equal to 90° among the four planned path points is updated to the midpoint of the line connecting the two planned path points before and after the preset planned path point, and the four updated path points are obtained.
[0016] If both of the first included angles are less than or equal to 90°, the two planned path points corresponding to the two first included angles are updated to the trisection points on the line connecting the first and fourth planned path points among the four planned path points, thus obtaining the four updated path points.
[0017] Optionally, rotating the initial coordinate system around the origin to obtain the rotated coordinate values of the four updated path points includes:
[0018] Determine the target angle formed by the line connecting the second and third updated path points among the four updated path points and the positive x-axis;
[0019] Rotate the initial coordinate system around the origin according to the target angle to obtain the rotation coordinate values of the four updated path points.
[0020] Optionally, the step of obtaining the next interpolation path point based on the previous interpolation path point among the plurality of interpolation path points includes:
[0021] Based on the x-axis coordinates of the previous interpolation path point and the preset spacing, determine the x-axis coordinates of the next interpolation path point;
[0022] The y-axis coordinate of the next interpolation path point is determined based on the x-axis coordinate of the next interpolation path point and the spline curve.
[0023] Based on the x-axis coordinate value of the previous interpolation path point, the y-axis coordinate value of the previous interpolation path point, the x-axis coordinate value of the next interpolation path point, and the y-axis coordinate value of the next interpolation path point, determine the actual distance between the next interpolation path point and the previous interpolation path point;
[0024] If the difference between the preset spacing and the actual spacing meets the preset difference range, the next interpolation path point is obtained based on the x-axis coordinate value and the y-axis coordinate value of the next interpolation path point.
[0025] If the difference between the preset spacing and the actual spacing does not conform to the preset difference range, the x-axis coordinate value of the next interpolation path point is reduced, and the process of determining the y-axis coordinate value of the next interpolation path point based on the x-axis coordinate value of the next interpolation path point and the spline curve is repeated until the difference between the preset spacing and the actual spacing conforms to the preset difference range to obtain the next interpolation path point.
[0026] Optionally, determining the local path of the target machine based on the four updated path points and the plurality of interpolated path points specifically involves:
[0027] If a spline curve is generated based on the initial coordinate values of the four updated path points, the local path of the target machine is determined based on the initial coordinate values of the four updated path points and the calculated coordinate values of the multiple interpolated path points.
[0028] Optionally, determining the local path of the target machine based on the four updated path points and the plurality of interpolated path points includes:
[0029] If the spline curve is generated based on the exchanged coordinate values of the four updated path points, the x-axis coordinate values and y-axis coordinate values of the calculated coordinate values of the multiple interpolation path points are exchanged to obtain the exchanged coordinate values of the multiple interpolation path points;
[0030] The local path of the target machine is determined based on the initial coordinate values of the four updated path points and the exchanged coordinate values of the multiple interpolated path points.
[0031] Optionally, determining the local path of the target machine based on the four updated path points and the plurality of interpolated path points includes:
[0032] If the spline curve is generated based on the rotation coordinate values of the four updated path points, the restored coordinate values of the multiple interpolation path points are obtained by restoring them to the initial coordinate system.
[0033] The local path of the target machine is determined based on the initial coordinates of the four updated path points and the restored coordinates of the multiple interpolated path points.
[0034] On the other hand, embodiments of this application provide a local path determination apparatus, the apparatus comprising: an update unit, a generation unit, an interpolation unit, and a determination unit;
[0035] The updating unit is used to update the four planned path points to obtain four updated path points based on whether the two first included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°; the two second included angles formed by connecting the four updated path points end to end in the fixed order are both greater than 90°.
[0036] The generation unit is configured to: if the x-axis coordinates of the four updated path points are arranged in order, generate a spline curve based on the initial coordinates of the four updated path points; if the y-axis coordinates of the four updated path points are arranged in order, swap the x-axis and y-axis coordinates of the initial coordinates of the four updated path points to obtain swapped coordinates of the four updated path points, and generate the spline curve based on the swapped coordinates of the four updated path points; if the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, rotate the initial coordinate system around the origin to obtain rotated coordinates of the four updated path points, and generate the spline curve based on the rotated coordinates of the four updated path points; wherein the x-axis coordinates of the rotated coordinates of the four updated path points are arranged in order.
[0037] The interpolation unit is used to interpolate the spline curve if the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, so as to obtain multiple interpolation path points.
[0038] The determining unit is used to determine the local path of the target machine based on the four updated path points and the plurality of interpolated path points.
[0039] Optionally, the update unit is specifically used for:
[0040] If both of the first included angles are greater than 90°, the four planned path points will be directly determined as the four updated path points.
[0041] If only one of the two included angles is less than or equal to 90°, the preset planned path point corresponding to the first included angle less than or equal to 90° among the four planned path points is updated to the midpoint of the line connecting the two planned path points before and after the preset planned path point, and the four updated path points are obtained.
[0042] If both of the first included angles are less than or equal to 90°, the two planned path points corresponding to the two first included angles are updated to the trisection points on the line connecting the first and fourth planned path points among the four planned path points, thus obtaining the four updated path points.
[0043] Optionally, the generation unit is specifically used for:
[0044] If the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, determine the target angle formed by the line connecting the second and third updated path points and the positive x-axis.
[0045] Rotate the initial coordinate system around the origin according to the target angle to obtain the rotation coordinate values of the four updated path points, and generate the spline curve based on the rotation coordinate values of the four updated path points; the x-axis coordinate values of the four updated path points are arranged in order.
[0046] Optional, interpolation unit, specifically used for:
[0047] Based on the x-axis coordinates of the previous interpolation path point and the preset spacing, determine the x-axis coordinates of the next interpolation path point;
[0048] The y-axis coordinate of the next interpolation path point is determined based on the x-axis coordinate of the next interpolation path point and the spline curve.
[0049] Based on the x-axis coordinate value of the previous interpolation path point, the y-axis coordinate value of the previous interpolation path point, the x-axis coordinate value of the next interpolation path point, and the y-axis coordinate value of the next interpolation path point, determine the actual distance between the next interpolation path point and the previous interpolation path point;
[0050] If the difference between the preset spacing and the actual spacing meets the preset difference range, the next interpolation path point is obtained based on the x-axis coordinate value and the y-axis coordinate value of the next interpolation path point.
[0051] If the difference between the preset spacing and the actual spacing does not conform to the preset difference range, the x-axis coordinate value of the next interpolation path point is reduced, and the process of determining the y-axis coordinate value of the next interpolation path point based on the x-axis coordinate value of the next interpolation path point and the spline curve is repeated until the difference between the preset spacing and the actual spacing conforms to the preset difference range to obtain the next interpolation path point.
[0052] Optionally, the determining unit is specifically used for:
[0053] If a spline curve is generated based on the initial coordinate values of the four updated path points, the local path of the target machine is determined based on the initial coordinate values of the four updated path points and the calculated coordinate values of the multiple interpolated path points.
[0054] Optionally, the determining unit is specifically used for:
[0055] If the spline curve is generated based on the exchanged coordinate values of the four updated path points, the x-axis coordinate values and y-axis coordinate values of the calculated coordinate values of the multiple interpolation path points are exchanged to obtain the exchanged coordinate values of the multiple interpolation path points;
[0056] The local path of the target machine is determined based on the initial coordinate values of the four updated path points and the exchanged coordinate values of the multiple interpolated path points.
[0057] Optionally, the determining unit is specifically used for:
[0058] If the spline curve is generated based on the rotation coordinate values of the four updated path points, the restored coordinate values of the multiple interpolation path points are obtained by restoring them to the initial coordinate system.
[0059] The local path of the target machine is determined based on the initial coordinates of the four updated path points and the restored coordinates of the multiple interpolated path points.
[0060] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0061] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0062] The processor is configured to execute the methods described above according to instructions in the computer program.
[0063] On the other hand, embodiments of this application provide a computer-readable storage medium for storing a computer program for implementing the methods described above.
[0064] Compared with the prior art, this application has at least the following advantages:
[0065] Using the technical solution of this application embodiment, firstly, it is determined whether the two first included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°, so as to update the four planned path points to obtain four updated path points, and make the two second included angles formed by connecting the four updated path points end to end in a fixed order greater than 90°. Secondly, when the x-axis coordinates of the four updated path points are arranged in order, a spline curve is generated using the initial coordinates of the four updated path points. When the y-axis coordinates of the four updated path points are arranged in order, the x-axis and y-axis coordinates of the initial coordinates of the four updated path points are swapped to obtain swapped coordinates of the four updated path points to generate a spline curve. When the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, the initial coordinate system is rotated around the origin to obtain rotated coordinates of the four updated path points to generate a spline curve, wherein the x-axis coordinates of the rotated coordinates of the four updated path points are arranged in order. Then, if the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, multiple interpolation path points are obtained by interpolating the spline curve. Finally, the local path of the target machine is determined using the four updated path points and the multiple interpolation path points.
[0066] As can be seen, this method, based on updating four adjacent planned path points so that the two included angles formed by connecting the four updated path points end-to-end in a fixed order are both greater than 90°, adds a check to determine whether the x-axis and y-axis coordinates of the four updated path points are in order. Only when the x-axis and y-axis coordinates of the four updated path points are not in order is it necessary to calculate the rotated coordinates of the four updated path points to generate a spline curve. When the x-axis or y-axis coordinates of the four updated path points are in order, no coordinate rotation is needed to quickly and conveniently generate a spline curve. This curve is then used for interpolation to obtain multiple interpolated path points, thereby determining the local path of the target machine. In other words, this method reduces unnecessary computation, lowers computational complexity, and improves the efficiency of spline curve generation, thus improving the efficiency of determining the local path of the target machine. Attached Figure Description
[0067] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is a schematic diagram of the system framework involved in one application scenario in the embodiments of this application;
[0069] Figure 2 A flowchart illustrating a method for determining a local path provided in an embodiment of this application;
[0070] Figure 3 A schematic diagram provided for embodiments of this application, showing a case where only one of the two included angles is less than 90°, and a case where both included angles are less than 90°;
[0071] Figure 4 A schematic diagram illustrating a process for obtaining four updated path points based on updating four adjacent planned path points, provided in an embodiment of this application;
[0072] Figure 5 This is a schematic diagram illustrating four updated path points arranged in order: x-axis coordinates, y-axis coordinates, and both x-axis and y-axis coordinates are not arranged in order, as provided in the embodiments of this application.
[0073] Figure 6 A schematic diagram illustrating a process for generating a spline curve based on four updated path points, provided for an embodiment of this application;
[0074] Figure 7 A schematic diagram illustrating the rotation of an initial coordinate system around the origin according to a target angle, provided in an embodiment of this application;
[0075] Figure 8 This application provides a schematic diagram illustrating how to obtain the next interpolation path point from the previous interpolation path point.
[0076] Figure 9 This application provides a schematic diagram of a process for obtaining the next interpolation path point from the previous interpolation path point, as illustrated in an embodiment of the present application.
[0077] Figure 10 This application provides a schematic diagram of the structure for determining a local path in an embodiment. Detailed Implementation
[0078] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0079] Currently, in some scenarios, when automated machines operate in farmland, they need to be planned to traverse a series of planned path points to complete a curved path. Generally, this is done by rotating the coordinates of two adjacent planned path points based on their original yaw angles, obtaining their rotated coordinates and yaw angles. This ensures that the x-axis coordinates of the rotated path points are unique and arranged in ascending order. A spline curve is then generated, and multiple interpolated path points are obtained to determine the local path of the automated machine, thus completing the curved path traversal. However, research has found that in some cases, it is unnecessary to rotate the coordinates of adjacent planned path points when generating spline curves. That is, directly rotating the coordinates of two planned path points using the above method may increase unnecessary computational load, leading to high computational complexity and reduced efficiency in spline curve generation, which in turn reduces the efficiency of determining the local path of the automated machine.
[0080] To address this issue, in this embodiment, after updating four adjacent planned path points so that the two included angles formed by connecting the four updated path points end-to-end in a fixed order are both greater than 90°, a method is added to determine whether the x-axis and y-axis coordinates of the four updated path points are in order. Only when the x-axis and y-axis coordinates of the four updated path points are not in order is it necessary to calculate the rotated coordinates of the four updated path points to generate a spline curve. When either the x-axis or y-axis coordinates of the four updated path points are in order, no coordinate rotation is required to quickly and conveniently generate the spline curve. Multiple interpolated path points are then obtained through interpolation, thereby determining the local path of the target machine. In other words, this method reduces unnecessary computation, lowers computational complexity, and improves the efficiency of spline curve generation, thus improving the efficiency of determining the local path of the target machine.
[0081] For example, one scenario in the embodiments of this application can be applied to, such as Figure 1 The scenario shown includes a controller 101 and a target machine 102. The controller 101 and the target machine 102 interact with each other. The controller 101 executes the implementation method provided in this application embodiment, determines the local path of the target machine 101, and sends the local path to the target machine 102 so that the target machine 102 can perform operations according to the local path.
[0082] First, in the above application scenarios, although the action description of the implementation method provided in this application is executed by the controller 101, the implementation method of this application is not limited in terms of the execution subject, as long as the action disclosed in the implementation method provided in this application is executed.
[0083] Secondly, the above scenario is only one example provided by the embodiments of this application, and the embodiments of this application are not limited to this scenario.
[0084] The following detailed description, in conjunction with the accompanying drawings and through embodiments, illustrates the specific implementation of the method, apparatus, device, and storage medium for determining local paths in this application.
[0085] First, the specific implementation of the local path determination method in the embodiments of this application will be explained in detail through examples.
[0086] See Figure 2 This diagram illustrates a flowchart of a method for determining a local path according to an embodiment of this application. In this embodiment, the method may include, for example, the following steps:
[0087] Step 201: Based on whether the two first included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°, update the four planned path points to obtain four updated path points; the two second included angles formed by connecting the four updated path points end to end in a fixed order are both greater than 90°.
[0088] In this embodiment of the application, in order to plan the target machine to complete the curved driving by sequentially passing through a series of planned path points, it is necessary to select four adjacent planned path points to determine the local path of the automated machine. After selecting the four adjacent planned path points, firstly, the four planned path points need to be updated to four updated path points that meet the turning requirements of the automated machine. That is, the four planned path points are connected end to end in a fixed order to form two first included angles, and it is determined whether both first included angles are greater than 90° to obtain a first judgment result; the four planned path points are updated according to the first judgment result to obtain four updated path points, such that the four updated path points are connected end to end in a fixed order to form two second included angles, and both second included angles are greater than 90°.
[0089] In the specific implementation of step 201, the first judgment result obtained by determining whether both first included angles are greater than 90° may be as follows:
[0090] One possibility is that the first judgment result is that both first included angles are greater than 90°; in this case, the four planned path points can be directly determined as the four updated path points without changing the four planned path points.
[0091] Another possibility is that the first judgment result is that one of the two included angles is less than or equal to 90° and the other is greater than 90°, that is, only one of the two included angles is less than or equal to 90°. In this case, in order to update the included angle less than or equal to 90° to the included angle greater than 90°, it is necessary to update the preset planned path points corresponding to the included angle less than or equal to 90° among the four planned path points. The simplest and most convenient update method is to update the preset planned path point using the midpoint of the line connecting the two planned path points before and after the preset planned path point, and obtain the updated preset planned path point. Based on this, the updated preset planned path point is used to replace the original preset planned path point among the four planned path points to obtain four updated path points.
[0092] Another possibility is that the first judgment result is that both first included angles are less than or equal to 90°. In this case, in order to update both first included angles less than or equal to 90° to two second included angles greater than 90°, it is necessary to update the two planned path points corresponding to the two first included angles less than or equal to 90° among the four planned path points, that is, to update the second and third planned path points among the four planned path points. The simplest and most convenient update method is to use the trisection point on the line connecting the first and fourth planned path points among the four planned path points to update the second and third planned path points, obtaining the updated second and third planned path points. Based on this, among the four planned path points, the updated second planned path point replaces the second planned path point, and the updated third planned path point replaces the third planned path point, obtaining four updated path points. Therefore, in an optional embodiment of this application, step 201 may include, for example, the following steps 2011, 2012, or 2013:
[0093] Step 2011: If both first angles are greater than 90°, the four planned path points are directly determined as four updated path points.
[0094] Step 2012: If only one of the two included angles is less than or equal to 90°, update the preset planned path point corresponding to the first included angle less than or equal to 90° among the four planned path points to the midpoint of the line connecting the two planned path points before and after the preset planned path point, and obtain four updated path points.
[0095] Step 2013: If both first included angles are less than or equal to 90°, update the two planned path points corresponding to the two first included angles to the trisection points on the line connecting the first and fourth planned path points among the four planned path points, and obtain four updated path points.
[0096] As an example, see Figure 3 The diagram illustrates a scenario where only one of the two included angles is less than 90°, and where both included angles are less than 90°, according to an embodiment of this application. The four adjacent planned path points are a, b, c, and d, with coordinates (x1, y1), (x2, y2), (x3, y3), and (x4, y4). a, b, c, and d are connected end-to-end in a fixed order a→b→c→d to form two included angles α and β. Figure 3 In the diagram (a), α < 90° and β > 90°, the preset planned path point b corresponding to α needs to be updated. b is updated by using the midpoint of the line connecting the two planned path points a and b before and after b, resulting in the updated preset planned path point b'. Among a, b, c, and d, b is replaced by b', resulting in four updated path points a, b', c, and d. Figure 3 In the diagram (b), α < 90° and β < 90°, the two planned path points b and c corresponding to α and β need to be updated. Using the trisection points on the line connecting the first planned path point a and the fourth planned path point d, we update b and c, resulting in the updated second planned path point b' and c'. Then, among a, b, c, and d, we replace b with b' and c with c', obtaining the four updated path points a, b', c', and d.
[0097] As an example, see Figure 4 The illustration shows a flowchart of an embodiment of this application for obtaining four updated path points based on updating four adjacent planned path points; wherein, four planned path points are obtained, and it is determined whether the two first included angles are both greater than 90°. If so, four updated path points are directly obtained; if not, the four planned path points are updated to obtain four updated path points.
[0098] In related technologies, the coordinates of four updated path points are directly rotated based on their original yaw angles to obtain their rotated coordinates and yaw angles. This ensures that the x-axis coordinates of the four updated path points are unique and arranged in ascending order. This generates a spline curve, which is then interpolated to obtain multiple interpolated path points, determining the local path of the automated machine and planning its traversal through a series of planned path points. However, research has revealed that in some cases, rotating the coordinates of the four updated path points is unnecessary when generating the spline curve. In other words, directly rotating the coordinates of the four updated path points in the above method may increase unnecessary computational load and computational complexity, leading to reduced efficiency in spline curve generation and consequently, reduced efficiency in determining the local path of the automated machine.
[0099] In this embodiment, instead of directly rotating the coordinates of the four updated path points based on their original yaw angles, it first determines whether the x-axis or y-axis coordinates of the four updated path points are arranged in order, and obtains a second determination result. Based on the second determination result, a spline curve is generated based on the four updated path points, i.e., the following steps 202, 203 or 204 are executed.
[0100] The second determination result, obtained by checking whether the x-axis or y-axis coordinates of the four updated path points are arranged in order, may look like the following:
[0101] One possibility is that the second judgment result is that the x-axis coordinates of the four updated path points are arranged in order, indicating that the x-axis coordinates of the four updated path points themselves meet the requirements for generating a spline curve; in this case, there is no need to change the four updated path points, and the initial coordinates of the four updated path points can be used to directly generate a spline curve.
[0102] Another possibility is that the second judgment result is that the y-axis coordinates of the four updated path points are arranged in order, indicating that the y-axis coordinates of the four updated path points can be used as x-axis coordinates to meet the requirements for generating a spline curve. In this case, it is necessary to first swap the x-axis and y-axis coordinates of the initial coordinates of the four updated path points to obtain the swapped coordinates of the four updated path points, and then use the swapped coordinates of the four updated path points to generate a spline curve.
[0103] Another possibility is that the second judgment result is that the x-axis and y-axis coordinates of the four updated path points are not arranged in order, indicating that the x-axis and y-axis coordinates of the four updated path points do not meet the requirements for generating a spline curve. In this case, it is necessary to first rotate the initial coordinate system around the origin to obtain the rotated coordinate values of the four updated path points, so that the x-axis coordinate values of the four updated path points are arranged in order to meet the requirements for generating a spline curve, and then use the rotated coordinate values of the four updated path points to generate a spline curve.
[0104] Step 202: If the x-axis coordinates of the four updated path points are arranged in order, generate a spline curve based on the initial coordinates of the four updated path points.
[0105] Step 203: If the y-axis coordinates of the four updated path points are arranged in order, swap the x-axis and y-axis coordinates of the initial coordinates of the four updated path points to obtain the swapped coordinates of the four updated path points, and generate a spline curve based on the swapped coordinates of the four updated path points.
[0106] Step 204: If the x-axis coordinates of the four updated path points are not in order, and the y-axis coordinates of the four updated path points are not in order, rotate the initial coordinate system around the origin to obtain the rotated coordinates of the four updated path points, and generate a spline curve based on the rotated coordinates of the four updated path points; the x-axis coordinates of the four updated path points are in order.
[0107] As an example, see Figure 5 The illustration shows a schematic diagram of four updated path points arranged in order: x-axis coordinates, y-axis coordinates, and both x-axis and y-axis coordinates are not in order, according to embodiments of this application. Figure 5 In the middle (a), the x-axis coordinates of the four updated path points are arranged in order. Figure 5 In the middle (b), the y-axis coordinates of the four updated path points are arranged in order. Figure 5 In the middle (c), it means that the x-axis and y-axis coordinates of the four updated path points are not arranged in order.
[0108] As an example, see Figure 6 The diagram illustrates a flowchart of generating a spline curve based on four updated path points in an embodiment of this application. The process involves: acquiring four updated path points; determining whether the x-axis coordinates of the four updated path points are arranged in order; if so, generating a spline curve; if not, determining whether the y-axis coordinates of the four updated path points are arranged in order; if so, swapping the x-axis and y-axis coordinates of the initial coordinates of the four updated path points to generate a spline curve; if not, rotating the initial coordinate system around the origin to obtain the rotated coordinates of the four updated path points to generate a spline curve.
[0109] In the specific implementation of step 204, the x-axis and y-axis coordinates of the four updated path points are not arranged in order. First, the initial coordinate system is rotated around the origin so that the x-axis coordinates of the four updated path points in the rotated initial coordinate system are arranged in order. Based on the fact that the two included angles formed by connecting the four updated path points end to end in a fixed order are both greater than 90°, and considering that the line connecting the second and third updated path points in the rotated initial coordinate system is parallel to the positive x-axis, it can be ensured that the x-axis coordinates of the four updated path points are arranged in order. First, it is necessary to determine the target angle formed by the line connecting the second and third updated path points and the positive x-axis. Rotate the initial coordinate system around the origin according to the target angle to obtain the four updated path points in the rotated initial coordinate system, thereby obtaining the rotated coordinate values of the four updated path points. Therefore, in an optional embodiment of this application, step 204, which involves rotating the initial coordinate system around the origin to obtain the rotated coordinate values of the four updated path points, may include, for example, the following steps A-B:
[0110] Step A: Determine the target angle formed by the line connecting the second and third updated path points among the four updated path points and the positive x-axis.
[0111] Step B: Rotate the initial coordinate system around the origin according to the target angle to obtain the rotation coordinate values of the four updated path points.
[0112] As an example, see Figure 7 This illustration shows a schematic diagram of rotating an initial coordinate system about the origin according to a target angle, as described in an embodiment of this application; wherein, in Figure 5 In the middle (c), it indicates that the x-axis and y-axis coordinates of the four updated path points are not arranged in order. Figure 7 In diagram (a), the angle θ between the line connecting the second and third updated path points out of the four updated path points and the positive x-axis represents the target. Figure 7 In diagram (b), the initial coordinate system is rotated about the origin according to the target angle θ. Figure 7 In the diagram, (c) represents the four updated path points in the rotated initial coordinate system.
[0113] Given a target angle of θ, assuming the initial coordinates of one of the four updated path points are (x, y), the rotated coordinates of that updated path point are (x', y') obtained using the coordinate rotation formula, as shown below:
[0114]
[0115] Step 205: If the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, interpolate the spline curve to obtain multiple interpolation path points.
[0116] In this embodiment of the application, after generating the spline curve by performing step 202, step 203 or step 205, it is also necessary to determine whether the generated spline curve meets the curve driving requirements of the target machine, that is, to determine whether the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine. If so, it means that the spline curve meets the curve driving requirements of the target machine. In this case, the spline curve is interpolated to obtain multiple interpolation path points.
[0117] In the specific implementation of step 205, multiple interpolation path points are obtained by interpolating the spline curve using an iterative method. That is, the next interpolation path point among the multiple interpolation path points is obtained iteratively based on the previous interpolation path point and the spline curve. Specifically, to ensure a uniform distribution of the multiple interpolation path points and avoid increasing the distance difference between two adjacent interpolation path points, based on a pre-set fixed distance between two interpolation points as a preset interval, firstly, the x-axis coordinate value of the previous interpolation path point is added to the preset interval to obtain the x-axis coordinate value of the next interpolation path point; secondly, the x-axis coordinate value of the next interpolation path point is substituted into the spline curve to obtain the y-axis coordinate value of the next interpolation path point; then, the next interpolation path point is calculated using the x-axis coordinate value of the previous interpolation path point, the y-axis coordinate value of the previous interpolation path point, the x-axis coordinate value of the next interpolation path point, and the y-axis coordinate value of the next interpolation path point. The distance between the current interpolation path point and the previous interpolation path point is used as the actual spacing. Finally, it is determined whether the difference between the preset spacing and the actual spacing meets the preset difference range. If so, it means that the actual spacing meets the requirements of the preset spacing, and the next interpolation path point can be determined by the x-axis coordinate value and y-axis coordinate value of the next interpolation path point. If not, it means that the actual spacing does not meet the requirements of the preset spacing, and the actual spacing is much larger than the preset spacing. It is necessary to reduce the x-axis coordinate value of the next interpolation path point, re-substitute the spline curve to calculate the y-axis coordinate value of the next interpolation path point, and so on, until it is determined that the difference between the preset spacing and the actual spacing meets the preset difference range, thereby determining the next interpolation path point. Therefore, in an optional embodiment of this application, the step of obtaining the next interpolation path point based on the previous interpolation path point among multiple interpolation path points may include, for example, the following steps C-G:
[0118] Step C: Determine the x-axis coordinates of the next interpolation path point based on the x-axis coordinates of the previous interpolation path point and the preset spacing.
[0119] Step D: Determine the y-axis coordinate of the next interpolation path point based on the x-axis coordinate and the spline curve.
[0120] Step E: Determine the actual distance between the next interpolation path point and the previous interpolation path point based on the x-axis coordinate value of the previous interpolation path point, the y-axis coordinate value of the previous interpolation path point, the x-axis coordinate value of the next interpolation path point, and the y-axis coordinate value of the next interpolation path point.
[0121] Step F: If the difference between the preset spacing and the actual spacing meets the preset difference range, obtain the next interpolation path point based on the x-axis coordinate value and the y-axis coordinate value of the next interpolation path point.
[0122] Step G: If the difference between the preset spacing and the actual spacing does not meet the preset difference range, reduce the x-axis coordinate value of the next interpolation path point, and re-execute the step based on the x-axis coordinate value of the next interpolation path point and the spline curve to determine the y-axis coordinate value of the next interpolation path point until the difference between the preset spacing and the actual spacing meets the preset difference range to obtain the next interpolation path point.
[0123] As an example, see Figure 8 This diagram illustrates a method for obtaining the next interpolation path point from the previous interpolation path point in an embodiment of this application. The preset spacing is d, the preset difference range is [-d, d], the previous interpolation path point is P0, the x-axis coordinate of P0 is x0, the next interpolation path point is P', the x-axis coordinate of P' is x = x0 + d, and the y-axis coordinate of P' is y when x is substituted into the spline curve. The actual spacing between P0 and P is calculated as l using x0, y0, x, and y. If ld > d, x is reduced, for example, by multiplying x by d / l. Steps D and E are repeated until -d < ld < d. Based on x and y that satisfy -d < ld < d, the next interpolation path point P' is determined.
[0124] As an example, see Figure 9 This document illustrates a flowchart of obtaining the next interpolation path point from the previous interpolation path point in an embodiment of this application. The flowchart shows a process where a preset interval is set to d and a preset difference range is [-d, d]. The x-axis coordinate value of the previous interpolation path point is added to the preset interval to obtain the x-axis coordinate value of the next interpolation path point. The x-axis coordinate value of the next interpolation path point is substituted into a spline curve to obtain the y-axis coordinate value of the next interpolation path point. The actual distance between the next interpolation path point and the previous interpolation path point is calculated as l. The process involves determining if -d < ld < d; if yes, the next interpolation path point is determined; otherwise, the x-axis coordinate value of the next interpolation path point is decreased, and the process returns to the step of substituting the x-axis coordinate value of the next interpolation path point into a spline curve to obtain the y-axis coordinate value of the next interpolation path point.
[0125] Step 206: Determine the local path of the target machine based on the four updated path points and multiple interpolated path points.
[0126] In this embodiment of the application, after obtaining multiple interpolation path points in step 205, the partial path of the target machine can be determined by using four updated path points and multiple interpolation path points to complete the curved driving in sequence through a series of planned path points.
[0127] In the specific implementation of step 206, considering that the spline curve may be obtained by performing steps 202, 203, or 204, the specific implementation of step 206 differs from steps 202, 203, and 204, as detailed below:
[0128] One specific implementation refers to the following: when the spline curve is obtained by executing step 202, that is, when the spline curve is generated based on the initial coordinate values of the four updated path points, no further processing of the multiple interpolated path points is required. The local path of the target machine can be determined directly through the initial coordinate values of the four updated path points and the calculated coordinate values of the multiple interpolated path points. Therefore, in an optional implementation of this application, step 206 may specifically be: if the spline curve is generated based on the initial coordinate values of the four updated path points, the local path of the target machine is determined based on the initial coordinate values of the four updated path points and the calculated coordinate values of the multiple interpolated path points.
[0129] Another specific implementation refers to the following: When the spline curve is obtained by executing step 203, that is, when the spline curve is generated based on the exchanged coordinate values of the four updated path points, in addition to the fact that the exchanged coordinate values of the four updated path points are obtained by exchanging the x-axis coordinate values and y-axis coordinate values of the initial coordinate values of the four updated path points, it is also necessary to refer to the correspondence between the initial coordinate values of the four updated path points and the exchanged coordinate values of the four updated path points to restore multiple interpolation path points. That is, firstly, the x-axis coordinate values and y-axis coordinate values of the calculated coordinate values of multiple interpolation path points are exchanged to obtain the exchanged coordinate values of multiple interpolation path points; then, the local path of the target machine is determined by using the initial coordinate values of the four updated path points and the exchanged coordinate values of multiple interpolation path points. Therefore, in an optional implementation of the embodiments of this application, step 206 includes, for example, the following steps 2061-2062:
[0130] Step 2061: If a spline curve is generated based on the exchanged coordinate values of the four updated path points, the x-axis and y-axis coordinate values of the calculated coordinate values of the multiple interpolation path points are exchanged to obtain the exchanged coordinate values of the multiple interpolation path points.
[0131] Step 2062: Determine the local path of the target machine based on the initial coordinates of the four updated path points and the exchanged coordinates of the multiple interpolated path points.
[0132] Another specific implementation refers to the following: when the spline curve is obtained by executing step 204, that is, when the spline curve is generated based on the rotated coordinate values of the four updated path points, in addition to the fact that the rotated coordinate values of the four updated path points are obtained by first rotating the initial coordinate system around the origin, it is also necessary to refer to the correspondence between the initial coordinate values of the four updated path points and the exchanged coordinate values of the four updated path points to restore multiple interpolated path points. That is, first restore to the initial coordinate system to obtain the restored coordinate values of multiple interpolated path points; then, through the initial coordinate values of the four updated path points and the restored coordinate values of the multiple interpolated path points, the local path of the target machine is determined. Therefore, in an optional implementation of the embodiments of this application, step 206 includes, for example, the following steps 2063-2064:
[0133] Step 2063: If a spline curve is generated based on the rotation coordinates of the four updated path points, the restored coordinates of multiple interpolated path points are obtained by restoring the curve to the initial coordinate system.
[0134] Step 2064: Determine the local path of the target machine based on the initial coordinates of the four updated path points and the restored coordinates of the multiple interpolated path points.
[0135] Through the various implementation methods provided in this embodiment, firstly, it is determined whether the two first included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°, so as to update the four planned path points to obtain four updated path points, and make the two second included angles formed by connecting the four updated path points end to end in a fixed order greater than 90°. Secondly, when the x-axis coordinates of the four updated path points are arranged in order, a spline curve is generated using the initial coordinates of the four updated path points. When the y-axis coordinates of the four updated path points are arranged in order, the x-axis and y-axis coordinates of the initial coordinates of the four updated path points are swapped to obtain swapped coordinates of the four updated path points to generate a spline curve. When the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, the initial coordinate system is rotated around the origin to obtain rotated coordinates of the four updated path points to generate a spline curve, wherein the x-axis coordinates of the rotated coordinates of the four updated path points are arranged in order. Then, if the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, multiple interpolation path points are obtained by interpolating the spline curve. Finally, the local path of the target machine is determined using the four updated path points and the multiple interpolation path points.
[0136] As can be seen, this method, based on updating four adjacent planned path points so that the two included angles formed by connecting the four updated path points end-to-end in a fixed order are both greater than 90°, adds a check to determine whether the x-axis and y-axis coordinates of the four updated path points are in order. Only when the x-axis and y-axis coordinates of the four updated path points are not in order is it necessary to calculate the rotated coordinates of the four updated path points to generate a spline curve. When the x-axis or y-axis coordinates of the four updated path points are in order, no coordinate rotation is needed to quickly and conveniently generate a spline curve. This curve is then used for interpolation to obtain multiple interpolated path points, thereby determining the local path of the target machine. In other words, this method reduces unnecessary computation, lowers computational complexity, and improves the efficiency of spline curve generation, thus improving the efficiency of determining the local path of the target machine.
[0137] Next, the specific implementation of the local path determination device in the embodiments of this application will be described in detail through examples.
[0138] See Figure 10 The diagram illustrates a structural schematic of a local path determination device according to an embodiment of this application. In this embodiment, the device may specifically include, for example, an update unit 1001, a generation unit 1002, an interpolation unit 1003, and a determination unit 1004.
[0139] The updating unit 1001 is used to update the four planned path points to obtain four updated path points based on whether the two first included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°; the two second included angles formed by connecting the four updated path points end to end in the fixed order are both greater than 90°.
[0140] The generation unit 1002 is configured to: if the x-axis coordinates of the four updated path points are arranged in order, generate a spline curve based on the initial coordinates of the four updated path points; if the y-axis coordinates of the four updated path points are arranged in order, swap the x-axis and y-axis coordinates of the initial coordinates of the four updated path points to obtain swapped coordinates of the four updated path points, and generate the spline curve based on the swapped coordinates of the four updated path points; if the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, rotate the initial coordinate system around the origin to obtain rotated coordinates of the four updated path points, and generate the spline curve based on the rotated coordinates of the four updated path points; wherein the x-axis coordinates of the rotated coordinates of the four updated path points are arranged in order.
[0141] The interpolation unit 1003 is used to interpolate the spline curve if the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, so as to obtain multiple interpolation path points.
[0142] The determining unit 1004 is used to determine the local path of the target machine based on the four updated path points and the plurality of interpolated path points.
[0143] In one optional embodiment of this application, the updating unit 1001 is specifically used for:
[0144] If both of the first included angles are greater than 90°, the four planned path points will be directly determined as the four updated path points.
[0145] If only one of the two included angles is less than or equal to 90°, the preset planned path point corresponding to the first included angle less than or equal to 90° among the four planned path points is updated to the midpoint of the line connecting the two planned path points before and after the preset planned path point, and the four updated path points are obtained.
[0146] If both of the first included angles are less than or equal to 90°, the two planned path points corresponding to the two first included angles are updated to the trisection points on the line connecting the first and fourth planned path points among the four planned path points, thus obtaining the four updated path points.
[0147] In one optional embodiment of this application, the generation unit 1002 is specifically used for:
[0148] If the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, determine the target angle formed by the line connecting the second and third updated path points and the positive x-axis.
[0149] Rotate the initial coordinate system around the origin according to the target angle to obtain the rotation coordinate values of the four updated path points, and generate the spline curve based on the rotation coordinate values of the four updated path points; the x-axis coordinate values of the four updated path points are arranged in order.
[0150] In one optional embodiment of this application, the interpolation unit 1003 is specifically used for:
[0151] Based on the x-axis coordinates of the previous interpolation path point and the preset spacing, determine the x-axis coordinates of the next interpolation path point;
[0152] The y-axis coordinate of the next interpolation path point is determined based on the x-axis coordinate of the next interpolation path point and the spline curve.
[0153] Based on the x-axis coordinate value of the previous interpolation path point, the y-axis coordinate value of the previous interpolation path point, the x-axis coordinate value of the next interpolation path point, and the y-axis coordinate value of the next interpolation path point, determine the actual distance between the next interpolation path point and the previous interpolation path point;
[0154] If the difference between the preset spacing and the actual spacing meets the preset difference range, the next interpolation path point is obtained based on the x-axis coordinate value and the y-axis coordinate value of the next interpolation path point.
[0155] If the difference between the preset spacing and the actual spacing does not conform to the preset difference range, the x-axis coordinate value of the next interpolation path point is reduced, and the process of determining the y-axis coordinate value of the next interpolation path point based on the x-axis coordinate value of the next interpolation path point and the spline curve is repeated until the difference between the preset spacing and the actual spacing conforms to the preset difference range to obtain the next interpolation path point.
[0156] In an optional embodiment of this application, the determining unit 1004 is specifically used for:
[0157] If a spline curve is generated based on the initial coordinate values of the four updated path points, the local path of the target machine is determined based on the initial coordinate values of the four updated path points and the calculated coordinate values of the multiple interpolated path points.
[0158] In an optional embodiment of this application, the determining unit 1004 is specifically used for:
[0159] If the spline curve is generated based on the exchanged coordinate values of the four updated path points, the x-axis coordinate values and y-axis coordinate values of the calculated coordinate values of the multiple interpolation path points are exchanged to obtain the exchanged coordinate values of the multiple interpolation path points;
[0160] The local path of the target machine is determined based on the initial coordinate values of the four updated path points and the exchanged coordinate values of the multiple interpolated path points.
[0161] In an optional embodiment of this application, the determining unit 1004 is specifically used for:
[0162] If the spline curve is generated based on the rotation coordinate values of the four updated path points, the restored coordinate values of the multiple interpolation path points are obtained by restoring them to the initial coordinate system.
[0163] The local path of the target machine is determined based on the initial coordinates of the four updated path points and the restored coordinates of the multiple interpolated path points.
[0164] Through the various implementation methods provided in this embodiment, firstly, it is determined whether the two first included angles formed by connecting the four adjacent planned path points end to end in a fixed order are both greater than 90°, so as to update the four planned path points to obtain four updated path points, and make the two second included angles formed by connecting the four updated path points end to end in a fixed order greater than 90°. Secondly, when the x-axis coordinates of the four updated path points are arranged in order, a spline curve is generated using the initial coordinates of the four updated path points. When the y-axis coordinates of the four updated path points are arranged in order, the x-axis and y-axis coordinates of the initial coordinates of the four updated path points are swapped to obtain swapped coordinates of the four updated path points to generate a spline curve. When the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, the initial coordinate system is rotated around the origin to obtain rotated coordinates of the four updated path points to generate a spline curve, wherein the x-axis coordinates of the rotated coordinates of the four updated path points are arranged in order. Then, if the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, multiple interpolation path points are obtained by interpolating the spline curve. Finally, the local path of the target machine is determined using the four updated path points and the multiple interpolation path points.
[0165] As can be seen, this method, based on updating four adjacent planned path points so that the two included angles formed by connecting the four updated path points end-to-end in a fixed order are both greater than 90°, adds a check to determine whether the x-axis and y-axis coordinates of the four updated path points are in order. Only when the x-axis and y-axis coordinates of the four updated path points are not in order is it necessary to calculate the rotated coordinates of the four updated path points to generate a spline curve. When the x-axis or y-axis coordinates of the four updated path points are in order, no coordinate rotation is needed to quickly and conveniently generate a spline curve. This curve is then used for interpolation to obtain multiple interpolated path points, thereby determining the local path of the target machine. In other words, this method reduces unnecessary computation, lowers computational complexity, and improves the efficiency of spline curve generation, thus improving the efficiency of determining the local path of the target machine.
[0166] Furthermore, embodiments of this application also provide a computer device, which includes a processor and a memory:
[0167] The memory is used to store computer programs and to transfer the computer programs to the processor;
[0168] The processor is configured to execute the methods described in the above embodiments according to instructions in the computer program.
[0169] Furthermore, embodiments of this application also provide a computer-readable storage medium for storing a computer program that implements the methods described in the above embodiments.
[0170] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0171] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0172] It should be noted that, in this document, relational terms such as "first" and "second" are used only 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. 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 limitation, 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.
[0173] The above description is merely a preferred embodiment of this application and is not intended to limit the application in any way. Although this application has disclosed preferred embodiments above, it is not intended to limit the application. Any person skilled in the art can make many possible variations and modifications to the technical solutions of this application using the methods and techniques disclosed above, or modify them into equivalent embodiments with equivalent changes, without departing from the scope of the technical solutions of this application. Therefore, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of this application without departing from the content of the technical solutions of this application shall still fall within the protection scope of the technical solutions of this application.
Claims
1. A method for determining a local path, characterized in that, include: If the two included angles formed by connecting four adjacent planned path points in a fixed order are both greater than 90°, then the four planned path points are directly determined as four updated path points; otherwise, the four planned path points are updated to obtain four updated path points. The two included angles formed by connecting the four updated path points in the fixed order are both greater than 90°. If the x-axis coordinates of the four updated path points are arranged in order, a spline curve is generated based on the initial coordinates of the four updated path points; If the y-axis coordinates of the four updated path points are arranged in order, the x-axis and y-axis coordinates of the initial coordinates of the four updated path points are swapped to obtain the swapped coordinates of the four updated path points, and the spline curve is generated based on the swapped coordinates of the four updated path points. If the x-axis coordinates of the four updated path points are not in order, and the y-axis coordinates of the four updated path points are not in order, the initial coordinate system is rotated around the origin to obtain the rotated coordinate values of the four updated path points, and the spline curve is generated based on the rotated coordinate values of the four updated path points; the x-axis coordinates of the four updated path points are in order. If the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, the spline curve is interpolated to obtain multiple interpolation path points; The local path of the target machine is determined based on the four updated path points and the plurality of interpolated path points.
2. The method according to claim 1, characterized in that, The process of updating the four planned path points to obtain four updated path points includes: If only one of the two included angles is less than or equal to 90°, the preset planned path point corresponding to the first included angle less than or equal to 90° among the four planned path points is updated to the midpoint of the line connecting the two planned path points before and after the preset planned path point, and the four updated path points are obtained. If both of the first included angles are less than or equal to 90°, the two planned path points corresponding to the two first included angles are updated to the trisection points on the line connecting the first and fourth planned path points among the four planned path points, thus obtaining the four updated path points.
3. The method according to claim 1, characterized in that, The step of rotating the initial coordinate system around the origin to obtain the rotated coordinate values of the four updated path points includes: Determine the target angle formed by the line connecting the second and third updated path points among the four updated path points and the positive x-axis; Rotate the initial coordinate system around the origin according to the target angle to obtain the rotation coordinate values of the four updated path points.
4. The method according to claim 1, characterized in that, The step of obtaining the next interpolation path point based on the previous interpolation path point among the multiple interpolation path points includes: Based on the x-axis coordinates of the previous interpolation path point and the preset spacing, determine the x-axis coordinates of the next interpolation path point; The y-axis coordinate of the next interpolation path point is determined based on the x-axis coordinate of the next interpolation path point and the spline curve. Based on the x-axis coordinate value of the previous interpolation path point, the y-axis coordinate value of the previous interpolation path point, the x-axis coordinate value of the next interpolation path point, and the y-axis coordinate value of the next interpolation path point, determine the actual distance between the next interpolation path point and the previous interpolation path point; If the difference between the preset spacing and the actual spacing meets the preset difference range, the next interpolation path point is obtained based on the x-axis coordinate value and the y-axis coordinate value of the next interpolation path point. If the difference between the preset spacing and the actual spacing does not conform to the preset difference range, the x-axis coordinate value of the next interpolation path point is reduced, and the process of determining the y-axis coordinate value of the next interpolation path point based on the x-axis coordinate value of the next interpolation path point and the spline curve is repeated until the difference between the preset spacing and the actual spacing conforms to the preset difference range to obtain the next interpolation path point.
5. The method according to any one of claims 1-4, characterized in that, The step of determining the local path of the target machine based on the four updated path points and the plurality of interpolated path points specifically involves: If a spline curve is generated based on the initial coordinate values of the four updated path points, the local path of the target machine is determined based on the initial coordinate values of the four updated path points and the calculated coordinate values of the multiple interpolated path points.
6. The method according to any one of claims 1-4, characterized in that, Determining the local path of the target machine based on the four updated path points and the plurality of interpolated path points includes: If the spline curve is generated based on the exchanged coordinate values of the four updated path points, the x-axis coordinate values and y-axis coordinate values of the calculated coordinate values of the multiple interpolation path points are exchanged to obtain the exchanged coordinate values of the multiple interpolation path points; The local path of the target machine is determined based on the initial coordinate values of the four updated path points and the exchanged coordinate values of the multiple interpolated path points.
7. The method according to any one of claims 1-4, characterized in that, Determining the local path of the target machine based on the four updated path points and the plurality of interpolated path points includes: If the spline curve is generated based on the rotation coordinate values of the four updated path points, the restored coordinate values of the multiple interpolation path points are obtained by restoring them to the initial coordinate system. The local path of the target machine is determined based on the initial coordinates of the four updated path points and the restored coordinates of the multiple interpolated path points.
8. A local path determination device, characterized in that, include: Update unit, generation unit, interpolation unit, and determination unit; The updating unit is used to determine whether the two first included angles formed by connecting four adjacent planned path points in a fixed order are both greater than 90°. If so, the four planned path points are directly determined as four updated path points; otherwise, the four planned path points are updated to obtain four updated path points. The two second included angles formed by connecting the four updated path points in the fixed order are both greater than 90°. The generation unit is configured to: if the x-axis coordinates of the four updated path points are arranged in order, generate a spline curve based on the initial coordinates of the four updated path points; if the y-axis coordinates of the four updated path points are arranged in order, swap the x-axis and y-axis coordinates of the initial coordinates of the four updated path points to obtain swapped coordinates of the four updated path points, and generate the spline curve based on the swapped coordinates of the four updated path points; if the x-axis coordinates of the four updated path points are not arranged in order, and the y-axis coordinates of the four updated path points are not arranged in order, rotate the initial coordinate system around the origin to obtain rotated coordinates of the four updated path points, and generate the spline curve based on the rotated coordinates of the four updated path points; wherein the x-axis coordinates of the rotated coordinates of the four updated path points are arranged in order. The interpolation unit is used to interpolate the spline curve if the minimum radius of curvature of the spline curve is greater than the minimum turning radius of the target machine, so as to obtain multiple interpolation path points. The determining unit is used to determine the local path of the target machine based on the four updated path points and the plurality of interpolated path points.
9. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store computer programs and to transfer the computer programs to the processor; The processor is configured to execute the method according to any one of claims 1-7 according to instructions in the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for implementing the method according to any one of claims 1-7.
Citation Information
Patent Citations
Path curve generation method and device, equipment and storage medium
CN111737637A
Navigation path generation method based on crop geographic coordinate positioning
CN115900726A