Path planning method, robot, electronic equipment and medium
By calculating and updating the connection order of bow word lines based on cost function, the problem of low efficiency in turn path planning in the prior art is solved, and more efficient path planning is achieved.
Patent Information
- Application Number
- CN202411753143.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
AI Technical Summary
Existing path planning methods lead to low operational efficiency when planning the robot's turning path in the target area.
By calculating the contingency value of each bow character line in the set of bow character line relative to the initial bow character line based on the cost function, the target bow character line connected to the initial bow character line is determined, and the set of bow character line is updated, and the connection order of all bow character lines is iteratively determined to plan a reasonable turn path.
It improves the working efficiency corresponding to the entire path and reduces the difficulty of planning the turning path.
Smart Images

Figure CN119618224A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot control technology, and in particular to a path planning method, a robot, an electronic device and a medium. Background Art
[0002] With the advancement of science and technology, robots are being used in more and more fields. For example, robots can be used in cleaning, agricultural production and other fields. When using robots to operate in a target area, it is generally necessary to plan the robot's driving path in the target area in advance, and the planned driving path should cover the entire target area as much as possible. In some cases, the robot needs to turn during the operation to make a U-turn, and using the current path planning method to plan the turning path in the driving path will result in low operating efficiency for the entire planned driving path. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a path planning method, a robot, an electronic device and a medium, which can improve the operation efficiency corresponding to the entire planned path.
[0004] In a first aspect, an embodiment of the present application provides a path planning method, comprising: obtaining a bow line set, wherein the bow line set includes some bow lines among a plurality of original bow lines planned in a target area; for each bow line in the bow line set, calculating a cost value of the bow line relative to the initial bow line based on a cost function, wherein a plurality of original bow lines include an initial bow line, and the initial bow line is located outside the bow line set; determining a target bow line from the bow line set according to the cost value of each bow line in the bow line set, wherein the target bow line is used to connect with the initial bow line; removing the target bow line from the bow line set to update the bow line set, updating the target bow line to the initial bow line, and repeatedly executing the step of calculating a cost value of the bow line relative to the initial bow line based on the cost function for each bow line in the bow line set until a connection order of the plurality of original bow lines is determined; connecting the plurality of original bow lines according to the connection order of the plurality of original bow lines to obtain a target path.
[0005] In a second aspect, an embodiment of the present application provides a path planning method device, including: an acquisition module, used to acquire a bow line set, wherein the bow line set includes some bow lines in a plurality of original bow lines planned in a target area; a calculation module, used to calculate, for each bow line in the bow line set, a cost value of the bow line relative to the initial bow line based on a cost function, wherein the plurality of original bow lines include the initial bow line, and the initial bow line is located outside the bow line set; a determination module, used to determine a target bow line from the bow line set according to the cost value of each bow line in the bow line set, wherein the target bow line is used to be connected to the initial bow line; an update module, used to remove the target bow line from the bow line set to update the bow line set, update the target bow line to the initial bow line, and repeatedly perform the step of calculating the cost value of the bow line relative to the initial bow line based on the cost function for each bow line in the bow line set until the connection order of the plurality of original bow lines is determined; a connection module, used to connect the plurality of original bow lines according to the connection order of the plurality of original bow lines to obtain a target path.
[0006] In a third aspect, an embodiment of the present application provides a robot, comprising a control module, wherein the control module is used to execute the path planning method described in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor; and a memory for storing processor executable instructions, wherein the processor is used to execute the path planning method described in the first aspect above.
[0008] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the path planning method described in the first aspect above.
[0009] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor of a computer device, the computer device is enabled to execute the path planning method described in the first aspect above.
[0010] In a seventh aspect, an embodiment of the present application provides a chip, comprising: a processor; and a memory for storing processor executable instructions, wherein the processor is used to execute the path planning method described in the first aspect above.
[0011] The embodiment of the present application provides a path planning method, a robot, an electronic device and a medium. By calculating the cost value of each bow line in the bow line set relative to the initial bow line based on the cost function, a target bow line connected to the initial bow line is determined from the bow line set, and then the target bow line is removed from the bow line set to update the bow line set, the target bow line is updated to the initial bow line, and the target bow line of the updated initial bow line is determined from the updated bow line set, and it is iterated in this way until the connection order of all the bow lines is determined. All the bow lines are connected according to the connection order of all the bow lines, and a turning path between two bow lines adjacent in the connection order can be obtained. Since the latter of the two bow lines is selected from the bow line set based on the cost value, the turning path is more reasonable for the former of the two bow lines. Therefore, the embodiment of the present application can find a more reasonable subsequent bow line for each bow line, that is, a more reasonable turning path can be planned for the bow line, thereby improving the operation efficiency corresponding to the entire path. In addition, the embodiment of the present application determines the connection order of the arch lines by calculating the cost value and then plans the turning path between adjacent arch lines, thereby reducing the difficulty of planning the turning path to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 Shown is a schematic diagram of the system architecture of a path planning system provided by an exemplary embodiment of the present application.
[0013] Figure 2 Shown is a flow chart of a path planning method provided by an exemplary embodiment of the present application.
[0014] Figure 3 Shown is a schematic diagram of an operation path provided by an exemplary embodiment of the present application.
[0015] Figure 4 Shown is a flow chart of a path planning method provided by another exemplary embodiment of the present application.
[0016] Figure 5 Shown is a schematic structural diagram of a path planning device provided by an exemplary embodiment of the present application.
[0017] Figure 6 Shown is a block diagram of an electronic device for executing a path planning method provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] Application Overview
[0020] Using robots to perform tasks is becoming more and more common in modern society. Robots can be used in cleaning, agricultural production and other fields. For example, robots can be used for indoor cleaning, outdoor cleaning, sowing, spraying pesticides, mowing, etc.
[0021] When using a robot to operate in a target area, it is generally necessary to plan the robot's driving path in the target area in advance. The planned driving path should cover the entire target area as much as possible, that is, to achieve full coverage path planning, so as to reduce the area of missed operation areas.
[0022] In the field of full coverage path planning, commonly used methods include the bow-shaped path planning method and the spiral path planning method. The spiral path planning method is highly applicable, and a smooth coverage path can also be planned for special-shaped closed areas. The disadvantage of this method is that there are too many bends in the planned path, which leads to a slow running speed and low operating efficiency of the robot. The path planned by the bow-shaped path planning method is simple, and the path may include multiple straight segments. The robot runs fast and has high operating efficiency on the straight road (straight segment), but the robot needs to turn at the end point of the straight segment to make a U-turn. In order to facilitate the robot to turn around, a turning path needs to be planned, and the turning path needs to meet the turning radius constraint. If the turning path is not effective, it will also affect the overall operating efficiency.
[0023] For example, most of the current indoor sweeping robots operate according to the bow-shaped path planned by the bow-shaped path planning method. The reason is that the indoor sweeping robots can rotate in situ, that is, they can flexibly adjust the direction at the end point of the straight segment of the bow-shaped path. For cleaning robots with roller brushes or lawn mowing robots with cutting discs, the functional area of the robot (such as the area where the roller brush or cutting disc is located) is not located at the center of rotation, thus limiting the turning radius of the robot during operation, making it more difficult for the robot to adjust the direction at the end point of the straight segment of the bow-shaped path. Using the current path planning method to plan the turning path at the end point of the straight segment will cause the entire planned driving path to have a low operating efficiency problem.
[0024] In view of the above technical problems, the embodiment of the present application provides a path planning method, by calculating the cost value of each bow line in the bow line set relative to the initial bow line based on the cost function, thereby determining the target bow line connected to the initial bow line from the bow line set, and then removing the target bow line from the bow line set to update the bow line set, updating the target bow line to the initial bow line, and determining the target bow line of the updated initial bow line from the updated bow line set, and iterating in this way until the connection order of all bow lines is determined. By connecting all bow lines according to the connection order of all bow lines, a turning path between two bow lines adjacent in the connection order can be obtained, which can reduce the planning difficulty of the turning path to a certain extent and improve the operation efficiency corresponding to the entire path.
[0025] Exemplary Systems
[0026] Figure 1 FIG. 1 is a schematic diagram of a system architecture of a path planning system provided by an exemplary embodiment of the present application. Figure 1 As shown, the path planning system 100 may include a robot 110, and the robot 110 may be used to clean a target area 120. A controller 111 may be installed on the robot 110. The controller 111 may be used to control the robot 110 to execute the path planning method provided in the embodiment of the present application.
[0027] In one example, the controller 111 may obtain an initial bow line set, which includes a plurality of original bow lines planned in the target area, and the plurality of original bow lines may be planned by the controller 111 based on a bow path planning method, or may be planned by other devices based on a bow path planning method. For each bow line in the initial bow line set, the controller 111 may calculate a cost value of the bow line relative to an initial reference point based on a cost function, and determine a target bow line that can be connected to the initial reference point from the initial bow line set according to the cost value of each bow line, and the target bow line may be an initial bow line, and the initial reference point here may be an initial position point of the robot. Further, the controller 111 may remove the target bow line from the initial bow line set to update the bow line set, and update the target bow line to the initial bow line. For each wordline in the updated wordline set, the controller 111 may calculate the cost value of the wordline relative to the initial wordline based on the cost function, and determine the target wordline that can be connected to the initial wordline from the wordline set according to the cost value of each wordline. The controller 111 may repeatedly perform the steps of removing the target wordline from the wordline set to update the wordline set and updating the target wordline to the initial wordline, repeatedly perform the steps of calculating the cost value of the wordline relative to the initial wordline based on the cost function for each wordline in the wordline set, and repeatedly perform the steps of determining the target wordline that can be connected to the initial wordline from the wordline set according to the cost value of each wordline, until the connection order of the plurality of original wordlines is determined. The controller 111 may connect the plurality of original wordlines according to the connection order of the plurality of original wordlines to obtain the target path.
[0028] Furthermore, the controller 111 may control the robot to perform cleaning operations in the target area based on the target path.
[0029] In other examples, the controller 111 may be located outside the robot 110 , such as being a device independent of the robot 110 .
[0030] Exemplarily, the controller 111 may include at least one of a logic controller, a machine vision controller, a motion controller, and the like.
[0031] It should be understood that the above application scenario examples are only shown to facilitate understanding of the spirit and principle of the present application, and the embodiments of the present application are not limited thereto. On the contrary, the embodiments of the present application can be applied to any scenario that may be applicable.
[0032] Exemplary Methods
[0033] Figure 2 Shown is a flow chart of a path planning method provided by an exemplary embodiment of the present application. Figure 2 The method can be Figure 1The controller in is executed. Figure 2 As shown, the path planning method may include the following contents.
[0034] 210: Acquire a set of arch lines, wherein the set of arch lines includes some arch lines among a plurality of original arch lines planned in the target area.
[0035] Specifically, the target area may be the robot's operating area. The robot may operate in the target area along a planned target path. The operation type may be cleaning, sowing, spraying pesticides, mowing, etc.
[0036] The arch line set may include a plurality of straight line segments planned in the target area, that is, a plurality of arch lines.
[0037] For example, a plurality of original bow lines may be planned in the target area by using a bow-shaped path planning method.
[0038] In one example, the archline set may include some archlines among the plurality of original archlines.
[0039] 220: For each wordline in the wordline set, calculate a cost value of the wordline relative to an initial wordline based on a cost function, wherein the plurality of original wordlines include the initial wordline, and the initial wordline is outside the wordline set.
[0040] In one example, an initial bow line may be selected from a plurality of original bow lines, and the starting point of the initial bow line may be the starting point of the robot operation, that is, the robot may start the operation along the initial bow line. The remaining bow lines from the plurality of original bow lines excluding the initial bow line may constitute a bow line set.
[0041] For each bow line in the bow line set, the cost value of the bow line relative to the initial bow line can be calculated based on the cost function. Specifically, the cost value of the bow line relative to the initial bow line can be used to measure the rationality of the bow line as a subsequent bow line adjacent to the initial bow line. For example, the smaller the cost value of the bow line relative to the initial bow line, the more reasonable the bow line is as a subsequent bow line adjacent to the initial bow line, that is, the smaller the cost value, the greater the rationality. The bow line as a subsequent bow line adjacent to the initial bow line can improve the rationality of the complete target path subsequently planned, such as improving the operation efficiency corresponding to the target path.
[0042] It should be understood that in other examples, the smaller the cost value, the less reasonable it is, that is, the larger the cost value of the bow line relative to the initial bow line, the more reasonable the bow line is as a subsequent bow line adjacent to the initial bow line.
[0043] In one example, the cost function can be set according to actual needs.
[0044] 230: Determine a target wordline from the wordline set according to the cost value of each wordline in the wordline set, wherein the target wordline is used to connect with the initial wordline.
[0045] Taking the example that the smaller the cost value, the greater the rationality, the smaller the cost value of the bow line relative to the initial bow line, the more reasonable the bow line is as a subsequent bow line adjacent to the initial bow line. Therefore, the bow line with the smallest cost value can be selected from the bow line set as the target bow line, and the target bow line can be used as the subsequent bow line adjacent to the initial bow line. In the forward direction of the robot operation, the robot can switch to the target bow line after passing the initial bow line. It should be understood that the situation that the smaller the cost value, the smaller the rationality is similar to this, and in order to avoid repetition, it will not be repeated here.
[0046] 240: Eliminate the target bow line from the bow line set to update the bow line set, update the target bow line to the initial bow line, and repeat the step of calculating the cost value of the bow line relative to the initial bow line based on the cost function for each bow line in the bow line set until the connection order of the multiple original bow lines is determined.
[0047] In one example, after determining the target bow line from the bow line set, the target bow line can be removed from the bow line set to update the bow line set, that is, the number of bow lines included in the updated bow line set becomes smaller. The removed target bow line can be updated to the initial bow line. Based on the updated bow line set and the initial bow line, the above steps 220 and 230 can be repeatedly performed, that is, for each bow line in the bow line set, the cost value of the bow line relative to the initial bow line is calculated based on the cost function, and the target bow line is determined from the bow line set according to the cost value of each bow line in the bow line set. Further, the target bow line at this time can be removed from the bow line set to update the bow line set again, and the target bow line at this time is updated to the initial bow line. In this way, the target bow line can be determined from multiple original bow lines in the order of connection, that is, according to the method provided in the embodiment of the present application, the connection order of multiple original bow lines can be determined.
[0048] 250: Connect multiple original arch lines according to the connection order of the multiple original arch lines to obtain a target path.
[0049] Specifically, according to the connection order of the plurality of original bow lines, two bow lines that are adjacent in the connection order can be connected. In one example, a connection path between the two bow lines can be planned, such as a turning path (curved path), that is, the robot can switch from the first bow line of the two bow lines to the second bow line of the two bow lines through the turning path. In other words, when the connection order of the plurality of original bow lines is determined, the direction of the turning path corresponding to the first bow line is also determined, that is, it points to the second bow line. Since the second bow line of the two bow lines is selected from the bow line set based on the cost value, the turning path is more reasonable for the first bow line of the two bow lines. For example, the distance between the latter bow line and the former bow line satisfies a preset distance condition, and / or the angle between the latter bow line and the former bow line satisfies a first preset angle condition, and / or the angle between the line between the starting point of the latter bow line and the end point of the former bow line and the latter bow line satisfies a second preset angle condition, so that the turning path obtained based on the latter bow line is more reasonable for the former bow line. The preset distance condition, the first preset angle condition and the second preset angle condition here can be set according to actual needs.
[0050] In one example, the cost function can be constructed based on the distance between the bow line and the initial bow line, and / or the angle between the bow line and the initial bow line, and / or the angle between the line connecting the end point of the bow line and the end point of the initial bow line and the bow line.
[0051] The embodiment of the present application provides a path planning method, by calculating the cost value of each bow line in the bow line set relative to the initial bow line based on the cost function, thereby determining the target bow line connected to the initial bow line from the bow line set, and then removing the target bow line from the bow line set to update the bow line set, updating the target bow line to the initial bow line, and determining the target bow line of the updated initial bow line from the updated bow line set, and iterating in this way until the connection order of all the bow lines is determined. All the bow lines are connected according to the connection order of all the bow lines, and a turning path between two bow lines adjacent in the connection order can be obtained. Since the latter of the two bow lines is selected from the bow line set based on the cost value, the turning path is more reasonable for the former of the two bow lines. Therefore, the embodiment of the present application can find a more reasonable subsequent bow line for each bow line, that is, a more reasonable turning path can be planned for the bow line, thereby improving the operation efficiency corresponding to the entire path. In addition, the embodiment of the present application determines the connection order of the arch lines by calculating the cost value and then plans the turning path between adjacent arch lines, thereby reducing the difficulty of planning the turning path to a certain extent.
[0052] According to one embodiment of the present application, the independent variables of the cost function include the distance between the endpoint of the bow line and the reference point, and / or the angle between the line between the endpoint and the reference point and the extension direction of the bow line, wherein the reference point includes the end point of the initial bow line.
[0053] Specifically, in some embodiments, the reference point includes the end point of the initial bow line.
[0054] In one example, the independent variable of the cost function includes the distance between the endpoint of the bow line in the bow line set and the reference point. As the distance between the endpoint of the bow line and the reference point increases, the value of the cost function (dependent variable or cost value) changes continuously, for example, the cost value can become larger. The larger the cost value, the farther the endpoint of the bow line is from the reference point. If the turning path between the endpoint and the reference point is planned based on the endpoint, it is necessary to consider the road conditions between the endpoint and the reference point, such as obstacles, etc. This may make the planning process of the turning path complicated, increase the amount of calculation, and may reduce the rationality of the subsequent entire path. The smaller the cost value, the closer the endpoint of the bow line is to the reference point. If the turning path between the endpoint and the reference point is planned based on the endpoint, the planning process of the turning path can be simplified, and the rationality of the subsequent entire path can be improved to a certain extent.
[0055] In one example, the independent variable of the cost function includes the angle between the line connecting the endpoint of the bow line in the bow line set and the reference point and the extension direction of the bow line. As the angle increases, the value of the cost function (dependent variable or cost value) changes continuously, for example, the cost value can become larger. The larger the cost value, the greater the height difference between the endpoint and the reference point. For example, the bow line can be parallel or approximately parallel to the initial bow line, and there is a height difference between the endpoint of the bow line and the reference point in the extension direction of the bow line. If the turning path between the endpoint and the reference point is planned based on the endpoint, the road conditions between the endpoint and the reference point, such as obstacles, need to be considered, which may make the planning process of the turning path complicated, increase the amount of calculation, and may reduce the rationality of the subsequent entire path. The smaller the cost value, the smaller the height difference between the endpoint and the reference point. If the turning path between the endpoint and the reference point is planned based on the endpoint, the planning process of the turning path can be simplified, and the rationality of the subsequent entire path can be improved to a certain extent.
[0056] In one example, the independent variables of the cost function may include: the distance between the endpoints of the bow line in the bow line set and the reference point, and the angle between the line connecting the endpoints of the bow line in the bow line set and the reference point and the extension direction of the bow line. As the distance and the angle change, the value of the cost function (dependent variable or cost value) changes continuously. By reasonably setting the cost function, the bow line with the smallest cost value can be selected from the bow line set as the target bow line.
[0057] In some embodiments, the reference point may include the initial position point of the robot, and the bow line set may include all bow lines. The cost value of each bow line in the bow line set is calculated by the above-mentioned cost function, and the bow line with the smallest cost value can be selected from the bow line set as the target bow line, and the target bow line is removed from the bow line set to update the bow line set. The target bow line can be updated to the initial bow line, and the end point of the initial bow line is updated to the reference point, and then the cost value of each bow line in the updated bow line set is calculated by the above-mentioned cost function, and the bow line with the smallest cost value is selected from the updated bow line set as the target bow line, and the target bow line is removed from the bow line set to update the bow line set again. The target bow line can be updated to the initial bow line, and the end point of the initial bow line is updated to the reference point, and the calculation process is iteratively performed.
[0058] In this embodiment, by taking the end point of the initial bow line as a reference point and based on the distance between the end point of each bow line in the bow line set and the reference point, and / or the angle between the line connecting the end point and the reference point and the extension direction of the bow line, the cost value corresponding to the bow line is calculated, so that the bow line with the smallest cost value can be determined from the bow line set as the target bow line, which can reduce the difficulty of determining the connection order of the bow lines, that is, reduce the difficulty of planning the turning path of the bow lines, and can improve the work efficiency corresponding to the overall path of subsequent planning.
[0059] According to one embodiment of the present application, the endpoints of the bow line include the starting point of the bow line and the end point of the bow line, and step 220 may include: calculating the cost value corresponding to the starting point of the bow line and the cost value corresponding to the end point of the bow line based on the cost function; and taking the minimum cost value between the cost value corresponding to the starting point of the bow line and the cost value corresponding to the end point of the bow line as the cost value of the bow line relative to the initial bow line.
[0060] Specifically, for each bow line in the bow line set, the cost value of the bow line is relative to the initial bow line. In one example, the cost value of the bow line is relative to a reference point on the initial bow line, such as relative to the end point of the initial bow line.
[0061] In one example, each bow line has two endpoints, one of which can be used as the starting point of the bow line, and the other endpoint can be used as the end point of the bow line. For each bow line, the cost values of the two endpoints of the bow line relative to the reference point can be calculated, and the minimum of the two cost values can be used as the cost value of the bow line, and the endpoint corresponding to the minimum of the two cost values can be used as the starting point of the bow line, and the other endpoint is the end point of the bow line. Here, the starting point of the bow line can be the first point that the robot passes through when passing through the bow line, and the end point of the bow line can be the last point that the robot passes through when passing through the bow line.
[0062] In this embodiment, by calculating the cost values of the two endpoints of each bow line in the bow line set relative to the reference point, and taking the minimum value of the two cost values as the cost value of the bow line, the process of distinguishing the starting point and the end point of the bow line in advance can be omitted, thereby simplifying the calculation process of the cost value of the bow line relative to the initial bow line. Moreover, for the target bow line, the endpoint corresponding to the minimum value of the cost value can be taken as the starting point of the target bow line, thereby simplifying the process of determining the starting point of the bow line.
[0063] According to one embodiment of the present application, the cost function includes the sum of the distance cost and the angle cost, the distance cost is used to characterize the difference between the distance between the endpoint of the bow line to the reference point and the target distance, and the angle cost is used to characterize the difference between the angle between the line between the endpoint and the reference point and the extension direction of the bow line and the target angle, and the reference point includes the end point of the initial bow line.
[0064] Specifically, the reference point includes an end point of an initial bow line or an initial position point of the robot.
[0065] The target distance and target angle can be set according to actual needs. In one example, the target distance can be equal to the bow line spacing, or greater than the bow line spacing. Preferably, the target distance can be equal to twice the bow line spacing. In one example, the target angle can be equal to 90 degrees, 270 degrees, or other degrees. Preferably, the target angle can be 90 degrees. In some cases, when the target bow line is located on the right side of the initial bow line, the target angle can be 90 degrees, and when the target bow line is located on the left side of the initial bow line, the target angle can be 270 degrees.
[0066] In one example, if the difference between the distance between the endpoint of the zigzag line and the reference point and the target distance is smaller, and the difference between the angle between the line connecting the endpoint and the reference point and the extension direction of the zigzag line and the target angle is smaller, then the cost value corresponding to the endpoint is smaller. In other words, the zigzag line can be used as the target zigzag line, and the endpoint can be used as the starting point of the zigzag line.
[0067] In this embodiment, if the distance between the endpoint of the bow line and the reference point is too large, the road conditions between the endpoint and the reference point, such as obstacles, etc., need to be considered when planning the turning path between the endpoint and the reference point, which may cause the planning process of the turning path to be complicated, increase the amount of calculation, and may cause the rationality of the subsequent entire path to be reduced. If the distance between the endpoint of the bow line and the reference point is too small, the space for the robot to turn will be reduced, and the difficulty of planning the turning path will be increased. If the angle between the line between the endpoint and the reference point and the extension direction of the bow line is too large, the greater the height difference between the endpoint of the bow line and the reference point in the extension direction of the bow line, such as the endpoint is lower than the reference point. At this time, the road conditions between the endpoint and the reference point, such as obstacles, etc., need to be considered when planning the turning path between the endpoint and the reference point, which may also cause the planning process of the turning path to be complicated, increase the amount of calculation, and may cause the rationality of the subsequent entire path to be reduced. If the angle between the line between the endpoint and the reference point and the extension direction of the bow line is too small, the greater the height difference between the endpoint of the bow line and the reference point in the extension direction of the bow line, such as the endpoint is higher than the reference point. At this time, when planning the turning path between the endpoint and the reference point, it is also necessary to consider the road conditions between the endpoint and the reference point, such as obstacles, etc. This may also make the planning process of the turning path complicated, increase the amount of calculation, and may cause the rationality of the subsequent entire path to be reduced.
[0068] In this embodiment, by setting the target distance and the target angle, the distance cost can be determined based on the difference between the distance between the endpoint of the bow line and the reference point and the target distance, and the angle cost can be determined based on the difference between the angle between the line connecting the endpoint and the reference point and the extension direction of the bow line and the target angle, so that the cost value of the endpoint of the bow line can be determined according to the sum of the distance cost and the angle cost. The minimum value of the cost values corresponding to the two endpoints of the bow line can be used as the cost value corresponding to the bow line. By selecting the target bow line through the above cost function, the distance between the endpoint of the target bow line and the reference point can be moderate, and the angle between the line connecting the endpoint and the reference point and the extension direction of the target bow line can be moderate, so that the rationality of the turning path between the target bow line and the initial bow line can be improved, thereby improving the rationality of the subsequent entire path and improving the operation efficiency corresponding to the entire path.
[0069] According to an embodiment of the present application, the distance cost distance_cost is obtained by the following formula:
[0070] distance_cost=distance_penalty*distance_bias,
[0071] When the distance between the endpoint and the reference point is less than the target distance, distance_bias = 1.0-exp(distance-target_distance); when the distance between the endpoint and the reference point is greater than or equal to the target distance, distance_bias = 1.0-exp(target_distance-distance). distance_penalty represents the distance coefficient, distance_bias represents the distance deviation, distance represents the distance between the endpoint and the reference point, and target_distance represents the target distance.
[0072] In one example, by setting the above convex function to calculate the distance deviation, the value of the distance deviation can be normalized in the interval of (0,1], so that when the distance is closer to the target distance, the distance deviation is smaller.
[0073] The angle cost can be obtained by the following formula:
[0074] theta_cost=theta_penalty*theta_bias,
[0075] When the angle between the line between the endpoint and the reference point and the direction in which the bow line extends is less than the target angle, theta_bias = 1.0-exp(theta-target_theta); when the angle between the line between the endpoint and the reference point and the direction in which the bow line extends is greater than or equal to the target angle, theta_bias = 1.0-exp(target_theta-theta). theta_penalty represents the angle coefficient, theta_bias represents the angle deviation, theta represents the angle between the line between the endpoint and the reference point and the direction in which the bow line extends, and target_theta represents the target angle.
[0076] In one example, by setting the above convex function to calculate the angle deviation, the value of the angle deviation can be normalized in the interval (0,1], so that when the angle theta is closer to the target angle, the angle deviation is smaller.
[0077] In one example, before calculating the angle deviation, the difference between the angle between the line connecting the endpoint and the reference point and the extension direction of the bow line and the target angle may be standardized, that is, the difference between the angle and the target angle may be adjusted to the interval (0, 2π]. In some cases, the angle formed by two line segments may have two different angle values when taken in different directions. Therefore, the target angle may be set to two values, the sum of which is 2π, such as the target angle may be 90 degrees and 270 degrees. Furthermore, there may be two differences between the angle and the target angle, so the two differences may be standardized, and then the two standardized differences may be compared to obtain the angle difference theta_diff. For example, the angle difference may be obtained by the following formula:
[0078] theta_diff=min(abs(normalize(target_theta-theta),normalize(taget_theta+π-theta)))
[0079] The abs function is a function used to solve the absolute value of data. The above normalize function can limit the difference between the angle theta and the target angle to the interval (0, 2π]. In one example, in the clockwise (or counterclockwise) direction, the angle obtained from the line between the endpoint and the reference point to the extension direction of the bow line, and the angle obtained from the extension direction of the bow line to the line between the endpoint and the reference point is 2π. Through the above formula for taking the minimum value, the influence of the angle determination method on the angle difference calculation result can be ignored, so that the accurate angle difference theta_diff can be obtained. Furthermore, the angle deviation can be obtained by the following formula: theta_bias=1.0-exp(-theta_diff).
[0080] In some embodiments, the distance coefficient and the angle coefficient can be set according to actual needs. For example, the distance coefficient can be set to 4, and the angle coefficient can be set to 1.
[0081] In some embodiments, the weight of the distance (distance coefficient) can be increased to prevent long-distance planning from requiring consideration of a turning path with a turning radius, thereby reducing the probability of planning failure. The target distance can be twice the distance between the bow lines, which can reduce the risk of connecting adjacent bow lines and causing a turning angle that is too large, thereby reducing the risk of reduced operating efficiency. The target angle can be 90 degrees, or 270 degrees, such as the angle formed by a vertical line passing through a reference point and perpendicular to the initial bow line and the bow line. Based on the target angle, the technical solution of the present application tends to connect the bow lines whose endpoints are in the extension direction of the vertical line, which can prevent the reference point from being connected to the endpoint of the bow line with a large angle deviation, thereby reducing the probability of planning failure for the turning path.
[0082] According to an embodiment of the present application, the multiple original bow lines include a first bow line and a second bow line, and step 250 may include: according to the connection order of the multiple original bow lines, selecting multiple first candidate points within a first preset range near the end point of the first bow line, and selecting multiple second candidate points within a second preset range near the starting point of the second bow line; planning a turning path between the first bow line and the second bow line based on the multiple first candidate points and the multiple second candidate points, the starting point of the turning path is one of the multiple first candidate points, and the end point of the turning path is one of the multiple second candidate points.
[0083] Specifically, the first bow line and the second bow line may be two bow lines adjacent in connection order determined by the cost function. For example, the end point of the first bow line is used to connect with the start point of the second bow line, and the connection between the first bow line and the second bow line may be achieved by planning a connection path between the end point of the first bow line and the start point of the second bow line, that is, a turning path.
[0084] In some cases, considering the turning radius constraint of the robot, a larger turning space needs to be reserved for the robot to facilitate the robot to perform U-turn operations.
[0085] In one example, multiple first candidate points can be selected within a first preset range near the end point of the first bow line, and multiple second candidate points can be selected within a second preset range near the start point of the second bow line. One point can be selected from the multiple first candidate points as the start point of the turning path, and one point can be selected from the multiple second candidate points as the end point of the turning path, thereby obtaining a set of start points and end points. Multiple sets of start points and end points can be obtained by selecting different first candidate points and combining them with different second candidate points. For each set of start points and end points, a turning path between the start point and the end point can be planned, thereby obtaining a turning path that can satisfy the turning radius constraint and the collision-free constraint.
[0086] In one example, the planning method of the turning path may include the dubins curve method. For example, each set of starting points and end points can be traversed, and the dubins curve method can be used to plan the turning path until the turning path satisfies the collision-free constraint. Here, the input of the dubins curve method may include the starting point and the end point, the forward direction of the starting point and the forward direction of the end point, and the turning radius constraint of the robot. The turning radius constraint can limit the turning radius of the turning path to be greater than or equal to a preset turning radius, such as the preset turning radius can be the minimum turning radius of the robot. Further, in some cases, if a turning path that satisfies the collision-free constraint is still not obtained after traversing multiple sets of starting points and end points, the hybrid A* method can be used to plan the turning path.
[0087] In one example, the first preset range may be a line segment on the first bow line, and the line segment is located at the end of the first bow line, that is, the end of the line segment is the end of the first bow line; or, the first preset range may be a circular area centered at the end of the first bow line; or, the first preset range may be an area of other shapes, and the end of the first bow line may be located in the area of other shapes. The second preset range is similar to the first preset range, and will not be described here to avoid repetition.
[0088] For example, here we can use Dubins' 6 standard curves as turning paths, the first bow line can have 5 first candidate points, the second bow line can have 5 second candidate points, so that 5*5 groups of starting points and end points can be obtained. By examining 5*5 possible turning paths, the probability of successful turning path planning can be improved.
[0089] In this embodiment, by selecting multiple first candidate points and multiple second candidate points, the probability of successful turning path planning can be improved to a certain extent. In some cases, the number of candidate points should not be too many, as too many candidate points may increase the area of missed operation areas. In addition, by selecting multiple candidate points and using the Dubins curve method to plan the turning path, the use of the traditional kinematic constraint path generation algorithm (hybrid A*) can be avoided, thereby reducing the time for path planning in a large range of scenarios and increasing the probability of successful path planning.
[0090] According to one embodiment of the present application, in the event that planning of a turning path between the first bow line and the second bow line based on a plurality of first candidate points and a plurality of second candidate points fails, step 250 further includes: planning a turning path between the first bow line and the second bow line based on a plurality of first candidate points, an edge route of the target area, and a plurality of second candidate points, wherein the turning path passes through a portion of the edge route.
[0091] Specifically, the turning path planned based on the plurality of first candidate points and the plurality of second candidate points may be difficult to satisfy some constraints, such as the no-collision constraint. If it is difficult to plan a turning path that satisfies the no-collision constraint, for example, none of the planned turning paths satisfies the no-collision constraint, the turning path planning fails.
[0092] In the case where the turning path planning based on the plurality of first candidate points and the plurality of second candidate points fails, the first bow line can be connected to the second bow line by transitioning through a portion of the sideline route. In one example, the sideline route can be a route near the boundary of the target area, and the route extends along the contour of the target area.
[0093] In one example, the contour of the connected area that actually works in the target area can be extracted based on the intersection of the target area and the obstacle map. Furthermore, the edge route that meets the turning radius constraint can be obtained by smoothing and other methods based on the extracted connected area contour. In one example, the optimal main direction can be determined based on the edge route. For example, the direction in which the projection distance of the polygon of the connected area in a certain direction is the smallest can be the main direction. Vertical line segments that intersect with the edge route are drawn in sequence along the main direction, so that multiple original bow lines can be obtained.
[0094] In one example, in the case where the turning path planning based on multiple first candidate points and multiple second candidate points fails, the turning path between the first bow line and the second bow line can be planned based on multiple first candidate points, a part of the route in the sideline route, and multiple second candidate points. Since the sideline route is relatively long, multiple third candidate points close to the end point of the first bow line on the sideline route can be selected, and multiple fourth candidate points close to the starting point of the second bow line on the sideline route can be selected, so that the turning path between the first bow line and the second bow line can be planned based on multiple first candidate points, multiple third candidate points, multiple fourth candidate points, and multiple second candidate points. For example, the number of first candidate points is 5, the number of third candidate points is 50, the number of fourth candidate points is 50, and the number of second candidate points is 5. There are 5*50 possibilities for the connection path (such as the turning path) between the first bow line and the sideline route, and there are 5*50 possibilities for the connection path (such as the turning path) between the sideline route and the second bow line. In this way, there are 2*5*50 possibilities for the turning path between the first bow line and the second bow line.
[0095] In one example, the connection path between the first arch line and the edge line can be planned by using the Dubins curve method, and the connection path between the edge line and the second arch line can also be planned by using the Dubins curve method.
[0096] For example, Figure 3 A schematic diagram of an operation path is shown, and the operation path may be a target path planned according to the method provided in the above embodiment. Figure 3 As shown, the light-colored routes located outside the plurality of bow lines are the sideline routes. The first bow line 1 is connected to point A on the sideline route through a turning path 2, and a portion of the route from point A to point B in the sideline route is used as a transition route, and point B on the sideline route is connected to the second bow line 4 through a turning path 3. The path between the first bow line 1 and the second bow line 4 is the turning path between the first bow line 1 and the second bow line 4 planned by the method of the embodiment of the present application.
[0097] In this embodiment, by selecting multiple first candidate points, multiple third candidate points, multiple fourth candidate points and multiple second candidate points, the probability of successful planning of the turning path between the first bow line and the second bow line can be improved to a certain extent. In some cases, the number of candidate points should not be too many, and too many candidate points may increase the area of the missed operation area. In addition, by selecting multiple candidate points and using the Dubins curve method to plan the turning path, the use of the traditional kinematic constraint path generation algorithm (hybrid A*) can be avoided, thereby reducing the time for path planning in a large range of scenarios and improving the probability of successful path planning.
[0098] Figure 4 Shown is a flow chart of a path planning method provided by another exemplary embodiment of the present application. Figure 4 The embodiment is Figure 2 For the example of the embodiment, in order to avoid repetition, the same points can be referred to the description in the above embodiment, which will not be repeated here. Figure 4 As shown, the path planning method may include the following contents.
[0099] 410: Obtain the connected area contour in the target area, and obtain the edge route that meets the turning radius constraint according to the connected area contour.
[0100] In one example, the contour of the connected area actually working in the target area can be extracted according to the intersection of the target area and the obstacle map. Further, according to the extracted contour of the connected area, a side route that meets the turning radius constraint can be obtained by smoothing or the like. In one example, the turning radius constraint can mean that the turning radius in the side route is greater than or equal to the minimum turning radius of the robot.
[0101] 420: Obtain a set of bow lines according to the edge route.
[0102] In one example, the optimal main direction can be determined based on the edge route. For example, the direction in which the projection distance of the polygon of the connected area in a certain direction is the smallest can be the main direction. Vertical line segments intersecting the edge route are drawn in sequence along the main direction, so that multiple original bow lines can be obtained. Multiple original bow lines can constitute an initial bow line set.
[0103] 430: Setting a reference point, and for each bow line in the bow line set, calculating a cost value of the bow line relative to the reference point based on a cost function.
[0104] In one example, the initial reference point may be the initial position of the robot. Based on the cost function, the cost values of the two end points of the bow line relative to the reference point can be calculated, and the minimum of the two cost values can be used as the cost value of the bow line relative to the reference point. The specific content of the cost function can be found in the description of the above embodiment, and will not be repeated here to avoid repetition.
[0105] 440: Determine a first target bow line from the bow line set according to the cost value of each bow line in the bow line set, remove the first target bow line from the bow line set to update the bow line set, connect the reference point with the first target bow line, update the first target bow line to the initial bow line, update the end point of the initial bow line to the reference point, and repeat the steps of calculating the cost value of the bow line relative to the reference point based on the cost function for each bow line in the bow line set, and then determine the target bow line from the bow line set according to the cost value of each bow line in the bow line set.
[0106] In one example, the reference point can be connected to the endpoint with the lowest cost in the first target wordline (i.e., the initial wordline), which can be the starting point of the first target wordline, and the other endpoint of the first target wordline is the end point of the first target wordline.
[0107] 450: Determine whether the bow line set is empty.
[0108] If the set of arch lines is empty, the path planning process may be terminated, or the target arch line may be connected to the edge route. If the set of arch lines is not empty, step 460 may be executed.
[0109] 460: Determine whether the initial bow line and the target bow line are successfully connected using the Dubins curve method.
[0110] In one example, after determining the target bow line, the initial bow line and the target bow line can be connected using the Dubins curve method, such as connecting the end point (reference point) of the initial bow line with the end point with the smallest cost value on the target bow line. Alternatively, a candidate point can be selected on the bow line, and then two bow lines can be connected based on the candidate point. The specific process of connecting two bow lines based on the candidate point can be referred to the description in the above embodiment, and will not be repeated here to avoid repetition.
[0111] If the Dubins curve method fails to successfully connect the initial arch line and the target arch line, such as the planned turning path between the two arch lines does not satisfy the non-collision constraint, or no turning path is output, step 470 may be executed.
[0112] If the initial arch line and the target arch line are successfully connected using the Dubins curve method, step 491 may be executed.
[0113] 470: Determine whether the Dubins curve method is used to successfully connect the initial bow line and the clockwise outer circle on the edge route.
[0114] In one example, the clockwise outer circle on the sideline route may be a partial route in the clockwise direction of the end point of the initial bow line. For example, the initial bow line and the sideline route may be connected based on these two types of candidate points by selecting candidate points on the initial bow line and the clockwise outer circle on the sideline route. The specific process of connecting the initial bow line and the sideline route based on the candidate points can be referred to the description in the above embodiment, and will not be repeated here to avoid repetition.
[0115] If the Dubins curve method fails to successfully connect the initial bow line and the edge route, such as the planned connection path between the initial bow line and the edge route (which can be a direct path or a turning path) does not meet the collision-free constraint, or there is no output connection path, step 480 can be executed.
[0116] If the initial arch line and the edge line are successfully connected using the Dubins curve method, step 492 can be executed.
[0117] 480: Determine whether the Dubins curve method is used to successfully connect the initial bow line and the counterclockwise outer circle on the edge route.
[0118] In one example, the counterclockwise outer circle on the sideline route may be a partial route in the counterclockwise direction of the end point of the initial bow line. For example, the initial bow line and the sideline route may be connected based on these two types of candidate points by selecting candidate points on the initial bow line and the counterclockwise outer circle on the sideline route. The specific process of connecting the initial bow line and the sideline route based on the candidate points can be referred to the description in the above embodiment, and will not be repeated here to avoid repetition.
[0119] If the Dubins curve method fails to successfully connect the initial arch line and the edge route, such as the connection path between the planned initial arch line and the edge route does not meet the non-collision constraint, or there is no output connection path, it means that the path planning fails.
[0120] If the initial arch line and the edge line are successfully connected using the Dubins curve method, step 493 can be executed.
[0121] 491: Eliminate the target bow line from the bow line set to update the bow line set, update the target bow line to the initial bow line, update the end point of the initial bow line to the reference point, and repeat the steps of calculating the cost value of the bow line relative to the reference point based on the cost function for each bow line in the bow line set, and then determine the target bow line from the bow line set according to the cost value of each bow line in the bow line set.
[0122] After step 491, step 450 may be repeated.
[0123] In one example, the bow line with the smallest cost value in the bow line set can be used as the target bow line. The target bow line is removed from the bow line set to update the bow line set, the target bow line is updated to the initial bow line, the end point of the initial bow line is updated to the reference point, and when the cost value of the bow line in the bow line set is subsequently calculated, the cost value of the bow line relative to the updated reference point can be calculated.
[0124] 492: Determine whether the Dubins curve method is used to successfully connect the clockwise outer circle and the target bow line on the edge route.
[0125] In one example, candidate points can be selected on the target bow line and candidate points can be selected on the clockwise outer circle on the edge route, and then the target bow line and the edge route can be connected based on these two types of candidate points. The specific process of connecting the target bow line and the edge route based on the candidate points can be found in the description in the above embodiment, and will not be repeated here to avoid repetition.
[0126] If the Dubins curve method fails to successfully connect the target arch line and the edge route, such as the planned connection path between the target arch line and the edge route does not meet the non-collision constraint, or there is no output connection path, step 480 can be executed.
[0127] If the target arch line and the edge route are successfully connected using the Dubins curve method, step 491 can be executed.
[0128] 493: Determine whether the Dubins curve method is used to successfully connect the counterclockwise outer circle and the target bow line on the edge route.
[0129] In one example, candidate points can be selected on the target bow line and candidate points can be selected on the counterclockwise outer circle on the edge route, and then the target bow line and the edge route can be connected based on these two types of candidate points. The specific process of connecting the target bow line and the edge route based on the candidate points can be found in the description in the above embodiment, and will not be repeated here to avoid repetition.
[0130] If the Dubins curve method fails to successfully connect the target arch line and the edge route, such as the planned connection path between the target arch line and the edge route does not meet the non-collision constraint, or there is no output connection path, it means that the path planning fails.
[0131] If the target arch line and the edge route are successfully connected using the Dubins curve method, step 491 can be executed.
[0132] In other embodiments, the positions of step 470 and step 480 may be reversed, and similarly, the positions of step 492 and step 493 may also be reversed.
[0133] Exemplary Devices
[0134] Figure 5 FIG. 1 is a schematic diagram of the structure of a path planning device provided by an exemplary embodiment of the present application. Figure 5 As shown, the path planning device 500 includes: an acquisition module 510, a calculation module 520, a determination module 530, an update module 540 and a connection module 550.
[0135] The acquisition module 510 is used to acquire a bow line set, wherein the bow line set includes some of the bow lines in the multiple original bow lines planned in the target area. The calculation module 520 is used to calculate the cost value of the bow line relative to the initial bow line based on the cost function for each bow line in the bow line set, wherein the multiple original bow lines include the initial bow line, and the initial bow line is located outside the bow line set. The determination module 530 is used to determine the target bow line from the bow line set according to the cost value of each bow line in the bow line set, wherein the target bow line is used to connect with the initial bow line. The update module 540 is used to remove the target bow line from the bow line set to update the bow line set, update the target bow line to the initial bow line, and repeat the step of calculating the cost value of the bow line relative to the initial bow line based on the cost function for each bow line in the bow line set until the connection order of the multiple original bow lines is determined. The connection module 550 is used to connect the multiple original arch lines according to the connection sequence of the multiple original arch lines to obtain a target path.
[0136] The embodiment of the present application provides a path planning device, which calculates the cost value of each bow line in the bow line set relative to the initial bow line based on the cost function, thereby determining the target bow line connected to the initial bow line from the bow line set, and then removing the target bow line from the bow line set to update the bow line set, updating the target bow line to the initial bow line, and determining the target bow line of the updated initial bow line from the updated bow line set, and iterating in this way until the connection order of all the bow lines is determined. All the bow lines are connected according to the connection order of all the bow lines, and a turning path between two bow lines adjacent in the connection order can be obtained. Since the latter of the two bow lines is selected from the bow line set based on the cost value, the turning path is more reasonable for the former of the two bow lines. Therefore, the embodiment of the present application can find a more reasonable subsequent bow line for each bow line, that is, a more reasonable turning path can be planned for the bow line, thereby improving the operation efficiency corresponding to the entire path. In addition, the embodiment of the present application determines the connection order of the arch lines by calculating the cost value and then plans the turning path between adjacent arch lines, thereby reducing the difficulty of planning the turning path to a certain extent.
[0137] According to one embodiment of the present application, the independent variables of the cost function include the distance between the endpoint of the bow line and the reference point, and / or the angle between the line between the endpoint and the reference point and the extension direction of the bow line, wherein the reference point includes the end point of the initial bow line.
[0138] According to an embodiment of the present application, the endpoints of the bow line include the starting point of the bow line and the end point of the bow line. The calculation module 520 is used to: calculate the cost value corresponding to the starting point of the bow line and the cost value corresponding to the end point of the bow line based on the cost function; and use the minimum cost value of the cost value corresponding to the starting point of the bow line and the cost value corresponding to the end point of the bow line as the cost value of the bow line relative to the initial bow line.
[0139] According to one embodiment of the present application, the cost function includes the sum of the distance cost and the angle cost, the distance cost is used to characterize the difference between the distance between the endpoint of the bow line to the reference point and the target distance, and the angle cost is used to characterize the difference between the angle between the line between the endpoint and the reference point and the extension direction of the bow line and the target angle, and the reference point includes the end point of the initial bow line.
[0140] According to an embodiment of the present application, the distance cost distance_cost is obtained by the following formula:
[0141] distance_cost=distance_penalty*distance_bias,
[0142] When the distance between the endpoint and the reference point is less than the target distance, distance_bias = 1.0-exp(distance-target_distance); when the distance between the endpoint and the reference point is greater than or equal to the target distance, distance_bias = 1.0-exp(target_distance-distance).
[0143] Among them, distance_penalty represents the distance coefficient, distance_bias represents the distance deviation, distance represents the distance between the endpoint and the reference point, and target_distance represents the target distance.
[0144] The angle cost is obtained by the following formula:
[0145] theta_cost=theta_penalty*theta_bias,
[0146] When the angle between the line between the endpoint and the reference point and the extension direction of the bow line is less than the target angle, theta_bias = 1.0-exp(theta-target_theta); when the angle between the line between the endpoint and the reference point and the extension direction of the bow line is greater than or equal to the target angle, theta_bias = 1.0-exp(target_theta-theta).
[0147] Among them, theta_penalty represents the angle coefficient, theta_bias represents the angle deviation, theta represents the angle between the line between the endpoint and the reference point and the extension direction of the bow line, and target_theta represents the target angle.
[0148] According to an embodiment of the present application, a plurality of original bow lines include a first bow line and a second bow line, and a connection module 550 is used to: select a plurality of first candidate points within a first preset range near the end point of the first bow line, and select a plurality of second candidate points within a second preset range near the starting point of the second bow line according to the connection order of the plurality of original bow lines; plan a turning path between the first bow line and the second bow line based on the plurality of first candidate points and the plurality of second candidate points, the starting point of the turning path being one of the plurality of first candidate points, and the end point of the turning path being one of the plurality of second candidate points.
[0149] According to an embodiment of the present application, a method for planning a turning path includes a Dubins curve method.
[0150] According to one embodiment of the present application, in the event that planning of a turning path between the first bow line and the second bow line based on multiple first candidate points and multiple second candidate points fails, the connection module 550 is further used to: plan a turning path between the first bow line and the second bow line based on multiple first candidate points, the edge route of the target area, and multiple second candidate points, wherein the turning path passes through a portion of the edge route.
[0151] According to one embodiment of the present application, a situation in which planning a turning path between a first bow line and a second bow line based on a plurality of first candidate points and a plurality of second candidate points fails includes: the turning path planned based on the plurality of first candidate points and the plurality of second candidate points does not satisfy the no-collision constraint.
[0152] It should be understood that the operations and functions of the acquisition module 510, the calculation module 520, the determination module 530, the update module 540 and the connection module 550 in the above embodiment can refer to the above Figure 2 or Figure 4 The description of the path planning method provided in the embodiment will not be repeated here to avoid repetition.
[0153] An embodiment of the present application also provides a robot, which includes a control module, and the control module is used to execute the path planning method provided in any of the above embodiments.
[0154] In some embodiments, the robot may be a cleaning robot, a lawn mowing robot, etc.
[0155] The operation and functions of the robot provided in the embodiment of the present application can refer to the above Figure 2 or Figure 4 The description of the path planning method provided in the embodiment will not be repeated here to avoid repetition.
[0156] Figure 6 FIG. 6 is a block diagram of an electronic device 600 for executing a path planning method provided by an exemplary embodiment of the present application. The electronic device 600 may be a robot, a remote control device for controlling a robot, or other devices.
[0157] Reference Figure 6 , the electronic device 600 includes a processing component 610, which further includes one or more processors, and a memory resource represented by a memory 620 for storing instructions executable by the processing component 610, such as an application. The application stored in the memory 620 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 610 is configured to execute instructions to perform the above-mentioned path planning method.
[0158] The electronic device 600 may also include a power supply component configured to perform power management of the electronic device 600, a wired or wireless network interface configured to connect the electronic device 600 to a network, and an input / output (I / O) interface. The electronic device 600 may be operated based on an operating system stored in the memory 620, such as Windows Server 2000. TM , Mac OSX TM , Unix TM , Linux TM , FreeBSD TM or similar.
[0159] A non-temporary computer-readable storage medium, when instructions in the storage medium are executed by a processor of the electronic device 600, enables the electronic device 600 to execute a path planning method.
[0160] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, and will not be described one by one here.
[0161] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0163] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0166] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program check codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0167] It should be noted that, in the description of this application, the terms "first", "second", "third", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0168] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0169] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A path planning method, characterized in that: include: Acquire a bow line set, wherein the bow line set includes some bow lines among a plurality of original bow lines planned in the target area; For each wordline in the wordline set, calculating a cost value of the wordline relative to an initial wordline based on a cost function, wherein the initial wordline is included in the plurality of original wordlines and the initial wordline is outside the wordline set; Determining a target wordline from the wordline set according to the cost value of each wordline in the wordline set, wherein the target wordline is used to connect to the initial wordline; Eliminating the target wordline from the wordline set to update the wordline set, updating the target wordline to an initial wordline, and repeatedly performing the step of calculating a cost value of the wordline relative to the initial wordline based on a cost function for each wordline in the wordline set until a connection order of the plurality of original wordlines is determined; The plurality of original word lines are connected according to the connection sequence of the plurality of original word lines to obtain a target path.
2. The path planning method according to claim 1, characterized in that: The independent variables of the cost function include the distance between the endpoint of the bow line and a reference point, and / or the angle between the line between the endpoint and the reference point and the extension direction of the bow line, wherein the reference point includes the end point of the initial bow line.
3. The path planning method according to claim 2, characterized in that: The endpoints of the bow line include a starting point of the bow line and an end point of the bow line, wherein for each bow line in the bow line set, calculating a cost value of the bow line relative to an initial bow line based on a cost function comprises: Calculate the cost value corresponding to the starting point of the bow line and the cost value corresponding to the end point of the bow line based on the cost function; The minimum cost value between the cost value corresponding to the starting point of the bow line and the cost value corresponding to the end point of the bow line is taken as the cost value of the bow line relative to the initial bow line.
4. The path planning method according to claim 1, characterized in that: The cost function includes the sum of a distance cost and an angle cost, wherein the distance cost is used to characterize the difference between the distance between the endpoint of the bow line and a reference point and a target distance, and the angle cost is used to characterize the difference between the angle between the line connecting the endpoint and the reference point and the extension direction of the bow line and a target angle, and the reference point includes the end point of the initial bow line.
5. The path planning method according to claim 4, characterized in that: The distance cost distance_cost is obtained by the following formula: distance_cost=distance_penalty*distance_bias, When the distance between the endpoint and the reference point is less than the target distance, distance_bias=1.0-exp(distance-target_distance); when the distance between the endpoint and the reference point is greater than or equal to the target distance, distance_bias=1.0-exp(target_distance-distance); Wherein, distance_penalty represents the distance coefficient, distance_bias represents the distance deviation, distance represents the distance between the endpoint and the reference point, and target_distance represents the target distance. The angle cost is obtained by the following formula: theta_cost=theta_penalty*theta_bias, When the angle between the line between the endpoint and the reference point and the extension direction of the bow line is less than the target angle, theta_bias=1.0-exp(theta-target_theta); when the angle between the line between the endpoint and the reference point and the extension direction of the bow line is greater than or equal to the target angle, theta_bias=1.0-exp(target_theta-theta). Among them, theta_penalty represents the angle coefficient, theta_bias represents the angle deviation, theta represents the angle between the line between the endpoint and the reference point and the extension direction of the bow line, and target_theta represents the target angle.
6. The path planning method according to any one of claims 1 to 5, characterized in that: The plurality of original wordlines include a first wordline and a second wordline, wherein the connecting the plurality of original wordlines according to the connection sequence of the plurality of original wordlines to obtain a target path comprises: According to the connection sequence of the plurality of original arched lines, a plurality of first candidate points are selected within a first preset range near the end point of the first arched line, and a plurality of second candidate points are selected within a second preset range near the start point of the second arched line; A turning path between the first bow line and the second bow line is planned based on the multiple first candidate points and the multiple second candidate points, the starting point of the turning path is one of the multiple first candidate points, and the end point of the turning path is one of the multiple second candidate points.
7. The path planning method according to claim 6, characterized in that: In the case that the turning path between the first and second arched lines is planned based on the plurality of first candidate points and the plurality of second candidate points fails, the method of connecting the plurality of original arched lines according to the connection order of the plurality of original arched lines to obtain a target path further comprises: The turning path between the first and second arch lines is planned based on the plurality of first candidate points, the sideline route of the target area, and the plurality of second candidate points, wherein the turning path passes through a portion of the sideline route.
8. The path planning method according to claim 7, characterized in that: The situation where planning the turning path between the first bow line and the second bow line based on the multiple first candidate points and the multiple second candidate points fails includes: the turning path planned based on the multiple first candidate points and the multiple second candidate points does not satisfy the collision-free constraint.
9. A robot, characterized in that: It comprises a control module, and the control module is used to execute the path planning method described in any one of claims 1 to 8.
10. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor, Wherein, the processor is used to execute the path planning method described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the path planning method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor of a computer device, the computer device is enabled to execute the path planning method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Cleaning path planning method based on path finding cost, chip and cleaning robot
CN112799398A
Path planning method based on line segments
CN114674336A
Path planning method based on passable area
CN115509240A
Bow scanning motion guiding method
CN116138688A
Highway route planning method guided by necessary points
CN118761124A