CN-121995908-A - Path planning method, device, medium and product of mobile robot
Abstract
The application discloses a path planning method, a device, a medium and a product of a mobile robot, and relates to the technical field of path planning, wherein the method comprises the steps of obtaining coordinates of all nodes of an active area of the mobile robot; the method comprises the steps of determining a starting point as a central node, determining all feasible nodes in a nine-square lattice with the central node as a node to be planned, determining a road section where the current node to be planned is located, calculating total cost by using a first price calculation formula if the road section where the current node to be planned is located is a first half section, otherwise, calculating the total cost by using a second price calculation formula, updating the central node as the node to be planned with the minimum total cost, and returning to determine all the feasible nodes in the nine-square lattice with the central node as the node to be planned until all the central nodes and the end points are sequentially connected to obtain a planned path when the end points exist in the nine-square lattice with the central node as the center. The application can simultaneously improve the path planning speed and reduce the path cost.
Inventors
- ZHAO YUN
- LIN CHENGQIANG
- XU XING
- HE YONG
- CHU BINGQUAN
Assignees
- 浙江科技大学
- 浙江大学
Dates
- Publication Date
- 20260508
- Application Date
- 20241106
Claims (10)
- 1. The path planning method of the mobile robot is characterized by comprising the following steps of: The method comprises the steps of acquiring coordinates of all nodes of an active area of a mobile robot, wherein the nodes comprise a starting point, an end point and feasible nodes, wherein the starting point is an initial position of the mobile robot, the end point is a target position of the mobile robot, and the feasible nodes are nodes without barriers; Determining the starting point as a central node; determining all feasible nodes in the nine squares taking the central node as the center as nodes to be planned; For any current node to be planned, determining a road section where the current node to be planned is located based on the coordinates of the current node to be planned, the coordinates of the starting point and the coordinates of the ending point; If the road section where the current node to be planned is located is the first half section, calculating the total cost of the current node to be planned by using a first price calculation formula; if the road section where the current node to be planned is located is the second half section, calculating the total cost of the current node to be planned by using a second cost calculation formula; And updating the center node to be the node to be planned with the minimum total cost, and returning to 'determining all feasible nodes in the nine squares with the center node as the center to be the node to be planned', and connecting all the center nodes with the end point in sequence until the end point exists in the nine squares with the center node as the center, so as to obtain the planning path of the mobile robot.
- 2. The path planning method of a mobile robot according to claim 1, wherein determining a link where the current node to be planned is located based on coordinates of the current node to be planned, coordinates of a start point, and coordinates of an end point, comprises: Determining the Euclidean distance from the starting point to the end point according to the coordinates of the starting point and the coordinates of the end point; Determining half of the Euclidean distance from the starting point to the end point as a reference distance; Determining the Euclidean distance from the current node to be planned to the terminal point according to the coordinates of the current node to be planned and the coordinates of the terminal point; judging whether the Euclidean distance from the current node to be planned to the terminal point is smaller than the reference distance; If yes, determining the road section where the current node to be planned is located as a second half section; If not, determining the road section where the current node to be planned is located as the first half section.
- 3. The path planning method of a mobile robot according to claim 1, wherein the first price calculation formula includes: f(n)=g(n)+w 1 (n)×d 2 +w 2 (n)×d 2 ; Wherein f (n) is the total cost of the current node to be planned, g (n) is the actual cost from the starting point to the current node to be planned, w 1 (n) is the first dynamic weighting parameter of the current node to be planned, d 2 is the Euclidean distance from the current node to be planned to the end point, and w 2 (n) is the second dynamic weighting parameter of the current node to be planned.
- 4. A path planning method of a mobile robot according to claim 3, wherein the second cost calculation formula includes: And θ is an included angle between a vector of the current node to be planned pointing to the end point and an x-axis of rectangular coordinates in the active area of the mobile robot.
- 5. The path planning method of a mobile robot according to claim 4, wherein the calculation formula of the first dynamic weighting parameter of the current node to be planned includes: Wherein e is a natural constant, and d 3 is the Euclidean distance from the starting point to the end point.
- 6. The path planning method of a mobile robot according to claim 5, wherein the calculation formula of the second dynamic weighting parameter of the current node to be planned includes: Wherein d 1 is the Euclidean distance from the starting point to the current node to be planned.
- 7. The path planning method of a mobile robot according to claim 6, further comprising, before acquiring coordinates of all nodes of an active area of the mobile robot: Dividing the active area into a plurality of grids with the same size; And determining the coordinates of the center point of each grid as the coordinates of each node.
- 8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the path planning method of a mobile robot according to any one of claims 1-7.
- 9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a path planning method of a mobile robot according to any one of claims 1-7.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements a path planning method of a mobile robot according to any of claims 1-7.
Description
Path planning method, device, medium and product of mobile robot Technical Field The present application relates to the field of path planning technologies, and in particular, to a path planning method, apparatus, medium, and product for a mobile robot. Background The main application of the mobile robot in the agricultural production field is to monitor the growth condition of plants, but the complex background of the agricultural production environment and the diversity of plant types, and various obstacles possibly existing can seriously interfere with the normal operation of the mobile robot. At present, the main problem faced by the agricultural mobile robot in the aspect of path planning is that although the traditional path planning algorithm based on sampling can find the optimal solution in the global range, the problem is more obvious in the aspect of planning speed, particularly in a larger area or an area with a large number of obstacles, and the overall working efficiency of the robot is reduced. The traditional path planning algorithm based on search mainly focuses on efficiency, and although an effective path can be found quickly, a planning result is not necessarily a global optimal solution, and meanwhile, the path is easy to fall into a local minimum value, so that the path cost is high. Disclosure of Invention The application aims to provide a path planning method, a device, a medium and a product of a mobile robot, which are used for solving the problem that the path planning speed and the path cost cannot be achieved in the prior art. In order to achieve the above object, the present application provides the following solutions: in a first aspect, the present application provides a path planning method for a mobile robot, including: The method comprises the steps of acquiring coordinates of all nodes of an active area of a mobile robot, wherein the nodes comprise a starting point, an end point and feasible nodes, wherein the starting point is an initial position of the mobile robot, the end point is a target position of the mobile robot, and the feasible nodes are nodes without barriers; Determining the starting point as a central node; determining all feasible nodes in the nine squares taking the central node as the center as nodes to be planned; For any current node to be planned, determining a road section where the current node to be planned is located based on the coordinates of the current node to be planned, the coordinates of the starting point and the coordinates of the ending point; If the road section where the current node to be planned is located is the first half section, calculating the total cost of the current node to be planned by using a first price calculation formula; if the road section where the current node to be planned is located is the second half section, calculating the total cost of the current node to be planned by using a second cost calculation formula; And updating the center node to be the node to be planned with the minimum total cost, and returning to 'determining all feasible nodes in the nine squares with the center node as the center to be the node to be planned', and connecting all the center nodes with the end point in sequence until the end point exists in the nine squares with the center node as the center, so as to obtain the planning path of the mobile robot. Optionally, determining the road section where the current node to be planned is located based on the coordinates of the current node to be planned, the coordinates of the starting point and the coordinates of the ending point includes: Determining the Euclidean distance from the starting point to the end point according to the coordinates of the starting point and the coordinates of the end point; Determining half of the Euclidean distance from the starting point to the end point as a reference distance; Determining the Euclidean distance from the current node to be planned to the terminal point according to the coordinates of the current node to be planned and the coordinates of the terminal point; judging whether the Euclidean distance from the current node to be planned to the terminal point is smaller than the reference distance; If yes, determining the road section where the current node to be planned is located as a second half section; If not, determining the road section where the current node to be planned is located as the first half section. Optionally, the first price calculation formula includes: f(n)=g(n)+w1(n)×d2+w2(n)×d2; Wherein f (n) is the total cost of the current node to be planned, g (n) is the actual cost from the starting point to the current node to be planned, w 1 (n) is the first dynamic weighting parameter of the current node to be planned, d 2 is the Euclidean distance from the current node to be planned to the end point, and w 2 (n) is the second dynamic weighting parameter of the current node to be planned. Optionally, the second cost calculation formula