Path planning method, device, computer equipment and storage medium

By adjusting the weight of the idle grid in path planning and based on the current posture of the robot or vehicle, the problem of inconsistency between the re-planned path and the motion state in the existing technology is solved, and more accurate and continuous path planning is achieved.

CN115509216BActive Publication Date: 2024-10-15GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110684142.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-21
Publication Date
2024-10-15
Estimated Expiration
2041-06-21

AI Technical Summary

Technical Problem

When re-planning the existing path planning methods, the path may not be consistent with the motion state of the robot or vehicle, resulting in swaying left and right.

Method used

By obtaining the end position of the target object, the occupied grid map of the current position and the current posture, the weight of the free grid is adjusted according to the posture, and a path search is performed to determine the target path, making the path more consistent with the current motion state.

Benefits of technology

It reduces the swaying caused by the path being inconsistent with the current motion state during re-planning, and improves the accuracy and continuity of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509216B_ABST
    Figure CN115509216B_ABST
Patent Text Reader

Abstract

The present application relates to a path planning method, device, computer equipment and storage medium, the method comprising: obtaining the terminal position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object; determining the weight of the free grids in the occupancy grid map according to the current posture; performing a path search based on the weight of the free grids to obtain the target path for the target object to reach the terminal position from the current position. In the above-mentioned path planning method, the weight of the occupancy grid map is determined in combination with the current posture of the target object in the path search, so that the target path obtained by the path search is more consistent with the current motion state of the target object, and the situation that the path obtained by the search during re-planning does not match the current motion state and causes swaying occurs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of navigation technology, and in particular to a path planning method, device, computer equipment and storage medium. Background Art

[0002] Path planning is one of the main research contents of motion planning. Motion planning consists of path planning and trajectory planning. The sequence of points or curves connecting the starting point and the end point is called a path, and the strategy of forming a path is path planning. In the technical fields of unmanned driving, robotics, etc., autonomous navigation is a necessary skill, and path planning is one of the important links in autonomous navigation.

[0003] In the related technology, commonly used methods for path planning include complete planning algorithms, such as depth-first pathfinding algorithm, breadth-first pathfinding algorithm, Dijkstra algorithm, A* algorithm, etc., and sampling-based planning algorithms, such as PRM algorithm (a path planning method based on heuristic node enhancement strategy), etc. However, in the actual path planning process, when re-planning, the re-planned path may not match the current motion state of the robot, thereby causing the robot or vehicle to sway from side to side. Summary of the invention

[0004] Based on this, it is necessary to provide a path planning method, device, computer equipment and storage medium that can reduce the left and right swaying of a robot or vehicle during re-planning in order to address the above technical problems.

[0005] A path planning method, the method comprising:

[0006] Obtaining the target object's final position, an occupancy grid map corresponding to the current position, and the target object's current posture;

[0007] Determining the weight of the free grid in the occupied grid map according to the current posture;

[0008] A path search is performed based on the weights of the free grids to obtain a target path for the target object to reach the end point from the current location.

[0009] In one embodiment, determining the weight of the free grid in the occupied grid map according to the current posture includes:

[0010] Obtaining initial weights of free grids in the occupied grid map;

[0011] The initial weight of the idle grid is adjusted according to the current posture to obtain the adjusted weight of the idle grid.

[0012] In one embodiment, adjusting the initial weight of the idle grid according to the current posture to obtain the adjusted weight of the idle grid includes:

[0013] Matching the current posture with the idle grid respectively;

[0014] If it is determined according to the matching result that the idle grid and the current posture do not satisfy a preset matching condition, the weight of the idle grid is increased according to a preset rule.

[0015] In one embodiment, after matching the current posture with the idle grid respectively, the method further includes:

[0016] If it is determined according to the matching result that the idle grid and the current posture meet a preset matching condition, the weight of the idle grid is lowered according to a preset rule.

[0017] In one of the embodiments, the current driving direction of the target object is obtained according to the current posture; the quadrant in which the current driving direction and the idle grid are located in a preset plane rectangular coordinate system is determined; the preset plane rectangular coordinate system is established on the ground plane; when the current driving direction is different from the quadrant in which the idle grid is located, it is determined that the idle grid and the current posture meet a preset matching condition.

[0018] In one embodiment, the current traveling direction of the target object is obtained according to the current posture; the pointing direction from the current position to the idle grid is determined; if the angle between the pointing direction and the current traveling direction is less than a preset angle threshold, it is determined that the idle grid meets the preset matching condition.

[0019] In one embodiment, the performing path search based on the weight of the free grid to obtain the target path of the target object from the current location to the end location includes:

[0020] According to the weight of the idle grid, the weight and value of each candidate path are calculated respectively;

[0021] A candidate path corresponding to the minimum weight and value among the weights and values ​​is selected and determined as the target path.

[0022] A path planning device, comprising:

[0023] An acquisition module, used to acquire the end position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object;

[0024] A weight determination module, used to determine the weight of the free grid in the occupied grid map according to the current posture;

[0025] The path search module is used to perform path search based on the weight of the free grid to obtain a target path for the target object to reach the end position from the current position.

[0026] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0027] Obtaining the target object's final position, an occupancy grid map corresponding to the current position, and the target object's current posture;

[0028] Determining the weight of the free grid in the occupied grid map according to the current posture;

[0029] A path search is performed based on the weights of the free grids to obtain a target path for the target object to reach the end point from the current location.

[0030] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0031] Obtaining the target object's final position, an occupancy grid map corresponding to the current position, and the target object's current posture;

[0032] Determining the weight of the free grid in the occupied grid map according to the current posture;

[0033] A path search is performed based on the weights of the free grids to obtain a target path for the target object to reach the end point from the current location.

[0034] The above-mentioned path planning method, device, computer equipment and storage medium obtain, for the target object, its terminal position, the occupancy grid map corresponding to the current position, and the current posture of the target object, determine the weight of the free grids in the occupancy grid map according to the current posture of the target object, and then search for the target path from the current position to the terminal position according to the weight of each free grid. In the path search, the weight of the occupancy grid map is determined in combination with the current posture of the target object, so that the target path obtained by the path search is more consistent with the current motion state of the target object, and the situation that the path obtained by the search during re-planning does not match the current motion state and causes swaying is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a process flow of a path planning method in one embodiment;

[0036] Figure 2is a schematic diagram of an occupancy grid map of a target object in a specific embodiment;

[0037] Figure 3 A schematic flow chart of a path planning method in another embodiment;

[0038] Figure 4 A schematic diagram of an occupancy grid map when a robot performs path planning in a specific embodiment;

[0039] Figure 5 A schematic diagram of an occupancy grid map when a robot performs path planning in another specific embodiment;

[0040] Figure 6 is a structural block diagram of a path planning device in one embodiment;

[0041] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] In one embodiment, Figure 1 As shown, a path planning method is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes steps S110 to S130.

[0044] Step S110, obtaining the end position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object.

[0045] The target object represents an object for which a path search is required. The target object may be moving or about to depart to a terminal location. In one embodiment, the target object may be a robot, an unmanned vehicle, etc. The terminal location of the target object is the location where the target object needs to go; in one embodiment, the above method can be applied to a global path search, in which the terminal location of the target object is the final destination of the target object; in another embodiment, the above method can be applied to a local path search, in which the global road segment is divided into multiple local road segments, and the terminal location of the target object is the terminal of the local road segment.

[0046] The occupancy grid map represents the position of the target object using discrete grids, where the grid states are free and occupied. The target object can only reach the grid in the free state, and the grid in the occupied state indicates that the corresponding position is occupied by an obstacle. The occupancy grid map of the current position of the target object represents the occupancy grid map near the current position; in one embodiment, the occupancy grid map can be an occupancy grid map within a preset range of the position of the target object. The preset range can be set according to actual conditions. Figure 2 As shown, in a specific embodiment, it is a schematic diagram of an occupancy grid map of a target object; wherein the squares shown represent a grid respectively, black represents an occupied state, i.e. an occupied grid, and white represents an idle state, i.e. an idle grid. Further, the occupancy grid map of the current location of the target object can be obtained in any manner.

[0047] The current posture of the target object is used to describe the posture of the target object in the current reference coordinate system; in one embodiment, the current posture of the target object includes the coordinates of the current location of the target object and the current driving direction of the target object. Further, in one embodiment, the right, front, and top directions of the carrier are defined to form a right-handed system, and the rotation around the forward axis is the roll angle, the rotation around the right axis is the pitch angle, and the rotation around the upward axis is the heading angle; in this embodiment, the current driving direction of the target object can be represented by the heading angle in the right-handed system formed by the target object.

[0048] Step S120, determining the weight of the free grid in the occupied grid map according to the current posture.

[0049] When the occupancy grid map is used in path search, all grids in the occupancy grid map have a corresponding weight; among them, the weight of the idle grid is smaller, and the weight of the occupied grid is larger. When searching for a path, the optimal path is determined according to the weight of the grid, and the cost required for the target object to move one grid is determined according to the weight of the grid. In a specific embodiment, the weight of the grid is used as the cost of the target object moving the grid. When searching for a path, a path with the lowest cost is usually searched as the target path.

[0050] In one embodiment, Figure 3 As shown, the weight of the free grid in the occupied grid map is determined according to the current posture, including step S121 and step S122.

[0051] Step S121, obtaining the initial weights of the free grids in the occupied grid map.

[0052] In one embodiment, the initial weight of the idle grid in the occupancy grid map can be determined according to the distance from the obstacle. The farther the idle grid is from the obstacle position, the lower the initial weight is, and the closer the idle grid is to the obstacle position, the higher the initial weight is. Specifically, determining the initial weight according to the distance from the obstacle can be achieved in any way.

[0053] Step S122, adjusting the initial weight of the idle grid according to the current posture to obtain the adjusted weight of the idle grid.

[0054] In the original occupancy grid map, the weight of each free grid is the same, that is, the cost of the target object moving each free grid is the same. The path planned by the original path planning method may pass through one side of the obstacle, and the target object may pass through the other side of the obstacle when it is replanned after moving. When the directions of the two paths are greatly different, the input to the controller of the target object will cause the target object to sway left and right. Therefore, in this embodiment, the initial weight of the free grid is adjusted in combination with the current weight of the target object.

[0055] Furthermore, the initial weights of the idle grids are adjusted according to the current posture to obtain the adjusted weights of the idle grids, specifically, the idle grids are matched with the current posture, and then the initial weights of the idle grids are adjusted according to the matching results; further, the initial weights of the idle grids that do not match the current posture can be increased according to the matching results; further, the initial weights of the idle grids that match the current posture can also be lowered according to the matching results.

[0056] Step S130 , performing a path search based on the weights of the free grids to obtain a target path for the target object to reach the destination from the current location.

[0057] In one embodiment, a path search is performed based on the weights of the free grids to obtain a target path for the target object to reach the destination location from the current location, including: calculating the weights and values ​​of each candidate path according to the weights of the free grids; and selecting the candidate path corresponding to the minimum weight and value among the weights and values ​​to determine it as the target path.

[0058] In this embodiment, the candidate path is a possible path from the current location to the destination location, which is composed of the free grids in the occupied grid map. In the above steps, the weights of the free grids have been determined according to the current posture of the target object, and the weights and values ​​of each candidate path can be obtained. The weights and values ​​are used as the cost of moving along the candidate path. The lower the cost, the more suitable the path. Therefore, the candidate path corresponding to the minimum weight and value in the weights and values ​​is selected as the target path, which is the optimal path from the current location to the destination location searched at the current moment.

[0059] In one embodiment, the above path planning method can be applied to an existing path planning method, and the weight of each free grid in the occupied grid map before searching is adjusted based on the current posture, and then the path search is performed. In a specific embodiment, the path planning method may include a depth-first path finding algorithm, a breadth-first path finding algorithm, a Dijkstra algorithm, an A* algorithm, a PRM algorithm, and the like.

[0060] The above path planning method obtains the destination position, the occupancy grid map corresponding to the current position, and the current posture of the target object for the target object, determines the weight of the free grids in the occupancy grid map according to the current posture of the target object, and then searches for the target path from the current position to the destination position according to the weight of each free grid. The weight of the occupancy grid map is determined in combination with the current posture of the target object in the path search, so that the target path obtained by the path search is more consistent with the current motion state of the target object, reducing the situation where the path obtained by the search during re-planning does not match the current motion state and causes swaying.

[0061] In one embodiment, the initial weight of the idle grid is adjusted according to the current posture to obtain the adjusted weight of the idle grid, including: matching the current posture with the idle grid respectively; if it is determined according to the matching result that the idle grid and the current posture do not meet the preset matching condition, the weight of the idle grid is increased according to the preset rule.

[0062] Among them, the preset matching condition is used to determine whether the idle grid matches the current posture of the target object; in one embodiment, the preset matching condition can be set according to the actual situation. For example, by judging the angle between the edge between the idle grid and the current position of the target object, and the edge corresponding to the driving direction in the current posture, it is judged whether the idle grid matches the current posture; the specific preset matching condition can be set to whether the angle between the edge between the idle grid and the current position and the edge where the driving direction is located is less than the preset angle, if so, the preset matching condition is satisfied. For another example, a plane rectangular coordinate system can be constructed on the ground plane, and by judging the position of the edge between the idle grid and the current position and the edge where the current driving direction is located in the plane rectangular coordinate system, it is judged whether the idle grid matches the current posture. In other embodiments, the preset matching condition can also be set to other conditions.

[0063] The preset rules are used to specify how to adjust the initial weight of the idle grid map; the preset rules can also be set according to the actual situation. For example, it can be set to adjust the initial weight according to a multiple, such as the initial weight is 2, and the initial weight of the idle grid that does not meet the preset matching conditions is adjusted to 5 times, that is, 10; it can also be set to adjust the initial weight according to the preset step size, such as the initial weight is 2, and the initial weight of the idle grid that does not meet the preset matching conditions is set to 2+5=7; and so on.

[0064] Furthermore, the preset rules can also be set to adjust the initial weights of the idle grids in combination with the degree of mismatch with the current posture; in one embodiment, for the idle grids that do not meet the preset matching conditions, the degree of mismatch of the idle grids that do not meet the preset matching conditions is determined respectively, and the adjusted weights of the idle grids that do not meet the preset matching conditions are determined according to the degree of mismatch.

[0065] Among them, the adjusted weight of the idle grid that does not meet the preset matching condition is determined according to the mismatch degree, which can be: the idle grid with a greater mismatch degree has a higher adjusted weight. For example, in a specific embodiment, a mapping relationship table of mismatch degrees and adjusted weights can be preset, and when determining the adjusted weight according to the mismatch degree, the corresponding adjusted weight is searched in the mapping relationship table according to the mismatch degree of the idle grid. In other embodiments, the adjusted weight of the idle grid can be determined according to the mismatch degree by other means.

[0066] Among them, determining the mismatch degree of the idle grid that does not meet the preset matching condition can be achieved in any way. For example, the mismatch degree is determined by combining the angle between the side between the idle grid and the current position and the side where the current driving direction is located; for example, a mapping relationship table between the angle and the mismatch degree can be predetermined, and when determining the mismatch degree, the corresponding mismatch degree is searched in the mapping relationship table according to the angle between the side between the idle grid and the current position and the side where the current driving direction is located. In other embodiments, the mismatch degree of the idle grid that does not meet the preset matching condition can also be determined in other ways.

[0067] In this embodiment, the adjusted weight of the idle grid is determined in combination with the degree of mismatch between the idle grid and the current posture, so that the adjusted weight of the idle grid with a higher degree of mismatch with the current posture can be set to a higher value, and the adjusted weight of the idle grid with a lower degree of mismatch with the current posture can be set to a higher value. Therefore, when searching for a path, the search is performed from small to large weights, thereby reducing the amount of calculation of the control module.

[0068] In this embodiment, by increasing the weight of the idle grids that do not meet the preset matching conditions with the current posture, the weight of the idle grids that meet the preset matching conditions is made smaller than the weight of the idle grids that do not meet the preset matching conditions. When searching for a path, the idle grids that match the current posture will be searched first as the target path, thereby reducing the large deviation between the target path determined during re-planning and the current posture, causing the target object to sway left and right.

[0069] Furthermore, in another embodiment, after matching the current posture with the idle grids respectively, the method further includes: if it is determined according to the matching result that the idle grids and the current posture meet a preset matching condition, lowering the weight of the idle grids according to a preset rule.

[0070] After matching the current posture with the idle grid, the weight of the idle grid that does not meet the preset matching condition may not be adjusted, while the weight of the idle grid that meets the preset matching condition may be lowered; or, while increasing the initial weight of the idle grid that does not meet the preset matching condition, the initial weight of the idle grid that meets the preset matching condition may be lowered, which can also achieve the goal of making the weight of the idle grid that meets the preset matching condition smaller than the weight of the idle grid that does not meet the preset matching condition. When searching for a path, the idle grid that matches the current posture will be searched first as the target path, thereby reducing the large deviation between the target path determined during replanning and the current posture, causing the target object to sway left and right. Among them, the method of lowering the initial weight of the idle grid that meets the preset matching condition according to the preset rule is similar to the method of increasing the initial weight of the idle grid that does not meet the preset matching condition according to the preset rule, which will not be repeated here.

[0071] It should be noted that after matching the current posture with the idle grids respectively, the order of the steps of increasing or decreasing the corresponding idle grids is not limited. For example, the weights of the idle grids that do not meet the preset matching conditions may be increased first, and then the weights of the idle grids that meet the preset matching conditions may be decreased; or the weights of the idle grids that meet the preset matching conditions may be decreased first, and then the weights of the idle grids that do not meet the preset matching conditions may be increased.

[0072] Furthermore, in one embodiment, the current driving direction of the target object is obtained according to the current posture; the quadrant in which the current driving direction and the idle grid are located in a preset plane rectangular coordinate system is determined; the preset plane rectangular coordinate system is established on the ground plane; when the current driving direction is different from the quadrant in which the idle grid is located, it is determined that the idle grid and the current posture meet the preset matching conditions.

[0073] Among them, two axes that are perpendicular to each other and have a common origin on the same plane constitute a plane rectangular coordinate system, referred to as a rectangular coordinate system (Rectangular Coordinates). Usually, the two axes are placed in a horizontal position and a vertical position respectively, and the rightward and upward directions are the positive directions of the two axes respectively. In this embodiment, a plane rectangular coordinate system is constructed on the ground plane, which is recorded as a preset plane rectangular coordinate system; further, in one embodiment, the origin and the horizontal axis of the preset plane rectangular coordinate system can be set according to actual conditions, for example, the origin can be set to the current position, and the positive direction of the horizontal axis is set to the east / west / south / north or the vector between the current position and the end position, and so on. Quadrant is the four areas divided by the horizontal axis and the vertical axis in the plane rectangular coordinate system (Cartesian coordinate system), and each area is called a quadrant.

[0074] In a specific embodiment, after constructing the preset rectangular coordinate system, the quadrant in which the edge between the current position and the idle grid is located in the preset rectangular coordinate system, and the quadrant in which the current driving direction in the current posture is located in the preset rectangular coordinate system can be obtained. Further, by determining whether the quadrants in which the two are located are the same, it is determined whether the idle grid meets the preset matching condition.

[0075] In another embodiment, the current driving direction of the target object is obtained according to the current posture; the pointing direction from the current position to the idle grid is determined; if the angle between the pointing direction and the current driving direction is less than a preset angle threshold, it is determined that the idle grid meets the preset matching condition.

[0076] In this embodiment, the angle between the edge obtained by connecting the idle grid and the current position and the edge of the current driving direction in the current posture is used to determine whether the idle grid and the current posture meet the preset matching condition. Further, if the angle is greater than or equal to the preset angle threshold, it is determined that the idle grid does not meet the preset matching condition, and if the angle is less than the preset angle threshold, it is determined that the preset matching condition is met. Among them, the preset angle threshold can be set according to actual conditions.

[0077] In the above embodiments, the determination method of the preset matching condition is described respectively. After determining whether the idle grid meets the preset matching condition by the above method, the weight of the idle grid will be adjusted according to the matching result. In other embodiments, the preset matching condition can also be set to other content.

[0078] In a specific embodiment, the above path planning method is described with a detailed embodiment. In this embodiment, the target object is a robot and the above method is applied to the Dijkstra method. The following steps are included:

[0079] Obtain the occupied grid map, current posture and terminal position of the robot's current location; read the current driving direction in the current posture, match the idle grid with the current driving direction to obtain a matching result, determine whether the preset matching condition is met according to the matching result, and if the preset matching condition is not met, determine the mismatch degree of the idle grid; determine the adjusted weight of the mismatched idle grid based on the mismatch degree; perform path search based on the adjusted weights of each idle grid map in the occupied grid map, and obtain the path with the minimum weight sum (i.e., the minimum cost) as the target path.

[0080] like Figure 4 As shown, the car shown in the figure represents the current position of the robot (i.e., the starting point), and the star in the figure represents the final position of the robot. The target path planned by the original Dijkstra method may pass through one side of the obstacle (path ① in the figure), and may pass through the other side of the obstacle (path ② in the figure) when replanned after movement (in other embodiments, it may also be other paths). When the directions of the two target paths differ greatly, the input to the robot controller may cause the robot to sway left and right.

[0081] In the original grid map, the cost of each idle grid taken by the robot is the same. In this embodiment, the weight of the idle grid that is significantly different from the actual posture of the robot is increased, so that the weight of some idle grids that do not match the current posture of the robot is higher, so that the cost of using the idle grid as the target path is higher, and Dijkstra tends to search for a path that matches the current posture of the robot. Figure 5 As shown in the figure, the black arrow is the current posture of the robot, and the gray grids are some grids that do not match the current posture of the robot. By increasing the weights between these grids, the robot tends to search for paths in the free grids in the direction that matches the current posture of the robot. The obtained target path is more consistent with the current posture of the robot, so that the robot can maintain good motion continuity after multiple replanning.

[0082] The above path planning method improves the Dijkstra path planning method by increasing the weight of the idle grids that do not match the current posture, so that the target path obtained during the path search is more consistent with the robot's current motion state. This can effectively improve the problem of the robot swaying left and right during the replanning process because the path does not match the robot's current state.

[0083] It should be understood that, although each step in each flow chart involved in the above-described embodiment is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have strict order restrictions, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each flow chart involved in the above-described embodiment may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of the steps or stages in other steps or other steps.

[0084] In one embodiment, Figure 6 As shown, a path planning device is provided, including: an acquisition module 610, a weight determination module 620 and a path search module 630, wherein:

[0085] An acquisition module 610 is used to acquire the end position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object;

[0086] A weight determination module 620, for determining the weight of the free grid in the occupied grid map according to the current posture;

[0087] The path search module 630 is used to perform path search based on the weights of the free grids to obtain a target path for the target object to reach the destination from the current location.

[0088] The above-mentioned path planning device obtains the terminal position, the occupancy grid map corresponding to the current position, and the current posture of the target object, and determines the weight of the free grids in the occupancy grid map according to the current posture of the target object, and then searches for the target path from the current position to the terminal position according to the weight of each free grid. The weight of the occupancy grid map is determined in combination with the current posture of the target object during the path search, so that the target path obtained by the path search is more consistent with the current motion state of the target object, and reduces the situation where the path obtained by the search during re-planning does not match the current motion state, resulting in swaying.

[0089] In one embodiment, the weight determination module 620 of the above-mentioned device includes: an initial weight acquisition submodule, used to obtain the initial weight of the idle grid in the occupied grid map; a weight adjustment submodule, used to adjust the initial weight of the idle grid according to the current posture to obtain the adjusted weight of the idle grid.

[0090] In one embodiment, the weight adjustment submodule of the above-mentioned device includes: a matching unit, which is used to match the current posture with the idle grid respectively; an adjustment unit, which is used to increase the weight of the idle grid according to preset rules if it is determined based on the matching result that the idle grid and the current posture do not meet the preset matching conditions.

[0091] In one embodiment, the adjustment unit of the weight adjustment submodule of the above device is further used to lower the weight of the idle grid according to a preset rule if it is determined according to the matching result that the idle grid and the current posture meet a preset matching condition.

[0092] In one embodiment, the adjustment unit of the weight adjustment submodule of the above-mentioned device includes: a driving direction determination subunit, which is used to obtain the current driving direction of the target object according to the current posture; a quadrant determination subunit, which is used to determine the quadrant in which the current driving direction and the idle grid are located in a preset plane rectangular coordinate system; the preset plane rectangular coordinate system is established on the ground plane; and a judgment subunit, which is used to determine that the idle grid and the current posture meet the preset matching condition when the current driving direction is different from the quadrant in which the idle grid is located.

[0093] In one embodiment, the adjustment unit of the weight adjustment submodule of the above-mentioned device includes: a driving direction determination subunit, which is used to obtain the current driving direction of the target object according to the current posture; a pointing direction determination subunit, which is used to determine the pointing direction from the current position to the idle grid; and a judgment subunit, which is used to determine that the idle grid meets the preset matching condition if the angle between the pointing direction and the current driving direction is less than a preset angle threshold.

[0094] In one embodiment, the path search module 630 of the above-mentioned device includes: a weight and value determination submodule, which is used to calculate the weight and value of each candidate path according to the weight of the free grid; and a target path determination submodule, which is used to select the candidate path corresponding to the minimum weight and value among the weights and values, and determine it as the target path.

[0095] For the specific embodiments of the path planning device, please refer to the embodiments of the path planning method above, which will not be repeated here. Each module in the above-mentioned path planning device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0096] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a path planning method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0097] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0098] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0099] Obtain the destination position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object; determine the weight of the free grids in the occupancy grid map according to the current posture; perform path search based on the weight of the free grids to obtain the target path from the current position of the target object to the destination position.

[0100] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the initial weights of the idle grids in the occupied grid map; and adjusting the initial weights of the idle grids according to the current posture to obtain the adjusted weights of the idle grids.

[0101] In one embodiment, when the processor executes the computer program, the following steps are also implemented: matching the current posture with the idle grids respectively; if it is determined according to the matching result that the idle grids and the current posture do not meet the preset matching conditions, increasing the weight of the idle grids according to the preset rules.

[0102] In one embodiment, when the processor executes the computer program, the following steps are further implemented: if it is determined according to the matching result that the idle grid and the current posture meet the preset matching condition, the weight of the idle grid is lowered according to the preset rule.

[0103] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the current driving direction of the target object according to the current posture; determining the quadrant in which the current driving direction and the idle grid are located in a preset plane rectangular coordinate system; the preset plane rectangular coordinate system is established on the ground plane; when the current driving direction is different from the quadrant in which the idle grid is located, determining that the idle grid and the current posture meet the preset matching conditions.

[0104] In one embodiment, the processor further implements the following steps when executing the computer program: obtaining the current driving direction of the target object according to the current posture; determining the pointing direction from the current position to the idle grid; if the angle between the pointing direction and the current driving direction is less than a preset angle threshold, determining that the idle grid meets the preset matching condition.

[0105] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the weights of the free grids, the weights and values ​​of the candidate paths are calculated respectively; and the candidate path corresponding to the minimum weight and value among the weights and values ​​is selected and determined as the target path.

[0106] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0107] Obtain the destination position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object; determine the weight of the free grids in the occupancy grid map according to the current posture; perform path search based on the weight of the free grids to obtain the target path from the current position of the target object to the destination position.

[0108] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the initial weights of the idle grids in the occupied grid map; adjusting the initial weights of the idle grids according to the current posture to obtain the adjusted weights of the idle grids.

[0109] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: matching the current posture with the idle grids respectively; if it is determined according to the matching result that the idle grid and the current posture do not meet the preset matching conditions, increasing the weight of the idle grid according to the preset rules.

[0110] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if it is determined according to the matching result that the idle grid and the current posture meet the preset matching condition, the weight of the idle grid is lowered according to the preset rule.

[0111] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current driving direction of the target object according to the current posture; determining the quadrant in which the current driving direction and the idle grid are located in a preset plane rectangular coordinate system; the preset plane rectangular coordinate system is established on the ground plane; when the current driving direction is different from the quadrant in which the idle grid is located, determining that the idle grid and the current posture meet the preset matching conditions.

[0112] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the current driving direction of the target object based on the current posture; determining the pointing direction from the current position to the idle grid; if the angle between the pointing direction and the current driving direction is less than a preset angle threshold, determining that the idle grid meets the preset matching condition.

[0113] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the weight of the free grid, the weight and value of each candidate path are calculated respectively; and the candidate path corresponding to the minimum weight and value among the weights and values ​​is selected and determined as the target path.

[0114] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0115] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0116] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A path planning method, It is characterized in that The method comprises: Obtaining the target object's final position, an occupancy grid map corresponding to the current position, and the target object's current posture; Matching the current posture with the free grids in the occupied grid map respectively, and determining whether the free grid and the current posture meet a preset matching condition according to the matching result; Determining the weight of the free grid in the occupied grid map according to whether a preset matching condition is met; Performing a path search based on the weights of the free grids to obtain a target path for the target object to reach the destination position from the current position; The step of matching the current posture with the free grids in the occupied grid map respectively and determining whether the free grids and the current posture meet a preset matching condition according to the matching result includes: Obtaining a current traveling direction of the target object according to the current posture; If the quadrant in which the current driving direction is located in the preset plane rectangular coordinate system is different from the quadrant in which the idle grid is located in the preset plane rectangular coordinate system, it is determined that the idle grid and the current posture meet a preset matching condition.

2. The method according to claim 1, It is characterized in that The step of determining the weight of the free grid in the occupied grid map according to whether the preset matching condition is met includes: Obtaining initial weights of free grids in the occupied grid map; According to whether the preset matching condition is met, the initial weight of the idle grid is adjusted to obtain the adjusted weight of the idle grid.

3. The method according to claim 2, It is characterized in that The adjusting the initial weight of the idle grid according to whether the preset matching condition is met to obtain the adjusted weight of the idle grid includes: If the preset matching condition is not met, the weight of the idle grid is increased according to a preset rule.

4. The method according to claim 2, It is characterized in that The adjusting the initial weight of the idle grid according to whether the preset matching condition is met to obtain the adjusted weight of the idle grid includes: If the preset matching condition is met, the weight of the idle grid is lowered according to a preset rule.

5. The method according to claim 1 or 2, Features: The preset plane rectangular coordinate system is established on the ground plane.

6. The method according to any one of claims 1 to 4, It is characterized in that The path search is performed based on the weight of the free grid to obtain a target path for the target object to reach the end position from the current position, including: According to the weight of the idle grid, the weight and value of each candidate path are calculated respectively; A candidate path corresponding to the minimum weight and value among the weights and values ​​is selected and determined as the target path.

7. A path planning device, It is characterized in that The device comprises: An acquisition module, used to acquire the end position of the target object, the occupancy grid map corresponding to the current position, and the current posture of the target object; A weight determination module, used to match the current posture with the free grids in the occupied grid map respectively, and determine whether the free grid and the current posture meet a preset matching condition according to the matching result; and determine the weight of the free grid in the occupied grid map according to whether the preset matching condition is met; A path search module, used to perform path search based on the weight of the free grid to obtain a target path for the target object to reach the end position from the current position; Among them, the weight determination module is used to obtain the current driving direction of the target object according to the current posture; if the quadrant of the current driving direction in the preset plane rectangular coordinate system is different from the quadrant of the idle grid in the preset plane rectangular coordinate system, it is determined that the idle grid and the current posture meet the preset matching conditions.

8. The device according to claim 7, It is characterized in that The weight determination module comprises: The initial weight acquisition submodule is used to obtain the initial weights of the free grids in the occupied grid map; The weight adjustment submodule is used to adjust the initial weight of the idle grid according to the current posture to obtain the adjusted weight of the idle grid.

9. The device according to claim 8, It is characterized in that The weight adjustment submodule includes: A matching unit, used to match the current posture with the idle grid respectively; The adjusting unit is used to increase the weight of the idle grid according to a preset rule if it is determined according to the matching result that the idle grid and the current posture do not meet the preset matching condition.

10. The device according to any one of claims 7 to 9, It is characterized in that The path search module includes: The weight and value determination submodule is used to calculate the weight and value of each candidate path according to the weight of the idle grid; The target path determination submodule is used to select the candidate path corresponding to the minimum weight and value among the weights and values, and determine it as the target path.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.