Method and apparatus for planning obstacle avoidance paths for a mobile device - Patents.com

JP7652357B2Active Publication Date: 2025-03-27HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023504056
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-07-20
Filing Date
2021-04-28
Publication Date
2025-03-27
Estimated Expiration
2041-04-28

Smart Images

  • Figure 0007652357000012
    Figure 0007652357000012
  • Figure 0007652357000013
    Figure 0007652357000013
  • Figure 0007652357000014
    Figure 0007652357000014
Patent Text Reader

Abstract

The present application provides a method and apparatus for planning an obstacle-avoidance path for a mobile device. The mobile device may be a self-driving vehicle, a robot, or another autonomous mobile device. The planning method includes: acquiring a distance map; determining a first lateral background cost potential field of a near-field range based on the distance map, the first lateral background cost potential field being a first repulsive field formed by obstacles located laterally of the mobile device, the first lateral background cost potential field including a target minimum point, background costs on two lateral sides of the target minimum point being characterized by monotonicity, and the background costs represent near-field lateral collision costs incurred by obstacles located laterally in the near-field range for the mobile device; and determining a current obstacle-avoidance path based on the first lateral background cost potential field. The obstacle-avoidance path planning method in the present application enables the mobile device to safely and stably avoid obstacles in complex and narrow traffic scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 2010699919.X, entitled “METHOD AND APPARATUS FOR PLANNING OBSTACLE AVOIDANCE PATH OF TRAVELING APPARATUS,” filed with the China National Intellectual Property Office on July 20, 2020, the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of automated driving technology, and more particularly to a method and apparatus for planning an obstacle-avoiding path for a traveling apparatus. [Background technology]

[0003] In the autonomous driving technology, navigation information is obtained using a map and positioning module, the surrounding environment is sensed using a sensing device, and the navigation of the autonomous vehicle is realized in combination with a decision-making, planning, and control module. In recent years, with the rapid development of computer vision, artificial intelligence, and sensing devices, autonomous driving technology has developed rapidly and has been widely used in both military and civilian fields. In the autonomous driving device, the path planning module is responsible for outputting an accurate and effective travel path based on the upper-layer navigation information, decision instructions, and environmental perception results to guide the correct driving of the autonomous driving device. In addition, the path planning module can further perform obstacle avoidance path planning based on obstacle information to enable the autonomous driving device to travel safely in a dynamic environment. This is also the focus of the work of path planning.

[0004] Existing methods for planning obstacle-avoidance paths mainly include methods based on sampling, optimization, search, potential fields, feature points, etc., respectively. These obstacle-avoidance path planning methods usually have relatively good planning effects in simple scenarios, but encounter path shaking in real dynamic traffic scenarios, especially complex and narrow scenarios, and therefore cannot ensure the safe and stable movement of vehicles.

[0005] Therefore, for complex and narrow traffic scenarios, how to output a safe and stable obstacle-avoidance path by using the same planning method is a problem that urgently needs to be solved at present. Summary of the Invention

[0006] The present application provides a method and apparatus for planning an obstacle avoidance path for a mobile device, which enables the mobile device to safely and stably avoid obstacles in complex and narrow traffic scenarios.

[0007] According to a first aspect, a method for planning an obstacle avoidance path for a mobile device is provided, comprising: acquiring a distance map, the distance map including a plurality of first grids, each of the plurality of first grids being used to record a distance from the first grid to a nearest first grid occupied by an obstacle; determining a first horizontal background cost potential field of a near-field range based on the distance map, the near-field range being a range that is a longitudinal distance from the mobile device less than or equal to a first threshold, the first horizontal background cost potential field being a first repulsion field formed by obstacles at a lateral position of the mobile device. determining a current obstacle avoidance path based on the first lateral background cost potential field, the first lateral background cost potential field including a target minimum point, the background costs on two lateral sides of the target minimum point being characterized by monotonicity, the background costs representing near-field lateral collision costs caused by obstacles located at lateral positions in the near-field range relative to the mobile device; and determining a current obstacle avoidance path based on the first lateral background cost potential field.

[0008] Optionally, the mobile device may be a self-driving vehicle, a robot, or another autonomous mobile device.

[0009] It should be understood that the repulsive field is formed by an obstacle at the lateral position of the mobile device, and can indicate a tendency of collision by the obstacle with the mobile device, and can guide the mobile device to avoid the obstacle, and may also be called a collision field or a risk field. The first lateral background cost potential field includes a target minimum point. The background costs of the two lateral sides of the target minimum point are characterized by monotonicity. Specifically, this means that the two lateral background costs of the target minimum point of the first repulsive field are characterized by monotonicity.

[0010] It should be appreciated that the background costs on the two sides of the target minimum point are characterized by monotonicity: specifically, the potential field on the left side of the target minimum point is monotonically decreasing, and the potential field on the right side of the target minimum point is monotonically increasing.

[0011] It should be understood that the background costs of the two lateral sides of the target minimum point are characterized by monotonicity, which means that the background costs of the two lateral sides of the target minimum point are each greater than the background cost at the target minimum point.

[0012] Optionally, the first lateral background cost potential field may be V-shaped.

[0013] Optionally, determining a current obstacle avoidance path based on the first lateral background cost potential field may be determining the current obstacle avoidance path based on a lateral position of a target minimum point of the first lateral background cost potential field.

[0014] In this embodiment of the present application, a distance map is first obtained, and then a first lateral background cost potential field of the near-field range is constructed based on the distance map, the first lateral background cost potential field includes a target minimum point, and the background costs on the two lateral sides of the target minimum point are characterized by monotonicity; then, a current obstacle avoidance path is determined based on the first lateral background cost potential field. In this way, while planning an obstacle avoidance path, information about close-range obstacles is fully taken into account to prevent distant obstacles from affecting the planned path. In addition, the first lateral background cost potential field of the near-field range is constructed to effectively reflect the tendency of lateral collision between the mobile device and the obstacle. The obstacle avoidance path planned based on this enables the mobile device to keep an optimal lateral distance from the obstacle in a complex and narrow environment, thereby improving the stability of the obstacle avoidance path.

[0015] With respect to the first aspect, in some implementations of the first aspect, determining a first lateral background cost potential field within the near-field range based on the distance map includes: determining a second lateral background cost potential field within the near-field range based on the distance map, where the second lateral background cost potential field is a second repulsive field formed by an obstacle at a lateral position of the mobile device, where the second lateral background cost potential field includes at least one minimum point; determining a target minimum point from the at least one minimum point; and performing monotonicity processing on the background costs of the two lateral sides of the target minimum point to generate the first lateral background cost potential field, where the slope of the monotonicity processing is greater than or equal to a second threshold.

[0016] It should be understood that the second repulsive field may indicate a tendency of collision with the mobile device by the obstacle before the monotonicity process is performed, in other words, the first repulsive field is obtained after the monotonicity process is performed on the second repulsive field.

[0017] In this embodiment of the present application, a second lateral background cost potential field of the near-field range is first constructed based on the distance map, then one target minimum point is determined from at least one minimum point of the second lateral background cost potential field, and a monotonicity process is performed on the background costs of the two lateral sides of the target minimum point to generate a first lateral background cost potential field, and the slope of the monotonicity process is equal to or greater than a second threshold. In this way, the background cost potential field of the lateral position of the target minimum point is obviously lower than the background cost potential field of other lateral positions. When an obstacle on the side of the mobile device approaches slightly in the lateral direction, the background cost potential field of the lateral position of the mobile device increases significantly, so that the mobile device moves to the lateral position with the lowest background cost potential field to avoid the obstacle slowly and stably and ensure that a safe distance is kept from the obstacle.

[0018] Regarding the first aspect, in some implementations of the first aspect, there are no obstacles between the target minimum point and the mobile device.

[0019] In other words, in the near field range, there are no obstacles between the lateral position of the target minimum point and the lateral position of the mobile device.

[0020] Optionally, the target minimum point may be the lowest minimum point among the minimum points that is free of obstacles in the near-field range between it and the mobile device.

[0021] In this embodiment of the present application, since there are no obstacles between the target minimum point and the mobile device, the ego vehicle can stably move to the lateral position of the target minimum point, so as to avoid failure of the ego vehicle to move to the lateral position of the target minimum point caused by obstacles between the mobile device and the lateral position of the target minimum point, thereby improving the stability of the path.

[0022] With regard to the first aspect, in some implementations of the first aspect, before obtaining the distance map, the method further includes: obtaining an occupancy map, the occupancy map including a plurality of second grids, each of the plurality of second grids being used to record a probability that an obstacle is present in the second grid; and obtaining the distance map includes: obtaining the distance map based on the occupancy map.

[0023] Optionally, the second grid may be deemed to have an obstacle if the probability of there being an obstacle in the second grid is equal to or greater than a certain threshold; alternatively, the second grid may be deemed to have no obstacle if the probability of there being an obstacle in the second grid is less than a certain threshold.

[0024] Optionally, each of the plurality of second grids may further be directly used to record whether there is an obstacle in the second grid.

[0025] With regard to the first aspect, in some implementations of the first aspect, obtaining a distance map based on the occupancy map includes: filtering a second grid located in a first zone in the occupancy map, the first zone being located in front of the mobile device, and if there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone; and obtaining a distance map based on the occupancy map obtained after the filtering is performed.

[0026] It should be understood that "if there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone" can be described as: if there is an obstacle in the first zone, no matter which obstacle avoidance path is selected by the mobile device, the mobile device cannot avoid the obstacle in the first zone.

[0027] In a certain zone range in front of the vehicle, no matter which obstacle avoidance path is selected by the mobile device, the mobile device cannot avoid the obstacles in the zone. In addition, the planning of the obstacle avoidance path is performed based on the occupancy map information provided by the upstream module, and the obstacle information provided from the upstream module not only includes the actual pose of the obstacle, which is dynamic or static, and the predicted trajectory projection of the obstacle, but also may include the obstacle occupancy situation that may be caused by the false detection at the head part of the ego vehicle, or the situation where the unevenness of the ground makes the occupancy map have the obstacle information of this zone. Therefore, in this case, if the obstacle of this zone is still considered, the path planning will be affected. Therefore, the obstacle of this zone needs to be avoided all the time in the moving process, which will cause sharp oscillation of the path. Therefore, in this embodiment of the present application, before the distance map is obtained, the grid located in this zone in the occupancy map may be filtered out first. This can effectively prevent the mobile device from performing unreasonable avoidance due to the false detection of the obstacle. This ensures that the remaining occupancy grid contains only the necessary information required by the obstacle avoidance algorithm, thereby ensuring the stability of the obstacle avoidance path.

[0028] With respect to the first aspect, in some implementations of the first aspect, before determining a second lateral background cost potential field within the near field range based on the distance map, the method further includes generating a feature vector, where the feature vector includes a start point and a sampling goal point of a path; and generating a plurality of candidate paths based on the reference path, the historical path, and the feature vector; determining the second lateral background cost potential field within the near field range based on the distance map includes: shifting the reference path laterally based on the sampling goal point to generate a plurality of virtual parallel paths; calculating a distance from each road point to a nearest obstacle for each of the plurality of virtual parallel paths in the near field range based on the distance map; calculating a background cost for each virtual parallel path based on the minimum value of the distance on the virtual parallel paths; and generating a second lateral background cost potential field within the near field range based on the background costs of the plurality of virtual parallel paths in the near field range;

[0029] Referring to the first aspect, in some implementations of the first aspect, before determining a current obstacle avoidance path based on the first horizontal background cost potential field, the method further includes: determining a collision cost, a constraint cost, a switching cost, a horizontal shift (horizontal shift) for each of the multiple candidate paths based on the distance map. determining a current obstacle-avoidance path based on the first lateral background cost potential field includes: calculating a final cost for each candidate path based on a background cost of the first lateral background cost potential field, or based on the background cost of the first lateral background cost potential field and one or more of the collision cost, constraint cost, switching cost, lateral shift cost, or smoothness cost; where the collision cost is used to evaluate whether the mobile device will encounter a collision when traveling along the candidate path, the constraint cost is used to evaluate whether each road point on the candidate path is within an obstacle-avoidable range, the switching cost is used to evaluate a deviation between the candidate path and the historical path, the lateral shift cost is used to evaluate a degree of lateral shift of the candidate path from a road centerline, and the smoothness cost is used to evaluate the smoothness of the candidate path; and determining a current obstacle-avoidance path based on the first lateral background cost potential field includes: calculating a final cost for each candidate path based on a background cost of the first lateral background cost potential field, or based on the background cost of the first lateral background cost potential field and one or more of the collision cost, constraint cost, switching cost, lateral shift cost, or smoothness cost; and determining the current obstacle-avoidance path based on the final costs.

[0030] In this embodiment of the present application, when determining a current obstacle avoidance path, in addition to the background cost, one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost may be further considered, so that the determined obstacle avoidance path can cover more elements, thereby further improving the stability and safety of the obstacle avoidance path.

[0031] Regarding the first aspect, in some implementations of the first aspect, the method further includes: determining a final obstacle-avoidance path based on an arbitration result between the historical path and the current obstacle-avoidance path.

[0032] In this embodiment of the present application, once the current obstacle-avoidance path is determined, the final obstacle-avoidance path is determined based on the difference between the current obstacle-avoidance path and the history path, which avoids the case where the obstacle-avoidance path obtained based only on the cost function or pure logic generates interframe hopping during operation in a complex and narrow environment, effectively mitigating the dependency of the planning method on the cost function, thereby ensuring the stability of the path.

[0033] Referring to the first aspect, in some implementations of the first aspect, determining a final obstacle-avoidance path based on an arbitration result between the historical path and the current obstacle-avoidance path includes: using the current obstacle-avoidance path as the final obstacle-avoidance path when a collision occurs on the historical path but not on the current obstacle-avoidance path; or using a path with a larger collision distance in the current obstacle-avoidance path and the historical path as the final obstacle-avoidance path when a collision occurs on both the historical path and the current obstacle-avoidance path and an absolute value of a difference between a collision distance of the current obstacle-avoidance path and a collision distance of the historical path is equal to or greater than a third threshold .... using the historical route as the final obstacle-avoidance route when an absolute value of a difference between a collision distance of the current obstacle-avoidance route and a collision distance of the historical route is less than a third threshold; or using the current obstacle-avoidance route as the final obstacle-avoidance route when no collision occurs on the historical route and a ratio of a final cost of the current obstacle-avoidance route to a cost of the historical route is less than or equal to a fourth threshold; or using the historical route as the final obstacle-avoidance route when no collision occurs on the historical route and a ratio of a final cost of the current obstacle-avoidance route to a cost of the historical route exceeds a fourth threshold, wherein the collision distance is the shortest longitudinal distance among the longitudinal distances of all road points in a collision state on each candidate route.

[0034] In this embodiment of the present application, if the current obstacle avoidance path is obviously better than the history path, the current obstacle avoidance path is switched; or if the current obstacle avoidance path is not obviously better than the history path, the history path is still used. This avoids the case where the obstacle avoidance path obtained based only on the cost function or pure logic generates inter-frame hopping during operation in a complex and narrow environment, thereby ensuring the stability of the path.

[0035] Referring to the first aspect, in some implementations of the first aspect, the method further includes: performing time-domain smoothing based on the historical path and the final obstacle avoidance path.

[0036] In this embodiment of the present application, when the final obstacle avoidance path is obtained, time domain smoothing can be further performed based on the history path and the final obstacle avoidance path. In this case, if the final obstacle avoidance path is still the history path, the obstacle avoidance path obtained after time domain smoothing is still the history path; or, if the final obstacle avoidance path is the current obstacle avoidance path, time domain smoothing is performed based on the current obstacle avoidance path and the history path. This effectively avoids the case where inter-frame hopping occurs during obstacle avoidance path switching in a complex and narrow environment, and ensures the stability of the path.

[0037] Referring to the first aspect, in some implementations of the first aspect, the method further includes: outputting the final obstacle-avoidance path to a speed planner, the speed planner being configured to perform speed planning based on the final obstacle-avoidance path and obstacle information on the final obstacle-avoidance path.

[0038] In this embodiment of the present application, after the final obstacle-avoidance path is output, the speed planner executes a speed plan based on the obstacle information on the final obstacle-avoidance path, and executes a deceleration plan if an obstacle that may cause a collision is found on the path, thereby improving the safety of the path.

[0039] In a second aspect, an apparatus for planning an obstacle avoidance path for a mobile device is provided. The apparatus includes an acquisition module and a processing module. The acquisition module is configured to acquire a distance map, the distance map includes a plurality of first grids, each of the plurality of first grids is used to record a distance from the first grid to a nearest first grid occupied by an obstacle; the processing module is configured to: determine a first lateral background cost potential field of a near-field range based on the distance map, the near-field range being a range of a longitudinal distance from the mobile device equal to or less than a first threshold, the first lateral background cost potential field being a first repulsive field formed by an obstacle at a lateral position on the mobile device, the first lateral background cost potential field including a target minimum point, the background costs of the two lateral sides of the target minimum point being characterized by monotonicity, the background cost representing a near-field lateral collision cost caused by an obstacle at a lateral position of the near-field range to the mobile device; and determine a current obstacle avoidance path based on the first lateral background cost potential field.

[0040] With regard to the second aspect, in some implementations of the second aspect, determining a first lateral background cost potential field of the near field range based on the distance map includes: determining a second lateral background cost potential field of the near field range based on the distance map, where the second lateral background cost potential field is a second repulsive field formed by an obstacle at a lateral position on the mobile device, where the second lateral background cost potential field includes at least one minimum point; determining a target minimum point from the at least one minimum point; and performing a monotonicity process on the background costs of the two lateral sides of the target minimum point to generate the first lateral background cost potential field, where a slope of the monotonicity process is greater than or equal to a second threshold.

[0041] Regarding the second aspect, in some implementations of the second aspect, there are no obstacles between the target minimum point and the mobile device.

[0042] With regard to the second aspect, in some implementations of the second aspect, before acquiring the distance map, the acquisition module is further configured to: acquire an occupancy map, the occupancy map including a plurality of second grids, each of the plurality of second grids being used to record a probability that there is an obstacle in the second grid; and the processing module is further configured to: acquire the distance map based on the occupancy map.

[0043] With reference to the second aspect, in some implementations of the second aspect, obtaining a distance map based on the occupancy map includes: filtering out a second grid located in a first zone in the occupancy map, where the first zone is located in front of the mobile device and if there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone; and obtaining a distance map based on the occupancy map obtained after performing the filtering out.

[0044] Referring to the second aspect, in some implementations of the second aspect, before determining the second lateral background cost potential field within the near field range based on the distance map, the processing module is further configured to: generate a feature vector, the feature vector including a start point and a sampling goal point of a path; generate a plurality of candidate paths based on the reference path, the historical path, and the feature vector; determining the second lateral background cost potential field within the near field range based on the distance map includes: shifting the reference path laterally based on the sampling goal point to generate a plurality of virtual parallel paths; calculating a distance from each road point to a nearest obstacle for each of the plurality of virtual parallel paths in the near field range based on the distance map; calculating a background cost for each virtual parallel path based on a minimum value of the distance on the virtual parallel path; and generating a second lateral background cost potential field within the near field range based on the background costs of the plurality of virtual parallel paths in the near field range;

[0045] With reference to the second aspect, in some implementations of the second aspect, before determining a current obstacle avoidance path based on the first lateral background cost potential field, the processing module is further configured to: calculate, based on the distance map, one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost for each of a plurality of candidate paths, wherein the collision cost is used to evaluate whether the mobile device will collide when moving along the candidate path, the constraint cost is used to evaluate whether each road point on the candidate path is within an obstacle avoidance possible range, and the switching cost is used to evaluate the deviation between the candidate path and the historical path. the lateral shift cost is used to evaluate the degree of lateral shift of the candidate path from the road centerline, and the smoothness cost is used to evaluate the smoothness of the candidate path; determining a current obstacle avoidance path based on the first lateral background cost potential field includes: calculating a final cost for each candidate path based on a background cost of the first lateral background cost potential field, or based on the background cost of the first lateral background cost potential field and one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost; and determining a current obstacle avoidance path based on the final cost;

[0046] Referring to the second aspect, in some implementations of the second aspect, the processing module is further configured to: determine a final obstacle avoidance path based on an arbitration result between the historical path and the current obstacle avoidance path.

[0047] Referring to the second aspect, in some implementations of the second aspect, determining a final obstacle-avoidance path based on an arbitration result between the historical path and the current obstacle-avoidance path includes: when a collision occurs on the historical path but not on the current obstacle-avoidance path, using the current obstacle-avoidance path as the final obstacle-avoidance path; or when a collision occurs on both the historical path and the current obstacle-avoidance path and an absolute value of a difference between a collision distance of the current obstacle-avoidance path and a collision distance of the historical path is equal to or greater than a third threshold, using a path with a larger collision distance in the current obstacle-avoidance path and the historical path as the final obstacle-avoidance path; or when a collision occurs on both the historical path and the current obstacle-avoidance path, using the historical route as the final obstacle-avoidance route if an absolute value of a difference between a collision distance of the current obstacle-avoidance route and a collision distance of the historical route is less than a third threshold; or using the current obstacle-avoidance route as the final obstacle-avoidance route if no collision occurs on the historical route and a ratio of a final cost of the current obstacle-avoidance route to a cost of the historical route is less than or equal to a fourth threshold; or using the historical route as the final obstacle-avoidance route if no collision occurs on the historical route and a ratio of a final cost of the current obstacle-avoidance route to a cost of the historical route exceeds a fourth threshold, wherein the collision distance is the shortest longitudinal distance among the longitudinal distances of all road points in a collision state on each candidate route.

[0048] With reference to the second aspect, in some implementations of the second aspect, the processing module is further configured to perform time domain smoothing based on the historical path and the final obstacle avoidance path.

[0049] With regard to the second aspect, in some implementations of the second aspect, the apparatus may further include an output module configured to output the final obstacle-avoidance path to a speed planner, the speed planner configured to perform speed planning based on the final obstacle-avoidance path and obstacle information on the final obstacle-avoidance path.

[0050] According to a third aspect, there is provided a planning apparatus including an input / output interface, a processor, and a memory. The processor is configured to control the input / output interface to send and receive signals or information. The memory is configured to store a computer program. The processor: invokes the computer program from the memory and executes the computer program so as to enable the planning apparatus to perform the method of the first aspect.

[0051] According to a fourth aspect, there is provided a vehicle including various modules configured to carry out the method of the first aspect.

[0052] According to a fifth aspect, there is provided a computer readable medium storing program code which, when executed on a computer, enables the computer to perform the method of the first aspect.

[0053] According to a sixth aspect, there is provided a chip, the chip including a processor and a data interface, the processor reading instructions stored in a memory through the data interface to perform the method of the first aspect.

[0054] Optionally, in the implementation, the chip may further include a memory, the memory storing instructions, and the processor configured to execute the instructions stored in the memory, the instructions, when executed, configured to execute the method of the first aspect.

[0055] The chip may specifically be a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC).

[0056] In the present application, it should be understood that the method of the first aspect may specifically be any one of the methods of the first aspect or implementation of the first aspect. [Brief description of the drawings]

[0057] [Figure 1] FIG. 2 is an example diagram of a Freinet coordinate system according to an embodiment of the present application.

[0058] [Diagram 2] FIG. 2 is an example diagram of a complex narrow urban road scenario according to an embodiment of the present application;

[0059] [Diagram 3] FIG. 1 is an example diagram of a system architecture for planning obstacle avoidance paths according to an embodiment of the present application.

[0060] [Figure 4] 1 is an example diagram of a method for planning an obstacle-avoidance path for a mobile device according to an embodiment of the present application.

[0061] [Diagram 5] FIG. 2 is an example diagram of the core processes of a method for planning an obstacle avoidance path according to an embodiment of the present application.

[0062] [Figure 6] FIG. 2 is an example diagram of a candidate route generation scenario according to an embodiment of the present application.

[0063] [Figure 7] FIG. 2 is an illustration of another candidate route generation scenario according to an embodiment of the present application.

[0064] [Figure 8] FIG. 2 is an example diagram of a invalid occupancy grid according to an embodiment of the present application.

[0065] [Figure 9] FIG. 13 is an example diagram of a full collision triangle zone according to an embodiment of the present application.

[0066] [Figure 10] FIG. 2 is an example diagram of an occupancy map to distance map conversion according to an embodiment of the present application.

[0067] [Figure 11] FIG. 13 is an example diagram of a method for generating a V-shaped near-field lateral background cost potential field according to an embodiment of the present application.

[0068] [Figure 12] FIG. 1 is an example diagram of generating a virtual background line according to an embodiment of the present application.

[0069] [Figure 13] FIG. 1 is an example diagram of the monotonicity processing principle of the near-field lateral background cost potential field according to an embodiment of the present application.

[0070] [Figure 14] FIG. 2 is an example diagram of a multi-circle collision model of a car body according to an embodiment of the present application.

[0071] [Figure 15] FIG. 2 is a diagram of the principle for calculating accurate obstacle distance according to an embodiment of the present application.

[0072] [Figure 16] FIG. 2 is an example diagram of horizontal division according to an embodiment of the present application.

[0073] [Figure 17] FIG. 13 is an example diagram of an arbitration method for outputting an obstacle avoidance path according to an embodiment of the present application.

[0074] [Figure 18] FIG. 13 is an example diagram of a scenario in which the historical route is used even upon full collision of the candidate route according to an embodiment of the present application.

[0075] [Figure 19] FIG. 13 is an example diagram of a scenario in which a candidate path switches to a current optimal path upon total collision according to an embodiment of the present application.

[0076] [Figure 20] FIG. 2 is an example diagram of time domain smoothing according to an embodiment of the present application.

[0077] [Figure 21] FIG. 13 is an example diagram of obstacle avoidance path generation results in a complex and narrow scenario according to an embodiment of the present application.

[0078] [Figure 22] FIG. 2 is an illustration of a simple urban road scenario according to an embodiment of the present application.

[0079] [Diagram 23] FIG. 2 is an illustration of another candidate road generation scenario according to an embodiment of the present application.

[0080] [Figure 24] FIG. 13 is an example diagram of obstacle avoidance path generation results in a simple urban road scenario according to an embodiment of the present application.

[0081] [Diagram 25] 1 is an example diagram of an apparatus for planning an obstacle-avoidance path for a mobile device according to an embodiment of the present application.

[0082] [Figure 26] FIG. 2 is an exemplary block diagram of a hardware structure of an apparatus for planning obstacle-avoidance paths according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0083] For ease of understanding, some technical terms in the embodiments of this application are first explained.

[0084] Route planning: In the autonomous movement process, the automatic driving device outputs an accurate and effective driving route based on the navigation information, decision instructions, and environment perception results of the upper layer, and the moving route is used as the main input of the lower layer controller to guide the correct movement of the vehicle, thereby completing multiple operations such as lane keeping, lane changing, and obstacle avoidance. The process of generating a route is called route planning. It should be understood that in the embodiment of the present application, for ease of explanation, an ego vehicle is used to represent the automatic driving device.

[0085] Occupancy Map: Contains a grid, also called an occupancy grid map. The occupancy map contains obstacle information for a given zone near the ego vehicle. The grid values ​​can represent occupied, unoccupied, unknown, and other states.

[0086] Reference path: A basis of reference used by the ego vehicle for path planning, such as the centerline of the current road. This path primarily reflects real-world map information and can guide the ego vehicle's direction of travel, but does not have obstacle avoidance capabilities.

[0087] Obstacle-avoidable range: The range of movement around the reference path. Used by the ego vehicle for obstacle avoidance and provides spatial constraints for obstacle-avoidance path planning.

[0088] Avoidance path: a path that can avoid obstacles and is obtained through path planning by the ego vehicle based on the obstacle information, the reference path and the obstacle avoidable range.

[0089] Freinet Coordinate System (SL System): Figure 1 is an exemplary diagram of a Freinet coordinate system according to one embodiment of the present application. As shown in Figure 1, the midpoint of the rear axle of the ego vehicle is used as the origin of the SL system. The direction along the reference path is called the longitudinal direction (S direction). The direction perpendicular to the path is called the lateral direction (L direction). The reference path is the centerline of the road.

[0090] For the sake of clarity, the background of the embodiments of the present application will be explained in more detail.

[0091] In autonomous driving technology, navigation information is obtained by using map and positioning modules, the surrounding environment is sensed by using sensing devices, and the navigation of autonomous vehicles is realized in combination with decision-making, planning and control modules. In recent years, with the rapid development of computer vision, artificial intelligence and sensing devices, autonomous driving technology has developed rapidly and has been widely used in military and civilian fields.

[0092] In the autonomous vehicle module, the planning module is responsible for outputting an accurate and effective travel path based on navigation information, decision instructions, and environmental perception results to perform actions such as lane keeping, lane changing, and obstacle avoidance. Usually, there is a reference path in the path planning module. The reference path can be generated based on the center line of the current road or obtained by a manual acquisition method, which mainly provides a reference for the path planning of the autonomous vehicle. Based on the reference path in combination with obstacle information, the obstacle avoidance path planning of the vehicle needs to be further implemented to realize the safe running of the vehicle in a dynamic environment. This is also the focus of the work of path planning.

[0093] At present, common methods for planning obstacle avoidance paths include methods based on sampling, optimization, search, potential field, feature point, etc., respectively. The main features of the methods are as follows: Sampling-based obstacle avoidance methods are computationally efficient and convenient for engineering transformation, but usually cannot achieve the optimal solution and may cause jitter in complex scenarios. Optimization-based methods can fully consider the input information to obtain a theoretical approximate optimal solution, but consume computational resources and are easily affected by the environment. For example, changes in obstacles away from the ego vehicle directly affect the path near the ego vehicle, so the ego vehicle will encounter jitter and vibration when moving through a dynamic environment. Search-based methods can deal with complex scenarios, but consume a large amount of computational resources and easily generate planned paths that are not smooth. This method is usually only suitable for low-speed scenarios and does not fully support dynamic scenarios. Potential field-based methods can comprehensively consider obstacle information in the environment, but encounter local bending and vibration. Although feature-point based methods generate stable and effective obstacle-avoidance paths in simple low-speed scenarios, they encounter obvious oscillations in complex dynamic scenarios.

[0094] In conclusion, existing methods for planning obstacle avoidance paths usually have a relatively good planning effect in simple scenarios, but they cannot guarantee the safe and stable movement of vehicles due to the path oscillations encountered in real dynamic traffic scenarios, especially in complex and narrow scenarios.

[0095] In response to the problems in the prior art, in the embodiment of the present application, a first lateral background cost potential field in the near-field range is constructed, and the background costs of the two lateral sides of the target minimum value point in the first lateral background cost potential field are characterized by monotonicity, which effectively reflects the tendency of lateral collision between the ego vehicle and the obstacle. The obstacle avoidance path planned based on this can enable the mobile device to keep an optimal lateral distance from the obstacle in a complex and narrow environment, and can prevent the planned obstacle avoidance path from being affected by relatively distant environmental changes, thereby improving the stability of the obstacle avoidance path.

[0096] In order to better understand the solutions in the embodiments of the present application, before describing the methods, scenarios and system architectures to which the embodiments of the present application can be applied will first be briefly described with reference to the accompanying drawings.

[0097] FIG. 2 is an example diagram of a complex and narrow city road scenario according to an embodiment of the present application. As shown in FIG. 2, when the ego vehicle moves on the road, a large amount of dynamic obstacles (numbers 1-5) and / or stationary obstacles (number 6) will occur within the obstacle avoidable range. This constitutes a narrow and congested traffic scenario. The stationary obstacles may be vehicles parked on both sides of the road or other obstacles installed on both sides of the road, or other obstacles temporarily installed on the road. The dynamic obstacles may be other vehicles moving within the obstacle avoidable range of the ego vehicle. When affected by the above obstacles, the movement space of the ego vehicle becomes narrow and the movement path becomes complicated. It should be understood that in this scenario, the occupancy map including the reference path, the lateral obstacle avoidable range of all obstacles, size, position, speed, and predicted trajectory projection are all known.

[0098] 3 is an example diagram of a system architecture for planning an obstacle-avoidance path according to one embodiment of the present application. The system architecture 300 includes a reference path planner 310, an obstacle decision maker 320, an obstacle-avoidance path planner 330, and a speed planner 340.

[0099] Reference path planner 310 is configured to provide a reference path and a lateral obstacle avoidance possible range for obstacle avoidance path planner 330. In this embodiment of the present application, the reference path is the centerline of the road. It should be understood that the reference path may also be presented in another format. This is not limited here. The lateral obstacle avoidance possible range is a range in which obstacle avoidance can be performed in a direction perpendicular to the path during the movement process of the ego vehicle. For example, the lateral obstacle avoidance possible range may be the width of the road on which the ego vehicle is currently moving.

[0100] The obstacle determiner 320 is configured to provide an occupancy map including the obstacles and the predicted trajectory projections of the obstacles to the obstacle avoidance path planner 330. It should be understood that the manner in which the obstacle determiner 320 obtains the occupancy map including the obstacles and the predicted trajectory projections of the obstacles is not limited in this application.

[0101] The obstacle-avoidance path planner 330 is configured to plan an obstacle-avoidance path based on the reference path and lateral obstacle-avoidable range provided by the reference path planner 310 and an occupancy map including obstacles and predicted trajectory projections of the obstacles provided by the obstacle determiner 320.

[0102] In this embodiment of the present application, the obstacle avoidance path planner 330 includes a candidate path generation module 331 and a candidate path evaluation module 332. The candidate path generation module 331 is configured to generate a cluster of candidate paths based on a reference path and a lateral obstacle avoidable range. The method of generating candidate paths will be described later and will not be detailed here. The candidate path evaluation module 332: evaluates the candidate paths based on the candidate paths themselves and the occupancy information of the obstacles, and selects the optimal path of the current frame as the current obstacle avoidance path.

[0103] In an implementation, the optimal path for the current frame selected by the candidate path evaluation module 332 may be used as the current output obstacle-avoidance path. In another implementation, the obstacle-avoidance path planner 330 may further include an output path arbitration module 433 configured to determine a final output obstacle-avoidance path based on the optimal path for the current frame and the historical paths (of previous frames).

[0104] Optionally, the obstacle avoidance path planner 330 may further include a path time-domain smoothing module 334 configured to perform time-domain smoothing on the final output obstacle avoidance path.

[0105] Obstacle avoidance path planner 330 outputs the planned obstacle avoidance path to back-end speed planner 340. If there is a possibility of a collision between the ego vehicle and an obstacle on the obstacle avoidance path, the speed planner plans a deceleration based on the location and speed of the colliding obstacle relative to the ego vehicle.

[0106] 4 is an example diagram of a method for planning an obstacle avoidance path for a mobile device according to an embodiment of the present application. It should be understood that the method 400 can be applied to the above-mentioned scenario 200 and the above-mentioned system architecture 300. As shown in FIG. 4, the method 400 includes steps S410 to S430. These steps are described in detail below.

[0107] S410: A distance map is obtained.

[0108] The distance map includes a plurality of first grids, each of the plurality of first grids being used to record a distance from the first grid to a nearest first grid occupied by an obstacle.

[0109] Optionally, before obtaining the distance map, method 400 further includes: obtaining an occupancy map, the occupancy map including a plurality of second grids, each of the plurality of second grids being used to record a probability that an obstacle is present in the second grid; and obtaining the distance map based on the occupancy map.

[0110] Optionally, the second grid may be deemed to have an obstacle if the probability of the second grid having an obstacle is equal to or greater than a certain threshold; alternatively, the second grid may be deemed to have no obstacle if the probability of the second grid having an obstacle is less than a certain threshold.

[0111] Optionally, each of the plurality of second grids may be further used to record whether an obstacle is present in the second grid, e.g., a value of 1 recorded in the second grid indicates the presence of an obstacle; or a value of 0 recorded in the second grid indicates the absence of an obstacle.

[0112] It should be understood that the occupancy map is provided by an upstream module, such as the obstacle determiner 320 described above. The occupancy map includes obstacle information in a given zone near the ego vehicle. It should be further understood that obstacle information is information about an obstacle or a predicted trajectory of an obstacle, and that a grid occupied by an obstacle is a grid occupied by the obstacle or by a predicted trajectory projection of the obstacle.

[0113] It should be understood that after the occupancy map is obtained, the occupancy map needs to be converted into a distance map. The conversion method will be described in detail in the following specific implementation, and will not be described in detail here.

[0114] In a certain zone range in front of the vehicle, no matter which obstacle avoidance path is selected by the mobile device, the mobile device cannot avoid the obstacles in the zone. In addition, the obstacle avoidance path planning is performed based on the occupancy map information provided by the upstream module, and the obstacle information provided by the upstream module not only includes the actual pose of the dynamic or stationary obstacle and the predicted trajectory projection of the obstacle, but also may include the obstacle occupancy situation caused by the false detection at the head part of the ego vehicle, or the situation where the unevenness of the ground makes the occupancy map have obstacle information in this zone. Therefore, in this case, if the obstacles in this zone are still taken into account, it will affect the path planning. Therefore, the moving process needs to constantly avoid the obstacles in this zone, which will cause the sudden vibration of the path.

[0115] Therefore, in this embodiment of the application, the second grid located in the first zone of the occupancy map may be filtered out.

[0116] The first zone is located in front of the mobile device. If there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone; then obtain a distance map based on the occupancy map obtained after the filtering out is performed. This effectively prevents the mobile device from performing unreasonable avoidance due to false detection of the obstacle. This ensures that the remaining occupancy grid contains only the information required by the obstacle avoidance algorithm, thereby ensuring the stability of the obstacle avoidance path. The method of filtering out the grid is described in detail in the following specific implementation, and will not be described in detail here.

[0117] S420: Determine a first lateral background cost potential field of the near-field range based on the distance map.

[0118] The near-field range is a range of longitudinal distances from the mobile device that are less than or equal to a first threshold, the first lateral background cost potential field is a first repulsive field formed by obstacles at a lateral position of the mobile device, the first lateral background cost potential field includes a target minimum point, the background costs of the two lateral sides of the target minimum point are characterized by monotonicity, and the background cost represents a near-field lateral collision cost posed to the mobile device by obstacles at a lateral position in the near-field range.

[0119] Optionally, the mobile device may be an autonomous vehicle, a robot, or another autonomous mobile device, which is not a limitation in this application. For ease of explanation, an ego vehicle is used in this application to represent the mobile device.

[0120] It should be understood that the near-field range may be a range extending 5 m vertically along the path direction from the origin of the Freinet coordinate system. In this embodiment of the present application, the origin may be the center of the rear axle of the ego vehicle. It should be understood that the length of the ego vehicle may typically be 3 m to 6 m, and therefore, an obstacle in a lateral position of the near-field range may be understood as an obstacle on each of the two lateral sides of the ego vehicle. The near-field range may be determined based on the length and moving speed of the ego vehicle as well as the complexity of the scenario. This is not limited in the present application.

[0121] It should be understood that the first lateral background cost potential field is a first repulsive field formed by an obstacle in the lateral position of the ego vehicle. The repulsive field is formed by an obstacle in the lateral position of the mobile device, and can indicate the tendency of the obstacle to collide with the mobile device, and can guide the mobile device to avoid the obstacle, and may also be called a collision field or risk field. It should be understood that the first repulsive field can indicate the tendency of the obstacle to collide with the mobile device after the monotonicity process is performed.

[0122] Specifically, the first lateral background cost potential field can indicate the tendency of collision between the ego vehicle and the obstacle in the lateral position. Typically, the higher the background cost, the smaller the distance between the ego vehicle and the obstacle, and the higher the probability of collision. The lower the background cost, the larger the distance between the ego vehicle and the obstacle, and the safe distance from the obstacle can be kept while moving in the lateral position corresponding to the background cost.

[0123] It should be understood that the background costs of the two lateral sides of the target minimum point are characterized by monotonicity. Specifically, the potential field on the left side of the target minimum point is monotonically decreasing, and the potential field on the right side of the target minimum point is monotonically increasing. This means that the background costs of the two sides of the target minimum point are respectively greater than the background cost of the target minimum point. In other words, the potential field of the lateral position of the target minimum point is the lowest, and the ego vehicle can stably move along the path with the lateral position.

[0124] Optionally, the first horizontal background cost potential field may be of a "V" shape, a " / " shape, or a "¥" shape. Furthermore, it should be understood that the slope of the monotonic function may be a fixed value or a value that varies continuously with horizontal position. This is not limited in this application. For ease of explanation, the following specific embodiment uses a V-shaped first horizontal background cost potential field.

[0125] S430: A current obstacle avoidance path is determined based on a first lateral background cost potential field.

[0126] Optionally, determining a current obstacle-avoidance path based on the first lateral background cost potential field may be determining a current obstacle-avoidance path based on a lateral position of a target minimum point in the first lateral background cost potential field. In other words, the current obstacle-avoidance path is determined based on the lateral position with the lowest potential field, so that the ego vehicle can stably move along the position with the lowest potential field.

[0127] In this embodiment of the present application, the first lateral background cost potential field of the near-field range is considered when planning the current obstacle avoidance path. In one aspect, only the obstacle information of the near-field range is considered when planning the obstacle avoidance path to avoid the following case: when using the existing obstacle avoidance path planning method, when the distant obstacle changes, the nearby path of the ego vehicle changes, making the movement unstable. In another aspect, the first lateral background cost potential field of the near-field range is constructed to effectively reflect the tendency of lateral collision between the ego vehicle and the obstacle. The obstacle avoidance path planned based on this enables the ego vehicle to keep an optimal lateral distance from the obstacle in a complex and narrow environment, thereby improving the stability of the obstacle avoidance path.

[0128] Optionally, a second lateral background cost potential field within the near-field range can be first determined based on the distance map. The second lateral background cost potential field is a second repulsive field formed by an obstacle in the lateral position of the mobile device, and the second lateral background cost potential field includes at least one minimum point. A target minimum point is determined from the at least one minimum point. A monotonicity process is performed on the background costs of the two lateral sides of the target minimum point to generate a first lateral background cost potential field, and the slope of the monotonicity process is equal to or greater than a second threshold. For example, the value of the slope can be any value equal to or greater than 10 / 1 m, and the specific value needs to be determined with reference to the actual situation. This is not limited here.

[0129] It should be understood that before the monotonicity process is performed, the second repulsive field can indicate a tendency of the obstacle to collide with the mobile device. In other words, the first repulsive field is obtained after the monotonicity process is performed on the second repulsive field.

[0130] In this embodiment of the present application, the method of constructing the first lateral background cost potential field can be as follows: a second lateral background cost potential field of the contact field range is first constructed based on the distance map, then one target minimum point is determined from at least one minimum point of the second lateral background cost potential field, and a monotonicity process is performed on the background costs of the two lateral sides of the target minimum point to generate a first lateral background cost potential field. In addition, the slope of the monotonicity process is set to be equal to or greater than a second threshold, so that the background cost potential field of the lateral position of the target minimum point is obviously lower than the background cost potential fields of other lateral positions, which can ensure that the ego vehicle stably moves along the path with the lowest potential field. In other words, when an obstacle on the side of the ego vehicle approaches slightly in the lateral direction, the background cost potential field of the lateral position of the ego vehicle will increase significantly, so that the ego vehicle will slowly and stably avoid the obstacle, move to the lateral position with the lowest background cost potential field, and keep a safe distance from the obstacle.

[0131] Optionally, there are no obstacles between the target minimum point and the mobile device.

[0132] In other words, in the near field range, there are no obstacles between the lateral position represented by the target minimum point and the lateral position of the mobile device.

[0133] Optionally, the target minimum point may be the lowest minimum point among all minimum points between the mobile device and the obstacle-free near-field range.

[0134] It should be understood that in a practical scenario, there may be no obstacles between the lateral positions of the multiple minimum points and the lateral position of the ego vehicle. In this case, the lowest minimum point among these minimum points may be used as the target minimum point; or one of these minimum points may be selected as the target minimum point based on the practical situation. For example, the background cost of the lowest minimum point is close to the background cost of the second smallest minimum point, and the lateral position of the second smallest minimum point is close to the ego vehicle. In this case, the second smallest minimum point may be used as the target minimum point. For ease of explanation, in the embodiment described below, the lowest minimum point among all minimum points between the lateral positions of the mobile device that have no obstacles within the near-field range is used as the target minimum point.

[0135] In this embodiment of the present application, since there is no obstacle between the target minimum point and the mobile device within the near-field range, the ego vehicle can stably move to the lateral position of the target minimum point, so as to avoid the failure of the ego vehicle to move to the lateral position of the target minimum point caused by the obstacle between the lateral position of the mobile device and the lateral position of the target minimum point, thereby improving the stability of the path. In addition, if the target minimum point can be the lowest minimum point among all the minimum points between the lateral position of the mobile device with no obstacle within the near-field range, an optimal safety distance can be kept from the obstacle in the operation process of the ego vehicle.

[0136] Optionally, before determining a second lateral background cost potential field within the near-field range based on the distance map, the method 400 may further include: generating a feature vector, where the feature vector includes a path start point and a sampling goal point; and generating a plurality of candidate paths based on the reference path, the historical path, and the feature vector.

[0137] It should be understood that during the path planning in this embodiment of the present application, multiple candidate paths are first generated based on the position of the ego vehicle, and then the optimal candidate path is selected as the current obstacle avoidance path by evaluating the multiple candidate paths. In the following embodiment, the method of generating the candidate paths will be described in detail, and will not be described in detail here.

[0138] Optionally, the reference path may be laterally shifted based on the sampling goal points to generate a plurality of virtual parallel paths; a distance from each road point of each of the plurality of virtual parallel paths within the near-field range to a nearest obstacle is calculated based on the distance map; a background cost of each virtual parallel path is calculated based on a minimum value of the distances on the virtual parallel paths; The second horizontal background cost potential field of the near-field range is generated according to the background cost of multiple virtual parallel paths of the near-field range. The method of constructing the first horizontal background cost potential field and the second horizontal background cost potential field is described in detail in the following specific implementation, and will not be described in detail here.

[0139] Optionally, in this embodiment of the present application, when a candidate path is evaluated, the evaluation is performed based not only on the background cost but also on one or more of the following costs: collision cost, constraint cost, switching cost, lateral shift cost, and smoothness cost, so that the determined obstacle avoidance path can cover more elements, thereby further improving the stability and safety of the obstacle avoidance path.

[0140] Therefore, in this embodiment of the present application, before a current obstacle avoidance path is determined based on the first lateral background cost potential field, one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, and a smoothness cost for each of the multiple candidate paths may be further calculated based on the distance map.

[0141] The collision cost is used to evaluate whether the mobile device will collide when traveling along the candidate path, the constraint cost is used to evaluate whether each road point on the candidate path is within an obstacle avoidance range, the switching cost is used to evaluate the deviation between the candidate path and the historical path, the lateral shift cost is used to evaluate the degree of lateral shift of the candidate path from the road centerline, and the smoothness cost is used to evaluate the smoothness of the candidate path.

[0142] When the candidate paths are evaluated, a final cost of each candidate path may be calculated based on the background cost of the first lateral background cost potential field, or based on the background cost of the first lateral background cost potential field and one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost; then a current obstacle avoidance path is determined based on the final cost.

[0143] It should be understood that in this embodiment of the present application, the final cost can be calculated based on a weighted sum of costs. It should be understood that the weights of the background cost and the collision cost can be set relatively large to enable the ego vehicle to keep a safe distance from the obstacle. It should be understood that the acquisition and specific evaluation methods of the above costs are detailed in the following specific implementation, and are not described in detail here.

[0144] Optionally, the method 400 further includes: determining a final obstacle-avoidance path based on a reconciliation result between the historical path and the current obstacle-avoidance path.

[0145] It should be understood that the historical path is the path that the ego vehicle travels in the previous frame, and the current obstacle-avoidance path is the path that is currently planned. The final obstacle-avoidance path is determined based on the arbitration result between the historical path and the current obstacle-avoidance path. In other words, one path is selected from the historical path and the current obstacle-avoidance path as the final output obstacle-avoidance path.

[0146] In this embodiment of the present application, when the current obstacle-avoidance path is determined, the final obstacle-avoidance path is determined based on the difference between the current obstacle-avoidance path and the history path, which avoids the case where the obstacle-avoidance path obtained based only on the cost function or pure logic generates inter-frame hopping during operation in a complex and narrow environment, effectively mitigating the dependency of the planning method on the cost function, thereby ensuring the stability of the path.

[0147] Optionally, if the current obstacle avoidance path is obviously better than the history path, the current obstacle avoidance path is switched; or, if the current obstacle avoidance path is not obviously better than the history path, the history path is continued to be used. This avoids the obstacle avoidance path obtained based only on the cost function or pure logic from generating inter-frame hopping during operation in a complex and narrow environment, thereby ensuring the stability of the path. The specific arbitration conditions will be detailed in the specific implementation below and will not be detailed here.

[0148] Optionally, the method 400 may further include: performing time domain smoothing based on the history path and the final obstacle avoidance path. In this embodiment of the present application, when the final obstacle avoidance path is obtained, time domain smoothing may be further performed based on the history path and the final obstacle avoidance path. In this case, if the final obstacle avoidance path is still a history path, the obstacle avoidance path obtained after the time domain smoothing is still a history path; or, if the final obstacle avoidance path is a current obstacle avoidance path, time domain smoothing is performed based on the current obstacle avoidance path and the history path. This effectively avoids the case where inter-frame hopping occurs during obstacle avoidance path switching in a complex and narrow environment, thereby ensuring the stability of the path.

[0149] Optionally, the method 400 may further include: outputting the final obstacle-avoidance path to a speed planner, and the speed planner is configured to execute a speed plan based on the final obstacle-avoidance path and the obstacle information on the final obstacle-avoidance path. In this embodiment of the present application, after the final obstacle-avoidance path is output, the speed planner executes a speed plan based on the obstacle information on the final obstacle-avoidance path, and executes a deceleration plan when an obstacle that may cause a collision is found on the path, thereby improving the safety of the path.

[0150] The method for planning an obstacle avoidance path according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0151] In a preferred manner, Figure 5 is an example diagram of a core process of a method for planning an obstacle avoidance path according to an embodiment of the present application. It should be understood that the planning method illustrated in Figure 5 can be applied to the complex narrow scenario illustrated in Figure 2. As shown in Figure 5, the core process 500 includes steps S510, S520, S530, and S540. These steps are described in detail below.

[0152] S510: Generate candidate routes.

[0153] The generation of the candidate route includes steps S511, S512, and S513. Figure 6 is an example diagram of a candidate route generation scenario according to an embodiment of the present application. These steps are described in detail below with reference to Figure 6.

[0154] S511: A feature vector is generated.

[0155] Specifically, a feature vector including a route start point (start point) and a sampling goal point (goal point, or sampling point for short) is generated based on the historical route and the reference route and obstacle avoidable range input by the reference route planner, as shown by the arrows in Figure 6 .

[0156] It should be understood that the start point may be found on the historical path. In this embodiment of the present application, the path where the center of the rear axle of the ego vehicle passes through the previous frame is used as the historical path. Therefore, the road point closest to the center point of the rear axle of the ego vehicle may be found on the historical path. In this case, the actual position and orientation of the point may constitute the start point feature vector. It should be understood that each path includes a large number of road points, and the distance between the road points may be determined based on the actual situation. For example, one road point may be set every 0.1 m, or one road point may be set every 0.1*v ego vehicle can be set every v ego vehicle is the ego vehicle's travel speed.

[0157] The goal point is within the obstacle avoidable range in front of the vehicle body and is obtained through sampling using the reference path as a reference. It should be further understood that one candidate path may include multiple goal points, but only one start point. Both the start point and the goal point are represented in vector form.

[0158] S512: Obtain candidate paths by splicing.

[0159] Specifically, as shown in Figure 6, a multi-segment candidate path is generated by connecting the reference path, the history path, and the feature vector. The first segment is obtained by intercepting the history path behind the start point. The second segment is obtained by connecting the start point and the goal point using a smooth curve, so that the curve satisfies the vector constraint to generate a path. The third segment is obtained by moving the reference path behind the goal point corresponding to the second segment. The three segments of the path are connected in order, and the whole candidate path is obtained in a splicing manner.

[0160] S513: Perform spatial domain smoothing on the path.

[0161] Spatial smoothing is performed on each candidate path to allow the segments of the path to be smoothly connected. Optionally, smooth control points may be generated at every other one of the road points in the geodesic Cartesian coordinate system, and a smooth candidate path is generated based on the control point set and a cubic B-spline. Optionally, one smooth control point may be generated based on three road points, or four, five, six road points, etc. This is not limited in this application.

[0162] For example, in the scenario of FIG. 2, multiple candidate paths can be generated in the manner shown in FIG. 7. Specifically, the reference path is the centerline of the current lane, the lane width, i.e., the obstacle avoidable range, is 3.5 m, and the widths on both the left and right sides of the lane centerline are 1.75 m. In this case, the road point closest to the center point of the rear axle of the ego vehicle can be found in the historical path, and the actual position and orientation of the point constitute the start point feature vector. Then, three columns of goal points are generated, and the s coordinates of the columns of goal points are 1.2*max(vehicle speed, 4.17 m / s), 2.0*max(vehicle speed, 4.17 m / s), and 3.5*max(vehicle speed, 4.17 m / s), respectively. There are a total of 11 goal points in each column, and the goal points with the same orientation as the reference path are equally spaced in the obstacle avoidable range of the corresponding longitudinal position. max(vehicle speed, 4.17m / s) refers to using the greater value of the current vehicle speed and 4.17m / s; 1.2*max(vehicle speed, 4.17m / s) refers to multiplying the greater value of the current vehicle speed and 4.17m / s by 1.2 to obtain the s coordinate of the first column of the goal point. It should be understood that the above data is used merely as an example and cannot be construed as a limitation of the present application.

[0163] After the feature vector is determined, a three-segment candidate path is generated by connecting the reference path, the history path, and the feature vector. The three-segment candidate path includes a history segment, a polynomial segment, and an extension segment. The history segment is obtained by partitioning the history path behind the start point. The polynomial segment is generated by using a vector constraint of the start point and a multi-row of goal points. In a specific method, a third-order polynomial equation of the Freinet system is calculated by using a vector constraint of any goal point combined with a vector constraint of the start point, and then discretized into road points to obtain a second segment of the path. The extension segment is obtained by moving the reference path behind the goal point corresponding to the second segment. The three segments of the path are connected in order, and the entire candidate path is obtained in a splicing manner. The path has a one-to-one correspondence with the goal points. In this example, a total of 33 candidate paths are generated.

[0164] Finally, spatial smoothing is performed for each candidate path: smooth control points are generated for every four road points in the geodetic Cartesian coordinate system, and smooth candidate paths are generated based on the control point set and a cubic B-spline.

[0165] After the candidate paths are generated, they need to be evaluated. Specifically, a suitable candidate path is selected from these candidate paths as the current obstacle avoidance path. The following describes the candidate path evaluation process in detail.

[0166] S520: Evaluate candidate routes.

[0167] In this embodiment, the evaluation of the candidate routes mainly includes steps S521, S522 and S523, which will be described in detail with reference to the accompanying drawings.

[0168] S521: Filter out invalid occupancy grids.

[0169] Based on the cluster of candidate paths generated above and the attitude of the ego vehicle, it can be easily learned that in a certain zone range in front of the vehicle, no matter which candidate path is selected by the ego vehicle, the obstacles in the zone cannot be avoided. In addition, the obstacle avoidance path planning is performed based on the occupancy map information provided by the upstream module, and the obstacle information provided by the upstream module may include not only the actual attitude of the dynamic or stationary obstacle and the predicted trajectory projection of the obstacle, but also the obstacle occupancy situation brought about by the false detection at the head part of the ego vehicle, or the situation where the unevenness of the ground makes the occupancy map have obstacle information in this zone. In this case, if the obstacle in this zone is still considered, the path planning will be affected. Therefore, the obstacles related to the false detection need to be avoided all the time in the moving process, which will bring about a large change in the path planning and lead to the path vibration.

[0170] Therefore, before the near-field lateral collision potential field is constructed in the obstacle avoidance path planning, the obstacles in this zone may not be considered, and the grids in this zone may be filtered out in the occupancy map as invalid grids. Figure 8 is an example diagram of an invalid occupancy grid according to an embodiment of the present application. Hereinafter, the method for filtering out invalid occupancy grids will be described in detail with reference to the accompanying drawings.

[0171] Optionally, a full collision triangular zone may be constructed to filter out invalid occupancy grids. Figure 9 is an example diagram of a full collision triangular zone according to an embodiment of the present application. Optionally, the coverage of the occupancy map can be 50m in front of the vehicle, 10m behind the vehicle, and 20m on the left and right sides of the vehicle, with a resolution (i.e., the area occupied by each grid) of 0.2m*0.2m, with the value of the occupied grid in the occupancy map being 1 and the value of the unoccupied grid being 0. It should be understood that a full collision triangular zone means that in a particular triangular zone, no matter which path is selected by the ego vehicle, the ego vehicle cannot avoid the obstacles in this zone. The vertices of the triangular zone are the positions of the start points of the candidate paths, the bottom edge of the triangular zone is equal to the width of the ego vehicle, and the two vertices of the bottom edge of the triangular zone are located on the outermost candidate paths. The occupancy grid of the full collision triangular zone is directly filtered out.

[0172] Optionally, after the occupancy map obtained after the invalid occupancy grids are filtered out is obtained, the occupancy map may be converted to a distance map. FIG. 10 is an example diagram of the conversion from the occupancy map to the distance map according to an embodiment of the present application. Optionally, the occupancy map may be converted to a distance map using the distance transform function DistanceTransform of OpenCV. As shown in FIG. 10, in the occupancy map, the part of the grid value 1 indicates that the grid is occupied, i.e., there is an obstacle; the part of the grid value 0 indicates that the grid is not occupied, i.e., there is no obstacle. The size of the grid of the distance map to which the occupancy map is converted is equal to the size of the grid of the occupancy map, and the value of each grid of the distance map is the distance from the grid to the nearest occupied grid point. It can be seen that in the distance map, the part of the grid value 0 indicates that the distance from the grid to the obstacle is 0, i.e., the grid is occupied; the part of the grid value 0.2 in the distance map indicates that the distance from the grid to the nearest obstacle is 0.2m. It should be understood that "each grid value in the distance map is the distance from the grid to the nearest occupied grid point" means that typically if there are multiple obstacles around the grid, only the distance from the grid to the nearest obstacle is recorded in the grid. Optionally, the distance can be a straight line distance.

[0173] In this embodiment of the present application, the invalid grids ahead of the vehicle are filtered out, so that the ego vehicle effectively prevents irrational avoidance due to false detection of obstacles, because the remaining occupied grids only contain information required by the obstacle avoidance algorithm, thereby ensuring the stability of the obstacle avoidance path.

[0174] Furthermore, it should be understood that filtering out invalid grids in obstacle avoidance path planning means that obstacles in this zone will not be considered in obstacle avoidance path planning, but in a real scenario, if there are real obstacles in this zone, the speed planning module will perform a corresponding deceleration process to avoid collision.

[0175] S522: Generate a V-shaped near-field lateral background cost potential field.

[0176] In this embodiment, a V-shaped near-field lateral background cost potential field, i.e., a first lateral background cost potential field in the aforementioned near-field range, can be constructed based on the distance map information obtained after the invalid grid is filtered out. The process of constructing the V-shaped near-field lateral background cost potential field is described in detail below with reference to the accompanying drawings.

[0177] 11 is an example diagram of a method for generating a V-shaped near-field lateral background cost potential field according to an embodiment of the present application. The method is step S522, which includes steps S5221, S5222, and S5223, which are described in detail below.

[0178] S5221: Calculate background cost at near-field lateral position based on the distance map.

[0179] Before the background cost at the near-field lateral position is calculated based on the distance map, the reference path needs to be shifted laterally first based on the sampling goal points on the multiple candidate paths generated in FIG. 6 or FIG. 7 to generate multiple virtual parallel paths. The generated virtual parallel paths are shown in FIG. 12. Specifically, the reference path is translated laterally to the lateral positions of the sampling goal points. In this embodiment of the present application, the virtual parallel paths are also called background cost virtual lines, and the collision tendency of the ego vehicle on each background cost virtual line can be represented using the background cost of the background cost virtual line. A high background cost indicates a high probability of collision, and a low background cost indicates a low probability of collision.

[0180] After the background cost virtual lines are generated, the background cost of each background cost virtual line is calculated.

[0181] Specifically, the distances from all road points of each background cost virtual line in the near-field range to the obstacle closest to the road point are calculated by using the distance map information, and the background cost of the background cost virtual line is calculated by using the minimum value of the distances.

[0182] For example, the formula for calculating background cost based on a minimum distance value could be:

number

[0183] cost back is the background cost;d min.i is the minimum value of the distance from all road points of a particular background cost virtual line in the near-field range to the obstacle closest to the road point, and the road point with the minimum value of the distance is denoted as road point i;width is the width of the vehicle. In the above formula (1), the critical value is width / 2+1.0. Furthermore, it should be understood that the critical value in the above formula (1) is used merely as an example, and in practical application, the critical value can alternatively be any value of width / 2+(0.3~1.2) as long as it can be guaranteed that the ego vehicle is at a certain safe distance laterally from the obstacle.

[0184] For example, a particular background cost virtual line has a total of four road points within the near-field range, and the distances from the four road points to the nearest obstacle are 0.6, 0.5, 0.7, and 1.2, respectively. In this case, the minimum value 0.5 is used to calculate the background cost of the background cost virtual line. In addition, since 0.5≦width / 2+1.0, the background cost of the background cost virtual line is 1 / (4*d 4 min.i )=4.

[0185] It should be further understood that the virtual parallel route includes multiple road points, and the distance between the road points may be determined based on the actual situation. For example, one road point may be set every 0.1 m, or one road point may be set every 0.1*v ego vehicle can be set every v ego vehicle is the moving speed of the ego vehicle, which is not limited in this application.

[0186] Optionally, to calculate the distance from a particular road point to the nearest obstacle on each virtual parallel path within the near-field range, the distance value of the grid where the road point is located can be used directly, or the distance can be calculated by using bilinear interpolation based on the distance information of four grids around the road point, which is not limited in this application.

[0187] S 5222: Generate an initial near-field lateral background cost potential field based on the background cost at the near-field lateral position.

[0188] Specifically, the initial near-field horizontal background cost potential field, i.e., the above-mentioned second horizontal background cost potential field in the near-field range, is generated based on the background costs of a plurality of background cost virtual lines in the near-field range.

[0189] S5223: Construct a V-shaped near-field lateral background cost potential field based on the initial near-field lateral background cost potential field.

[0190] Specifically, FIG. 13 is an example diagram of the monotonicity processing principle of the near-field lateral background cost potential field according to one embodiment of the present application.

[0191] It should be understood that in real traffic scenarios, the initial near-field lateral background cost potential field formed by the background costs of multiple background cost virtual lines usually has multiple minima in the lateral distribution (L direction). It is necessary to first find multiple minimum value points of the initial near-field lateral background cost potential field, and record the lateral positions and the corresponding background cost values. For example, as shown in the left diagram of Figure 13, there are three minimum value points in the lateral distribution of the background cost. Then, the current lateral position of the ego vehicle and the positions of the three minima are found separately. For example, the current lateral position of the ego vehicle is L=-0.5; the coordinates of point 1 are: L=1.3, cost back =0.13; point 2 has coordinates L=-1.2, cost back = 0.53; point 3 has coordinates L = -0.2, cost back = 1.7. In addition, it can be further seen from FIG. 13 that there is still a maximum background cost in the near-field range of the real traffic scenario. It should be understood that the distance from a specific road point to an obstacle on the background cost virtual line at the lateral position corresponding to the maximum background cost of the near-field range is 0. Specifically, there is an obstacle on the road point. In this embodiment, when the distance from the obstacle is 0, the background cost cannot be calculated based on formula (1). Therefore, a method for customizing the maximum background cost can be used, for example, the maximum background cost is 10 9 It is.

[0192] It can be seen that in the above three minimum value points, point 1 has the lowest background cost. This means that when the ego vehicle moves along this background cost virtual line, the optimal lateral distance can be kept from the obstacle. If the route is selected based on the traditional optimization algorithm, the background cost virtual line with the lateral position of point 1 is selected as the optimal route. However, in a real traffic scenario, there exists an obstacle between point 1 and the ego vehicle, as shown in the left diagram of Figure 13. In addition, in the near field range (0m~5m), the length of the ego vehicle usually reaches 3m~6m. Therefore, in a real scenario, due to the existence of intermediate obstacles, the ego vehicle cannot move normally to the route with the lowest background cost. In other words, the point with the lowest background cost in the near field lateral background cost potential field is not necessarily the most suitable point.

[0193] Therefore, based on the above problem, in an embodiment of the present application, a target minimum needs to be further determined from the multiple minima, where the target minimum is the lowest minimum point among all the minimum points between the ego vehicle's lateral position and the near-field range obstacle-free.

[0194] Specifically, the minimum points are sorted in ascending order of background cost value. Starting from the minimum, it is checked sequentially whether there is an obstacle, specifically, whether the point with the maximum background cost (the point whose distance from the obstacle is 0) exists between that point and the lateral position of the ego vehicle. If an obstacle exists, the corresponding minimum point is considered as an invalid point and discarded. If no obstacle exists, the point is used as a reference, and the background costs of the two sides of the point are processed into a monotonic function by using a fixed step to form a V-shaped near-field lateral collision potential field. In brief, the minimums are first sorted in ascending order, and then the check is performed starting from the current minimum. If there is an obstacle between the current minimum and the ego vehicle, the point is discarded, and then the lowest minimum point is checked. If there is no obstacle between the current minimum and the ego vehicle, the point is used as a reference, and the background costs of the two sides of the point are built into a monotonic function by using a specific slope, and the previous background costs of the two sides do not need to be considered. In addition, the background cost of each background cost virtual line can be directly calculated at the corresponding horizontal position based on the gradient.

[0195] For example, as shown in the left diagram of Figure 13, there is a maximum background cost between point 1 and the lateral position of the ego vehicle, so this point is discarded; there is no maximum background cost between point 2 and the ego vehicle, so this point is a valid minimum point. Based on this point, a monotonicity process is performed on the background costs of the two sides of the point to obtain a V-shaped near-field lateral collision potential field, and the slope of the monotonic function is 10 / 1m, as shown in the right diagram of Figure 13.

[0196] It should be understood that the slope of the function in the monotonicity process should be equal to or greater than a certain threshold. For example, the slope can be any value equal to or greater than 10 / 1 m. The specific value needs to be determined with reference to the actual situation and is not limited here. In this way, the background cost at the optimal lateral position is much smaller than the background cost of other routes, and when the ego vehicle deviates slightly from the optimal lateral position in the actual moving process, the final cost increases obviously. Therefore, the ego vehicle can stably move through the lateral position with the lowest background cost, thereby improving the stability and safety of the ego vehicle's movement.

[0197] S523: Calculate the route cost.

[0198] Preferably, in this embodiment, the evaluation of the candidate path can be performed by using a background cost combined with a collision cost, a constraint cost, a switching cost, a lateral shift cost, and a smoothness cost. The following describes these costs one by one with reference to the formulas and accompanying drawings.

[0199] The collision cost is used to evaluate the possibility of a collision with an obstacle when the ego vehicle travels along a candidate path. Specifically, the collision cost of each road point on each candidate path in all candidate paths is calculated, and then the collision costs of all road points on each candidate path are summed up to obtain the final cost of the candidate path. The collision cost of each road point is calculated based on the distance from the road point to the nearest obstacle to that road point, with a shorter distance indicating a higher collision cost.

[0200] For example, equation (2) is the collision cost calculation method provided in this embodiment of the present application:

number

[0201] cost obj is the collision cost;d min.iis the distance from the i-th road point on the candidate path to the obstacle; max(d min .i / 0.7,0.2) is d min. i / 0.7 or 0.2, the larger of which is used;pt i .s is the ordinate of the i-th road point on the candidate route; width is the width of the vehicle.

[0202] In the above formula (2), the critical value is width / 2+0.7. min.i If is greater than a critical value, then it is assumed that no collision will occur; or d min.i If is less than or equal to the critical value, a collision is deemed to occur. It should be understood that the critical value in the above formula is used only as an example, and in practical application, the critical value can alternatively be any value between width / 2+(0.3~1.2) as long as it can be guaranteed that the ego vehicle will not collide when traveling this path.

[0203] The collision cost of each road point above is calculated based on the distance from the road point and the nearest obstacle to the road point. Therefore, before calculating the collision cost, the distance from each road point to the nearest obstacle to the road point needs to be calculated first. The calculation method of the distance from the road point to the nearest obstacle will be described in detail with reference to Figures 14 and 15.

[0204] FIG. 14 is an example diagram of a multi-circle collision model of a car body according to an embodiment of the present application. In this embodiment, the car body corresponds to a multi-circle model, and the circle center where the midpoint of the rear axle of the multi-circle collision model of the car body is located overlaps with each road point on the candidate path (it should be understood that the moving path of the ego vehicle is the path through which the center of the rear axle of the ego vehicle passes), and the orientation of the head of the vehicle coincides with the orientation of the road point. In this case, the distance from the road point on the corresponding candidate path to the obstacle is the shortest distance from the multiple circle centers in the multi-circle model to the obstacle. If the distance from any circle center to the obstacle is less than a certain distance, the state of the road point is considered to be crashed, and the collision cost of this point is defined by the distance.

[0205] For example, the distance from road point i to an obstacle in Figure 14 is described in detail by using road point i as an example. As shown in Figure 14, road point i on the candidate route overlaps with the midpoint of the rear axle of the four-circle model (C1-C4). In this case, the distance d from road point i to the obstacle is min.i is the shortest distance from the four circle centers of the four-circle model to the obstacle, i.e., the distance from the circle center of circle C4 to the obstacle. If the distance is less than a certain threshold, the state of road point i is considered to have a collision; or if the distance is greater than a certain threshold, the state of road point i is considered to have no collision.

[0206] Furthermore, based on the above method, all road points on a particular candidate path are considered in detail. If the state of any road point is in conflict, the state of the entire path is in conflict. In this embodiment of the present application, the minimum of the longitudinal distances of all road points in conflict states on each candidate path is represented as the conflict distance of the candidate path. Based on the above description, the conflict distance and the distance d from the road point to the obstacle are calculated as min.i It can be seen that the values ​​are different.

[0207] Optionally, in this embodiment of the present application, the distances from the centers of multiple circles in the multi-circle model to the nearest obstacle may be calculated by using the distance map. In addition, during distance calculation, in order to avoid the loss of accuracy caused by the grid map, bilinear interpolation may be used to calculate the accurate distance between a specific position of the circle center and the nearest obstacle, as shown in FIG. 15. It should be understood that point P may be the center of the circle in the multi-circle model, points A, B, C, and D correspond to the road points of the centers of the four grids of the distance map respectively, and the values ​​of the four grids represent the distances from A, B, C, and D to the nearest obstacle. Therefore, the distance value of point P can be calculated by using bilinear interpolation based on the distance information of the four points A, B, C, and D. After calculating the distances from the multiple circle centers to the obstacles individually in the above manner, it is determined that the shortest distance is the distance d from road point i to the obstacle. min.i Used as.

[0208] The constraint cost is used to determine whether each road point on a candidate path is within the obstacle avoidance range constraint. If the road point is beyond the obstacle avoidance range, the constraint cost of that point is calculated; otherwise, the constraint cost is 0. Specifically, the overall constraint cost of each candidate path can be obtained by summing the constraint costs of all road points, as shown in Equation (3):

number

[0209] cost margin is the constraint cost;pt i .s is the ordinate value of the i-th road point on the candidate route;pt i.l is the abscissa value of the i-th road point; LM is the abscissa value of the left constraint, i.e., the left boundary line of the obstacle avoidable range; RM is the abscissa value of the right constraint, i.e., the right boundary line of the obstacle avoidable range. Thus, the more the amount of road points on a particular candidate route outside the obstacle avoidable range and the smaller the ordinate value of the road points outside the obstacle avoidable range, the higher the constraint cost of the route. Alternatively, if all road points on a candidate route are within the obstacle avoidable range, the constraint cost is 0. Thus, traveling a candidate route with a constraint cost of 0 can guarantee that the ego vehicle moves within the obstacle avoidable range.

[0210] The switching cost is used to describe the deviation between a candidate route and a historical route. The switching cost can be divided into a shift switching cost and a zone switching cost.

[0211] The shift-switching cost represents the change of the lateral path of the candidate path relative to the history path. In this embodiment, the absolute value of the difference between the lateral shift of the goal point of the current candidate path and the lateral shift of the goal point of the history output path in the previous frame may be used as the shift-switching cost. The formula is as follows:

number

[0212] cost ichange is the shift switching cost; goal old is the horizontal shift of the goal point of the historical path, specifically, the horizontal coordinate of the goal point of the historical path; now is the lateral shift of the goal point of the current candidate path, specifically, the abscissa of the goal point of the current candidate path.

[0213] It should be understood that lateral shift is the degree of shift away from the centerline of the road.

[0214] The zone-switching cost describes the degree of large lateral changes of a candidate path. The zone-switching cost is relatively low when the path jumps to an adjacent zone, and is very high when the path jumps between left and right zones. In this case, the zone-switching cost can be used to evaluate the large changes of the path.

[0215] For example, based on the lateral distance, the obstacle avoidable range can be divided into three zones: left Z1, center Z2, and right Z3 as shown in Fig. 16. When the lateral obstacle avoidable range is 3m and the abscissa of the road centerline is 0, the three zones can be divided as follows: Specifically, if the abscissa of the goal point is less than -0.5, the goal point is located in zone 1 (Z1); if the abscissa of the goal point is greater than -0.5 and less than 0.5, the goal point is located in zone 2 (Z2); if the abscissa of the goal point is greater than 0.5, the goal point is located in zone 3 (Z3).

number

[0216] zone represents the zone and goal.l is the abscissa value of the goal point.

[0217] Based on the above description, the zone switching cost value between the candidate route and the historical route may be calculated based on the following formula (6):

number

[0218] cost zone is the zone switching cost, and zone old is the zone in which the goal point of the historical route is located, and zone now is the zone in which the goal point of the candidate route is located.

[0219] It should be understood that in actual operation, the obstacle avoidable range may be divided into four zones, five zones, six zones, etc. The number of divided zones is not limited in this application. For ease of explanation, in this embodiment of the application, the obstacle avoidable range is divided into three zones. It should be further understood that the division of the zones may be equal length division or unequal length division. This is not limited in this application.

[0220] If the lateral route is divided into more zones, for example, four zones, 1 or 2 may be used as the critical value. For example, if the absolute value of the difference between the zone in which the goal point of the historical route is located and the zone in which the goal point of the candidate route is located is greater than 1, the zone switching cost is 1; or if the absolute value is less than or equal to 1, the zone switching cost is 0. Alternatively, if the absolute value of the difference between the zone in which the goal point of the historical route is located and the zone in which the goal point of the candidate route is located is greater than 2, the zone switching cost is 1; or if the absolute value is less than or equal to 2, the zone switching cost is 0. The specific zone division and the determination of the critical value should be determined based on the actual road conditions. This is not limited.

[0221] The lateral shift cost is used to describe the degree of lateral shift of a candidate path away from the centerline of the road. Specifically, the cost can be expressed by using the lateral shift of the goal point of the candidate path, as shown in Equation (7):

number

[0222] cost offset is the lateral shift cost; goal now .l is the lateral shift of the goal point of the current candidate route.

[0223] The smoothness cost is used to describe the degree of smoothness of a candidate path and is represented by the curvature of the candidate path. Specifically, the cost can be described by using the integral of the squared curvature of each road point on the candidate path, as shown in Equation (8):

number

[0224] cost smooth is the smoothness cost;pt i .curve is the curvature at the i-th road point on the candidate route;pt i .s is the ordinate value of the i-th road point on the candidate route. It should be understood that a larger curvature indicates a higher cost.

[0225] Preferably, in this embodiment of the present application, after the cost of each candidate path is calculated, the weighted sum result of the cost of each candidate path can be used as the final cost of the candidate path. Then, based on the final cost values ​​of all the candidate paths, the candidate path with the lowest final cost is used as the optimal path of the current frame, and the optimal path of the current frame is the current obstacle avoidance path above.

[0226] Specifically, the final cost of each candidate path may be calculated based on equation (9).

number

[0227] cost total is the final cost of the candidate route; back is the background cost;w back is the weight of background cost; obj is the collision cost; w obj is the weight of the collision cost; margin is the constraint cost;w margin is the weight of the constraint cost; lchange is the shift switching cost;w lchangeis the weight of the shift switching cost; zone is the zone switching cost;w zone is the weight of the zone switching cost;cost offset is the horizontal shift cost;w offset is the weight of the lateral shift cost;cost smooth is the smoothness cost; w smooth is the weight of the smoothness cost.

[0228] When the final cost is calculated based on the solution of this embodiment of the present application, it should be understood that by integrating the effects of multiple costs, the optimal path of the current frame can meet the requirements of various aspects.

[0229] Furthermore, in the calculation process, the weight of the background cost and the weight of the collision cost may be set relatively large. In one aspect, the final cost of the optimal route is much lower than the costs of other candidate routes. If the ego vehicle deviates slightly from the optimal route in the actual moving process, the final cost increases obviously. Therefore, the ego vehicle can stably move along the route with the lowest cost. In another aspect, since the route with the lowest cost also has the optimal collision cost and the optimal background cost, in the moving process of the ego vehicle, when an obstacle on the side of the ego vehicle gradually approaches, the ego vehicle can slowly avoid the obstacle, thereby keeping a safe distance from the obstacle.

[0230] For example, the cost weights in this embodiment of the application may be set as follows: w back =1.0×10 6 w obj =1.0×10 6 w margin =1.0×10 -1 w lchange =1.0×10 -6 w zone =1.0×10 -3 woffset =1.0×10 -3 w smooth =1.0×10 -6

[0231] It should be understood that in this embodiment of the present application, the candidate route can be evaluated with reference to one or more of the above-mentioned costs based on the actual situation. It should be further understood that the value of the weight of the cost can be set based on the actual situation. This is not limited here.

[0232] S530: The route arbitration result is output.

[0233] Once the optimal path for the current frame, i.e. the current obstacle avoidance path mentioned above, is obtained, An arbitration may be performed based on the historical path and the optimal path of the current frame, and a final obstacle-avoidance path is output. A specific arbitration method is shown in Figure 17. It should be understood that the optimal path of the current frame is the aforementioned current obstacle-avoidance path.

[0234] 17 is an example diagram of an arbitration method for outputting an obstacle avoidance path according to an embodiment of the present application. As shown in FIG. 17, the arbitration method is step S530, which includes steps S531 to S536. These steps are described in detail below.

[0235] S531: Determine whether a collision currently occurs on the historical route. If a collision occurs, proceed to S532. Or, if no collision occurs, proceed to S533.

[0236] S532: Determine whether a collision occurs on the current optimal path. If a collision occurs, proceed to step S534; or if no collision occurs, proceed to step S535.

[0237] S533: Determine whether the cost of the current optimal route is significantly better than the historical cost. If the cost of the current optimal route is significantly better than the historical cost, proceed to step S535. Or if the cost of the current optimal route is not significantly better than the historical cost, proceed to step S536.

[0238] S534: Determine whether the collision distance of the current optimal route is significantly better than the historical collision distance. If the collision distance of the current optimal route is significantly better than the historical collision distance, proceed to step S535. Or if the collision distance of the current optimal route is not significantly better than the historical collision distance, proceed to step S536.

[0239] S535: The current optimal route is output.

[0240] S536: Output the route history.

[0241] Specifically, before arbitration is performed, the historical path first needs to be regenerated in the current frame based on the information of the goal points used to generate the historical path in the previous frame, and the final cost and collision conditions of the historical path are calculated.

[0242] If no collision currently occurs in the historical path, the output obstacle-avoidance path is determined based on the final cost of the current optimal path and the final cost of the historical path. If the final cost of the current optimal path is obviously better than the final cost of the historical path, the current optimal path is used as the output obstacle-avoidance path; otherwise, the historical path continues to be used. It should be understood that the final cost of the current optimal path is better than the final cost of the historical path means that the final cost of the current optimal path is less than the final cost of the historical path.

[0243] If the historical paths currently result in a collision, but the optimal path for the current frame does not, then the optimal path for the current frame is used as the final path that is currently being output. Furthermore, it should be understood that if a collision occurs on the optimal path of the current frame, it indicates that a collision occurs on all paths of the current frame. In this case, as shown in Figure 18, if the collision distance of the optimal path of the current frame is close to the historical collision distance, the historical path of the previous frame is still used. As shown in Figure 19, if the collision distance of the optimal path of the current frame is obviously better than the historical collision distance, the current optimal path is used as the output final obstacle avoidance path.

[0244] It should be understood that the collision distance of the optimal path of the current frame is clearly superior to the historical collision distance means that the difference obtained by subtracting the historical collision distance from the collision distance of the optimal path of the current frame is greater than or equal to a certain threshold, for example 5 m.

[0245] For the final cost of the current optimal path to be better than the final cost of the historical path means that the ratio of the final cost of the current optimal path to the final cost of the historical path is less than or equal to a certain threshold, for example 60%.

[0246] S540: Perform time domain smoothing on the path.

[0247] In this embodiment, after the final obstacle-avoidance path is obtained by arbitration, time-domain smoothing may be further performed on the obstacle-avoidance path.

[0248] In addition, in this embodiment, each path corresponds to a unique goal point. Therefore, time-domain smoothing can be performed on the obstacle avoidance path by using the goal point. Specifically, smoothing sampling of the previous frame goal old (i.e., the sampling goal point of the history path of the previous frame old ) and the final sampling goal point selected in the current frame, goal final (That is, the sampling goal point of the final obstacle avoidance path selected by arbitrationfinal ) based on the time domain smoothing sampling goal point goal filter is generated by inertia filtering.

[0249] It should be understood that if the final obstacle-avoiding path is a historical path, the final sampling goal point selected in the current frame is the sampling goal point of the historical path. In this case, both the result obtained after time-domain smoothing and the result obtained without time-domain smoothing are the sampling goal points of the historical path. If the final obstacle-avoiding path is an optimal path in the current frame, the final sampling goal point selected in the current frame is the current optimal sampling goal point. Figure 20 is an example diagram of time-domain smoothing in this case. Time-domain smoothing sampling goal point goal filter After the 3-segment path is generated, it is smoothed by sampling the goal points to obtain the final output path. filter is regenerated based on

[0250] Smoothing Goal Pointgoal filter The specific position of can be calculated based on equations (10) and (11):

number

number

[0251] goal filter .l is the horizontal position of the smoothing sampling goal point;goal filter .s is the vertical position of the smoothing sampling goal point;goal old .l is the horizontal position of the smoothing sampling goal point of the previous frame;goal old .s is the vertical position of the smoothing sampling goal point in the previous frame;goalfinal .l is the horizontal position of the final sampling goal point selected in the current frame;goal old .s is the vertical position of the final sampling goal point selected in the current frame;w l is the horizontal smoothing weight, and w s is the weight for smoothing in the vertical direction.

[0252] It should be understood that in this embodiment, the weights for smoothing in the horizontal and vertical directions can be set based on the actual situation. For example, the weights for smoothing in the horizontal and vertical directions can be 1. Specifically, the smoothing sampling goal point goal filter The position of goal is the smoothing sampling goal point of the previous frame. old The position of the smoothing goal point is the same as that of the smoothing goal point, i.e., the historical path is still used. The weights for smoothing in the horizontal and vertical directions can be 0. Specifically, the smoothing sampling goal point filter The position of the final sampling goal point selected in the current frame is final That is, the final path sampling goal point selected based on the path arbitration is the same as the smoothing sampling goal point goal filter is used as the weight. If the result of the route arbitration is that the optimal route of the current frame is used, i.e., the final route selected in the current frame is the optimal route of the current frame, the weight may alternatively be any value from 0 to 1 based on the actual road conditions, so that the ego vehicle can comprehensively consider the conditions of the historical route and the optimal route of the current frame to prevent the inter-frame hopping that occurs in the case of direct operation to the optimal route. It should be understood that the weights in the horizontal and vertical directions may be the same or different. For example, in this embodiment, it may be set as follows: w l = 0.92, and w s =0.85.

[0253] In this embodiment, in one aspect, a lateral background cost potential field of near-field range is generated, so that when an obstacle on the side of the ego vehicle gradually approaches laterally, the ego vehicle can slowly avoid the obstacle and keep a safe distance from the obstacle. In another aspect, invalid grids are filtered out, so that the ego vehicle is effectively prevented from performing irrational avoidance caused by the occupancy grid here. In yet another aspect, the background cost combined with the path arbitration policy can ensure stable obstacle avoidance of the ego vehicle.

[0254] For example, in the scenario shown in Figure 2, when vehicles 4 and 5 are in the positions shown in the figure, the ego vehicle may move in between the two vehicles. When vehicle 5 on the right slowly approaches the ego vehicle, the lowest value of the V-shaped potential field formed by the background cost gradually moves left, so the ego vehicle selects the left candidate path within the constraint of the avoidable obstacle range and keeps a lateral distance of 1m from the obstacle to ensure the safety of the ego vehicle. In addition, if the weight of the background cost is very high, e.g., 10 6 Therefore, when the obstacle approaches slightly, the background cost changes rapidly. As a result, the final cost also changes obviously. In this way, the optimal path cost obtained in each frame is surely less than 60% of the historical optimal path cost, and the path switching from the historical path to the current optimal path is continuously triggered to enable the ego vehicle to avoid the obstacle in time. In addition, the collision cost is also used when evaluating the entire candidate path. For example, the existence of obstacle 1 will allow the candidate path near obstacle 1 to encounter a collision, and its collision cost will also be very high. Therefore, based on the weighted sum of multiple costs such as background cost and collision cost, the final output obstacle avoidance path in this scenario will shift to the left as shown in FIG. 21 to effectively avoid the obstacle that needs to be avoided.

[0255] The above is a concrete example of the present embodiment of the present application being applied to a complex and narrow traffic scenario. With reference to the near-field range lateral background cost potential field (i.e., the first lateral background cost potential field) and collision cost, it should be understood that the present embodiment of the present application can also be applied to a simple and high-speed scenario for rapid obstacle avoidance.

[0256] Figure 22 is an example diagram of a simple urban road scenario according to one embodiment of the present application. As shown in Figure 22, when the ego vehicle travels on a structured road at high speed, there are a small number of dynamic and stationary obstacles (numbers 1 and 2) within the obstacle avoidance range. However, these obstacles are cross-located on the road in front of the ego vehicle, and the ego vehicle needs to quickly avoid the obstacles along a small S-curve. It should be understood that in this scenario, the reference path, the lateral obstacle avoidance range, size, position, and speed of all obstacles, as well as the occupancy map including the predicted trajectory are all known.

[0257] For ease of explanation, we denote the complex and narrow scenario as scenario 1 and the simple and fast scenario as scenario 2.

[0258] Optionally, for scenario 2, path planning may be performed with reference to the aforementioned lateral background cost potential field (i.e., the first lateral background cost potential field) and collision costs in the near-field range. In addition, path planning may also be performed with reference to one or more of the following: filtering out invalid grids, considering multiple other costs to obtain a final cost, path arbitration, smoothing the time domain, etc.

[0259] The following briefly describes the route planning method for Scenario 2 in a preferred manner.

[0260] In a preferred implementation, the planning method shown in Figure 5 can also be applied to scenario 2 shown in Figure 22. However, a specific candidate route generation method used when the planning method is applied to scenario 2 is different from that used when the planning method is applied to scenario 1 (step S510). Figure 23 is an example diagram of another candidate route generation scenario according to an embodiment of the present application. The following will describe the candidate route generation of scenario 2 in detail using a concrete example.

[0261] Specifically, in Scenario 2, the reference path is the center line of the current lane, the lane width, i.e., the obstacle avoidable range, is 3.5 m, and the width on both sides of the lane center line can be 1.75 m. In Scenario 2, the method of generating start and goal points is basically the same as that of Scenario 1, with the main difference being that Scenario 1 can generate 11 goal points in each row, while Scenario 2 generates 3 goal points in each row.

[0262] After the feature vector is determined, a fully connected candidate path is generated by connecting the reference path, the history path, and the feature vector. The path is divided into three segments, including a history segment, a fully connected segment, and an extension segment. The history segment is obtained by partitioning the history path behind the start point. The fully connected segment is generated by connecting multiple columns of the start point and the sampling point. In a specific manner, the start point is individually connected to the first column of the sampling point, and then the first column of the sampling point is individually connected to the second column of the sampling point. By analogy, the connection relationship between the multiple columns of the sampling point can be obtained. For example, there are three sampling points in each column, and there are three columns of sampling points in total. In this case, 3*(3*3)*(3*3)=243 candidate trajectories can be obtained. The segments of the fully connected segment are linked by using a third-order polynomial equation, and the vector constraint of the goal point needs to be satisfied during linking. The extension segment is obtained by translating the reference path so that it is behind the sampling point corresponding to the fully connected segment. The three segments of the path are connected in order, and the whole candidate path is obtained in a splicing manner. In this embodiment, a total of 243 candidate paths are generated.

[0263] Finally, spatial smoothing is performed on each candidate path. For the smoothing method, please refer to the explanation of Scenario 1. The details will not be described again.

[0264] It should be understood that the above is merely used as an example, and is used only to clearly describe the difference between the candidate path generation methods of Scenario 1 and Scenario 2, and cannot be construed as a limitation of the present application. It should be understood that the number of goal points in each row, the number of rows of goal points, and the number of candidate paths generated can be determined with reference to the actual situation, and are not limited.

[0265] In scenario 2, for the evaluation of candidate routes (step S520) and arbitration of output routes (step S530), please refer to the specific implementation description of scenario 1.

[0266] In addition, the route time domain smoothing (step S540) in route planning for scenario 2 and scenario 1 is slightly different because the candidate route connection methods are different.

[0267] Specifically, in scenario 2, the smooth sampling goal point cluster goal of the previous frame is used. old is recorded, and the goal old contains three goal points here. Each row of sampling points corresponds to one goal point. Based on the final sampling goal points (three points) selected in the current frame, a time-domain smoothed sampling goal point cluster is generated by inertial filtering. A three-segment path is regenerated based on the smoothed sampling goal point cluster to obtain the final output path. The formula and parameters of the time-domain smoothing of the corresponding goal points are the same as Equations (10) and (11).

[0268] In scenario 2, when the ego vehicle is in a scenario where two obstacles are cross-located, the ego vehicle has a sufficiently high degree of freedom for lateral avoidance. Therefore, a sufficiently long collision-free movement trajectory can be obtained by planning in the above manner, so that the ego vehicle can quickly avoid the obstacle passing through the traffic scenario. In addition, in the process of quickly avoiding the obstacle, the ego vehicle can keep a sufficient lateral distance from the obstacle to ensure the stability of the route.

[0269] Specifically, the obstacle avoidance path shown in FIG. 24 can be generated in this embodiment. Since the candidate path is generated by using the fully connected method in this embodiment, there are a large number of candidate forms of paths, and the solution space is fully expanded, so that a collision-free trajectory that avoids multiple objects can be obtained. Furthermore, since the path is evaluated based on the collision cost, the currently planned obstacle avoidance path (optimal candidate path) can keep a safe distance of 0.7 m from obstacles 1 and 2 throughout the path. In addition, in the moving process, when passing the side of the obstacle, the ego vehicle adjusts the moving path based on the background cost, so that the ego vehicle can keep a safe distance of 1 m from the obstacle. In this way, a collision-free path is formed in the longitudinal range where obstacles 1 and 2 are located, and the ego vehicle quickly passes the two obstacles. Furthermore, if the path planned by the ego vehicle at the illustrated position allows the ego vehicle to keep a safe distance of 1 m when the ego vehicle moves to the side of obstacles 1 and 2, the output path arbitration policy arbitrates between the history path and the path re-planned in the moving process. In this way, the historical path is still used and the path does not switch, thus quickly avoiding obstacles.

[0270] However, in scenario 2, when using the path planning method used in scenario 1, the generated candidate paths are in a relatively small format (as shown in Figure 7). In this case, a collision-free travel path cannot be obtained directly when the selection is performed among multiple candidate paths. In the travel process, the ego vehicle can only avoid obstacles 1 and 2 separately. Therefore, the planned path can avoid obstacle 1 at the beginning, but a collision with obstacle 2 occurs in the front segment of the path (specifically, obstacle 2 is located in the third segment of the bottom-most path in Figure 7). In this case, the travel path with collision affects the back-end speed planner and slows down the ego vehicle, and the ego vehicle can only travel at a low speed in this scenario.

[0271] 25 is an example diagram of an apparatus for planning an obstacle avoidance path for a mobile device according to an embodiment of the present application. As shown in FIG. 25, the planning apparatus 2500 includes an acquisition module 2510 and a processing module 2520.

[0272] The acquisition module 2510 is configured to acquire a distance map, the distance map including a plurality of first grids, each of the plurality of first grids being used to record a distance from the first grid to a nearest first grid occupied by an obstacle; the processing module 2520 is configured to: determine a first lateral background cost potential field of a near-field range based on the distance map, the near-field range being a range in which the longitudinal distance from the mobile device is less than or equal to a first threshold, the first lateral background cost potential field being a first repulsive field formed by an obstacle at a lateral position of the mobile device, the first lateral background cost potential field including a target minimum point, the background costs of the two lateral sides of the target minimum point being characterized by monotonicity, and the background cost representing a near-field lateral collision cost caused by an obstacle at a lateral position of the near-field range relative to the mobile device; and determine a current obstacle avoidance path based on the first lateral background cost potential field.

[0273] Optionally, determining a first lateral background cost potential field of the near field range based on the distance map includes: determining a second lateral background cost potential field of the near field range based on the distance map, the second lateral background cost potential field being a second repulsive field formed by an obstacle at a lateral position of the mobile device, the second lateral background cost potential field including at least one minimum point; determining a target minimum point from the at least one minimum point; and performing a monotonicity process on the background costs of the two lateral sides of the target minimum point to generate the first lateral background cost potential field, the slope of the monotonicity process being greater than or equal to a second threshold.

[0274] Optionally, there are no obstacles between the target minimum point and the mobile device.

[0275] Optionally, before acquiring the distance map, the acquisition module 2510 may be further configured to: acquire an occupancy map, the occupancy map including a plurality of second grids, and used to record the probability that an obstacle is present in each of the plurality of second grids; the processing module 2520 may be further configured to: acquire the distance map based on the occupancy map.

[0276] Optionally, obtaining a distance map based on the occupancy map includes: filtering out a second grid located in a first zone in the occupancy map, the first zone being located in front of the mobile device, and if there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone; and obtaining a distance map based on the occupancy map obtained after the filtering is performed.

[0277] Optionally, before determining the second lateral background cost potential field within the near field range based on the distance map, the processing module 2520 may further be configured to: generate a feature vector, the feature vector including a path start point and a sampling goal point; generate a plurality of candidate paths based on the reference path, the historical path, and the feature vector; determining the second lateral background cost potential field within the near field range based on the distance map includes: shifting the reference path laterally based on the sampling goal points to generate a plurality of virtual parallel paths; calculating a distance from each road point to a nearest obstacle for each of the plurality of virtual parallel paths in the near field range based on the distance map; calculating a background cost for each virtual parallel path based on the minimum value of the distance on the virtual parallel paths; and generating a second lateral background cost potential field within the near field range based on the background costs of the plurality of virtual parallel paths in the near field range.

[0278] Optionally, before determining the current obstacle avoidance path based on the first lateral background cost potential field, the processing module 2520 is further configured to: calculate, for each of the plurality of candidate paths based on the distance map, one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost, where the collision cost is used to evaluate whether the mobile device will collide when moving on the candidate path, the constraint cost is used to evaluate whether each road point on the candidate path is in an obstacle avoidance possible range, the switching cost is used to evaluate the deviation between the candidate path and the historical path, and the lateral shift cost is used to calculate the smoothness cost. The cost is used to evaluate a degree of lateral shift of the candidate path from the road centerline, and the smoothness cost is used to evaluate the smoothness of the candidate path; determining a current obstacle-avoidance path based on the first lateral background cost potential field includes: calculating a final cost of each candidate path based on a background cost of the first lateral background cost potential field, or calculating a final cost of each candidate path based on the background cost of the first lateral background cost potential field and one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost; determining a current obstacle-avoidance path based on the final cost.

[0279] Optionally, the processing module 2520 is further configured to: determine a final obstacle-avoidance path based on an arbitration result between the historical path and the current obstacle-avoidance path.

[0280] Optionally, determining a final obstacle-avoidance path based on an arbitration result between the historical path and the current obstacle-avoidance path includes: using the current obstacle-avoidance path as a final obstacle-avoidance path when a collision occurs on the historical path but not on the current obstacle-avoidance path; or using a path with a larger collision distance of the current obstacle-avoidance path and the historical path as a final obstacle-avoidance path when a collision occurs on both the historical path and the current obstacle-avoidance path and an absolute value of a difference between the collision distance of the current obstacle-avoidance path and the collision distance of the historical path is equal to or greater than a third threshold .... using the historical route as the final obstacle-avoidance route if an absolute value of a difference between the collision distance of the historical route is less than a third threshold; or using the current obstacle-avoidance route as the final obstacle-avoidance route if no collision occurs on the historical route and a ratio of a final cost of the current obstacle-avoidance route to a cost of the historical route is less than or equal to a fourth threshold; or using the historical route as the final obstacle-avoidance route if no collision occurs on the historical route and a ratio of a final cost of the current obstacle-avoidance route to a cost of the historical route exceeds a fourth threshold, wherein the collision distance is the shortest longitudinal distance among the longitudinal distances of all road points in a collision state on each candidate route.

[0281] Optionally, the processing module 2520 may be further configured to perform time domain smoothing based on the historical path and the final obstacle avoidance path.

[0282] Optionally, the planning device 2500 may further include an output module configured to output the final obstacle-avoidance path to a speed planner, the speed planner being configured to execute speed planning based on the final obstacle-avoidance path and obstacle information on the final obstacle-avoidance path.

[0283] 26 is an exemplary block diagram of a hardware structure of an apparatus for planning an obstacle avoidance path according to an embodiment of the present application. The apparatus 2600 (the apparatus 2600 may specifically be a computer device) includes a memory 2610, a processor 2620, a communication interface 2630, and a bus 2640. The communication connection between the memory 2610, the processor 2620, and the communication interface 2630 is implemented via the bus 2640.

[0284] The memory 2610 is a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 2610 may store a program. When the program stored in the memory 2610 is executed by the processor 2620, the processor 2620 is configured to execute the steps of the planning method of the embodiment of the present application.

[0285] The processor 2620 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits and is configured to execute associated programs to implement the planning methods in the method embodiments of the present application.

[0286] The processor 2620 may alternatively be an integrated circuit chip and have signal processing capabilities. In the implementation process, the steps of the planning method in the present application may be completed by using a hardware integrated logic circuit or a software-type instruction in the processor 2620.

[0287] The processor 2620 may alternatively be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or another programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The processor 2620 may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the methods disclosed with reference to the embodiments of the present application may be performed and completed directly by a hardware decode processor, or may be performed and completed using a combination of hardware modules and software modules in the decode processor. The software modules may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 2610. The processor 2620 reads the information in the memory 2610 and, in combination with the hardware of the processor 2620, completes the functions that need to be performed by the modules included in the planning device in the embodiments of the present application, or executes the planning method in the method embodiments of the present application.

[0288] The communication interface 2630 uses a transceiver device, such as, but not limited to, a transceiver, to realize communications between the device 1000 and other devices or communication networks, for example, to realize the functions of the acquisition module 2510 and the output module.

[0289] The bus 2640 may include a path for transmitting information between various components of the device 2600 (eg, the memory 2610, the processor 2620, and the communication interface 2630).

[0290] An embodiment of the present application further provides a vehicle including the above-mentioned device 2500 or 2600 for planning obstacle avoidance paths. The device 2500 or 2600 can execute any of the above-mentioned planning methods, so as to enable the vehicle to run stably and keep a safe distance from the vehicle in a lateral direction in a complex and narrow scenario. It should be understood that the vehicle can be an electric vehicle, for example, a pure electric vehicle, an extended range electric vehicle, a hybrid electric vehicle, a fuel cell vehicle, or a new energy vehicle. This is not particularly limited in the present application.

[0291] An embodiment of the present application further provides a computer system. Any one of the above planning methods (algorithms) can be executed on the computer system. The computing power of the computer should ensure that the update speed of any one of the above planning algorithms reaches a certain value, for example 30Hz. This allows path planning to be performed based on real-time environmental conditions, ensuring the safe and stable operation of the mobile device.

[0292] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terms used in the specification of this application are used only for the purpose of describing particular embodiments and are not intended to be limiting of this application.

[0293] It should be understood that the first, second, third, fourth, and various digital numbers herein are used merely for distinction purposes for ease of explanation and are not intended to limit the scope of the embodiments of the present application.

[0294] Those skilled in the art can recognize that the units and algorithm steps can be implemented by electronic hardware or a combination of computer software and electronic hardware in combination with the examples described in the embodiments disclosed herein. Whether a function is performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the functions described in each specific application, but the implementation should not be considered to go beyond the scope of this application.

[0295] For the sake of convenience and concise description, the detailed operation processes of the above systems, devices and units may be referred to the corresponding processes in the above method embodiments, which can be clearly understood by those skilled in the art, and the details will not be described again here.

[0296] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the described device embodiment is merely an example. For example, the division into units is merely a division of logical functions, and may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated into other systems, and some functions may be ignored or not performed. In addition, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electrical, mechanical, or other forms.

[0297] Units described as separate parts may or may not be physically separated, and parts shown as units may or may not be physical units, located in one location, or distributed across multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0298] In addition, the functional units in the embodiments of the present application may be integrated into a single processing unit, each unit may exist physically alone, or two or more units may be integrated into a single unit.

[0299] When a function is implemented in the form of a software functional unit and sold or used as an independent product, the function may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application, the part contributing to the prior art, or a part of the technical solution may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or some steps of the method described in the embodiments of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, and an optical disk.

[0300] The above description is merely a specific implementation of the present application and is not intended to limit the scope of protection of the present application. Any variations or replacements that can be easily understood by those skilled in the art within the technical scope disclosed in the present application shall be within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims.

Claims

1. 1. A method for planning an obstacle avoidance path for a mobile device, comprising: obtaining a distance map, the distance map including a plurality of first grids, each of the plurality of first grids being used to record a distance from the first grid to a nearest first grid occupied by an obstacle; determining a first lateral background cost potential field of a near-field range based on the distance map, the near-field range being a range that is a longitudinal distance from the mobile device less than or equal to a first threshold, the first lateral background cost potential field being a first repulsive field formed by obstacles at a lateral position of the mobile device, the first lateral background cost potential field including a target minimum point, background costs of two lateral sides of the target minimum point being characterized by monotonicity, the background costs representing near-field lateral collision costs caused by the obstacles at the lateral position of the near-field range relative to the mobile device; and determining a current obstacle avoidance path based on the first lateral background cost potential field; Determining a first lateral background cost potential field of a near-field range based on the distance map includes: determining a second lateral background cost potential field of the near-field range based on the distance map, the second lateral background cost potential field being a second repulsive field formed by the obstacles at the lateral position of the mobile device, the second lateral background cost potential field including at least one minimum point; determining the target minimum point from the at least one minimum point, the at least one minimum point including a plurality of local minimum points, and determining as the target minimum point a lowest local minimum point among the plurality of local minimum points for which no obstacle exists between the mobile device and each of the plurality of local minimum points; and performing a monotonicity process on the background costs of the two lateral sides of the target minimum point to generate the first lateral background cost potential field, the slope of the monotonicity process being greater than or equal to a second threshold. method.

2. There are no obstacles between the target minimum point and the mobile device; The method of claim 1.

3. Prior to obtaining the distance map, the method further comprises: obtaining an occupancy map, the occupancy map including a plurality of second grids, each of the plurality of second grids being used to record a probability that an obstacle is present in the second grid; Obtaining the distance map includes: obtaining the distance map based on the occupancy map. The method according to claim 1 or 2.

4. Obtaining the distance map based on the occupancy map includes: filtering out the second grid located in a first zone of the occupancy map, the first zone being located in front of the mobile device, and if there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone; and obtaining the distance map based on the occupancy map obtained after the filtering is performed; The method according to claim 3.

5. Prior to determining a second lateral background cost potential field of the near-field range based on the distance map, the method further comprises: generating a feature vector, the feature vector including a path start point and a sampling finish point; and generating a plurality of candidate paths based on a reference path, a historical path, and the feature vector; Determining a second lateral background cost potential field of the near-field range based on the distance map comprises: laterally shifting the reference path based on the sampling goal points to generate a plurality of virtual parallel paths; calculating a distance from each road point on the plurality of virtual parallel paths in the near-field range to a nearest obstacle based on the distance map; calculating a background cost for each of the virtual parallel paths based on a minimum of the distances along the virtual parallel paths; and generating the second lateral background cost potential field of the near-field range based on the background costs of the plurality of virtual parallel paths of the near-field range; The method of claim 1.

6. Prior to determining a current obstacle avoidance path based on the first lateral background cost potential field, the method further comprises: calculating, for each of the plurality of candidate paths based on the distance map, one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost; The collision cost is used to evaluate whether the mobile device will collide when moving along the candidate route, the constraint cost is used to evaluate whether each road point on the candidate route is within an obstacle avoidable range, the switching cost is used to evaluate the deviation between the candidate route and the historical route, the lateral shift cost is used to evaluate the degree of lateral shift of the candidate route from a road centerline, and the smoothness cost is used to evaluate the smoothness of the candidate route; Determining a current obstacle avoidance path based on the first lateral background cost potential field includes: calculating a final cost on each candidate path based on a background cost of the first lateral background cost potential field, or based on a background cost of the first lateral background cost potential field and one or more of the collision cost, the constraint cost, the switching cost, the lateral shift cost, or the smoothness cost; and determining the current obstacle avoidance path based on the final cost; The method according to claim 5.

7. The method further comprises: determining a final obstacle-avoidance path based on a reconciliation between the historical path and the current obstacle-avoidance path; The method according to claim 6.

8. Determining a final obstacle-avoidance path based on a reconciliation result between the historical path and the current obstacle-avoidance path includes: if a collision occurs on the historical path but no collision occurs on the current obstacle-avoidance path, using the current obstacle-avoidance path as the final obstacle-avoidance path; or if a collision occurs in both the historical path and the current obstacle-avoidance path, and an absolute value of a difference between a collision distance of the current obstacle-avoidance path and a collision distance of the historical path is equal to or greater than a third threshold, using the path with a larger collision distance among the current obstacle-avoidance path and the historical path as the final obstacle-avoidance path; or using the historical path as the final obstacle-avoidance path if a collision occurs in both the historical path and the current obstacle-avoidance path and an absolute value of a difference between a collision distance of the current obstacle-avoidance path and a collision distance of the historical path is less than a third threshold; or using the current obstacle-avoidance path as the final obstacle-avoidance path if the historical path is collision-free and a ratio of the final cost of the current obstacle-avoidance path to the cost of the historical path is less than or equal to a fourth threshold; or using the historical route as the final obstacle-avoidance route if no collision occurs on the historical route and a ratio of the final cost of the current obstacle-avoidance route to the cost of the historical route is greater than a fourth threshold; The collision distance is the shortest longitudinal distance of all road points in a collision state on each candidate route. The method of claim 7.

9. An apparatus for planning an obstacle avoidance path for a mobile device, the apparatus comprising: an acquisition module and a processing module; The acquisition module is configured to acquire a distance map, the distance map including a plurality of first grids, each of the plurality of first grids being used to record a distance from the first grid to a nearest first grid occupied by an obstacle; The processing module is configured to: determine a first lateral background cost potential field of a near-field range based on the distance map, the near-field range being a range of longitudinal distances from the mobile device less than or equal to a first threshold, the first lateral background cost potential field being a first repulsive field formed by obstacles at a lateral position of the mobile device, the first lateral background cost potential field including a target minimum point, background costs of two lateral sides of the target minimum point being characterized by monotonicity, the background cost representing a near-field lateral collision cost caused by the obstacles at the lateral position of the near-field range relative to the mobile device; and determine a current obstacle avoidance path based on the first lateral background cost potential field. determining a first lateral background cost potential field of the near-field range based on the distance map includes: determining a second lateral background cost potential field of the near-field range based on the distance map, the second lateral background cost potential field being a second repulsive field formed by the obstacle at the lateral position of the mobile device, the second lateral background cost potential field including at least one minimum point; determining the target minimum point from the at least one minimum point, the at least one minimum point including a plurality of local minimum points, and determining as the target minimum point a lowest local minimum point of the plurality of local minimum points where no obstacle exists between the mobile device and each of the plurality of local minimum points; and performing a monotonicity process on the background costs of the two lateral sides of the target minimum point to generate the first lateral background cost potential field, the slope of the monotonicity process being greater than or equal to a second threshold. Device.

10. There are no obstacles between the target minimum point and the mobile device; 10. The apparatus of claim 9.

11. Prior to acquiring the distance map, the acquisition module further comprises: configured to obtain an occupancy map, the occupancy map including a plurality of second grids, each of the plurality of second grids being used to record a probability that an obstacle is present in the second grid; The processing module further comprises: configured to obtain the distance map based on the occupancy map.

11. Apparatus according to claim 9 or 10.

12. Obtaining the distance map based on the occupancy map includes: filtering out the second grid located in a first zone of the occupancy map, the first zone being located in front of the mobile device, and if there is an obstacle in the first zone, the mobile device cannot avoid the obstacle in the first zone; and obtaining the distance map based on the occupancy map obtained after the filtering is performed.

12. The apparatus of claim 11.

13. Prior to determining a second lateral background cost potential field of the near-field range based on the distance map, the processing module further comprises: generating a feature vector, the feature vector including a path start point and a sampling finish point; generating a plurality of candidate paths based on a reference path, a historical path, and the feature vector; configured so that: Determining a second lateral background cost potential field of the near-field range based on the distance map comprises: shifting the reference path laterally based on the sampling goal points to generate a plurality of virtual parallel paths; calculating a distance from each road point on the plurality of virtual parallel paths in the near field range to a nearest obstacle based on the distance map; calculating a background cost of each of the virtual parallel paths based on a minimum value of the distance on the virtual parallel paths; and generating the second lateral background cost potential field in the near field range based on the background costs of the plurality of virtual parallel paths in the near field range.

10. The apparatus of claim 9.

14. Prior to determining a current obstacle avoidance path based on the first lateral background cost potential field, the processing module further comprises: configured to calculate, for each of the plurality of candidate routes based on the distance map, one or more of a collision cost, a constraint cost, a switching cost, a lateral shift cost, or a smoothness cost, wherein the collision cost is used to evaluate whether the mobile device will collide when moving along the candidate route, the constraint cost is used to evaluate whether each road point on the candidate route is within an obstacle avoidable range, the switching cost is used to evaluate a deviation between the candidate route and the historical route, the lateral shift cost is used to evaluate a degree of lateral shift of the candidate route from a road centerline, and the smoothness cost is used to evaluate the smoothness of the candidate route; Determining a current obstacle avoidance path based on the first lateral background cost potential field includes: calculating a final cost on each candidate path based on a background cost of the first lateral background cost potential field, or based on a background cost of the first lateral background cost potential field and one or more of the collision cost, the constraint cost, the switching cost, the lateral shift cost, or the smoothness cost; and determining the current obstacle avoidance path based on the final cost.

14. The apparatus of claim 13.

15. The processing module further comprises: determining a final obstacle-avoidance path based on a reconciliation result between the historical path and the current obstacle-avoidance path; 15. The apparatus of claim 14.

16. Determining a final obstacle-avoidance path based on a reconciliation result between the historical path and the current obstacle-avoidance path includes: if a collision occurs on the historical path but not on the current obstacle-avoidance path, using the current obstacle-avoidance path as the final obstacle-avoidance path; or if a collision occurs in both the historical path and the current obstacle-avoidance path, and an absolute value of a difference between a collision distance of the current obstacle-avoidance path and a collision distance of the historical path is equal to or greater than a third threshold, using the path with a larger collision distance among the current obstacle-avoidance path and the historical path as the final obstacle-avoidance path; or if a collision occurs in both the historical path and the current obstacle-avoidance path, and an absolute value of a difference between a collision distance of the current obstacle-avoidance path and a collision distance of the historical path is less than a third threshold, using the historical path as the final obstacle-avoidance path; or using the current obstacle-avoidance path as the final obstacle-avoidance path if the historical path is collision-free and a ratio of the final cost of the current obstacle-avoidance path to the cost of the historical path is less than or equal to a fourth threshold; or using the historical route as the final obstacle-avoidance route if no collision occurs on the historical route and a ratio of the final cost of the current obstacle-avoidance route to the cost of the historical route is greater than a fourth threshold; The collision distance is the shortest longitudinal distance of all road points in a collision state on each candidate route.

16. The apparatus of claim 15.

17. A vehicle comprising a module adapted to carry out the method according to any one of claims 1 to 8.

18. 9. A computer readable medium, the computer readable medium storing program code; the program code, when executed on a computer, enabling the computer to carry out the method according to any one of claims 1 to 8.

19. A chip comprising a memory, a processor and a data interface, the memory storing instructions for the processor to execute a method according to any one of claims 1 to 8, and the processor reading and executing the instructions stored in the memory via the data interface.

Citation Information

Patent Citations

  • Risk calculation device for vehicle

    JP2011253302A

  • Travel track determination device and automatic driving device

    JP2018203034A

  • Information processing device, movable body, information processing method and program

    JP2019006143A