Vehicle obstacle avoidance simulation method and device based on forward-looking perception, and electronic device
Patent Information
- Application Number
- CN202611130482.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-09
AI Technical Summary
[0006]本发明实施例提供了一种基于前瞻感知的车辆避障仿真方法及装置、电子设备,以至少解决相关技术中缺乏对于仿真环境中全部车辆的行驶过程及冲突判断过程,避障仿真准确度低的技术问题
[0019]根据本发明实施例的另一方面,还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的基于前瞻感知的车辆避障仿真方法的步骤。
Smart Images

Figure CN122883601A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle obstacle avoidance simulation technology or other related fields. Specifically, it relates to a vehicle obstacle avoidance simulation method, device, and electronic equipment based on forward-looking perception. Background Technology
[0002] With the rapid development of intelligent transportation systems and autonomous driving technology, high-fidelity traffic simulation has become a key means to verify autonomous driving algorithms, optimize traffic flow organization, and assess vehicle behavior safety. Especially in limited environment such as ports, logistics parks, and closed mining areas, unmanned vehicles (such as unmanned forklifts and intelligent heavy trucks) have high operating density and frequent interactions. How to achieve efficient, safe, and human-like vehicle obstacle avoidance is the core challenge in the construction of simulation models.
[0003] In related technologies, traffic simulation strategies mainly focus on macroscopic road network topology construction, basic car-following model simulation, or simplified interaction based on discrete grids. In terms of traffic simulation model construction and road network processing, existing technologies are mostly concentrated on macroscopic trajectory generation and automated road network processing. For example, patent application CN202110886479.3 discloses a traffic simulation model construction method, which focuses on describing the overall steps of trajectory generation, intersection judgment, and behavior control, but does not delve into the technical details of specific obstacle avoidance algorithms. Patent application CN202311627277.2 proposes a method for intersection traffic allocation and trajectory calculation, which achieves automatic trajectory calculation and turning type judgment, but its core lies in solving the problem of large workload for manual settings, without addressing real-time obstacle avoidance logic in complex dynamic environments. Patent application CN202311478954.9 mainly optimizes the lane-level state transition problem during lane changing, aiming to improve the realism of lane changing simulation, rather than comprehensive obstacle avoidance decision-making.
[0004] Therefore, the vehicle obstacle avoidance simulation strategies in related technologies only describe the macroscopic simulation steps or specific car-following logic. They lack a systematic simulation method for the driving process and conflict judgment process of all vehicles in the simulation environment, resulting in low accuracy of obstacle avoidance simulation.
[0005] There is currently no effective solution to the above problems. Summary of the Invention
[0006] This invention provides a vehicle obstacle avoidance simulation method, device, and electronic device based on forward-looking perception, to at least solve the technical problems in related technologies that lack a simulation environment for the driving process and conflict judgment process of all vehicles in the simulation environment, resulting in low accuracy of obstacle avoidance simulation.
[0007] According to one aspect of the present invention, a vehicle obstacle avoidance simulation method based on look-ahead perception is provided, comprising: when a target vehicle receives a movement command, calculating global path data from the starting point to the ending point of the current journey from the road network topology based on a constraint pathfinding strategy; generating a look-ahead guidance line based on the global path data and the current instantaneous speed of the target vehicle, wherein the look-ahead guidance line includes a look-ahead guidance point sequence composed of multiple look-ahead guidance points; performing preliminary screening of other vehicles in the simulation environment based on the current position information and current driving state of the target vehicle to determine a candidate conflict vehicle set; performing multi-dimensional collision detection on the target vehicle based on the look-ahead guidance line, the candidate conflict vehicle set, and the contour data of the target vehicle; performing deadlock detection on the target vehicle based on the collision detection results to generate a vehicle obstacle avoidance control command and an updated obstacle avoidance record table; and adjusting the driving speed of the target vehicle and updating the vehicle state based on the vehicle obstacle avoidance control command and the obstacle avoidance record table.
[0008] Optionally, when the target vehicle receives a movement command, the step of calculating the global path data from the starting point to the ending point of the current journey based on the constraint-based pathfinding strategy includes: when the target vehicle receives a movement command, performing a reset operation to clear the cumulative distance variable to zero and clear the historical path data; determining the set of key nodes that must be passed through in this journey according to the specified rules of vehicle driving; based on the constraint-based pathfinding strategy, using the road network topology as a weighted graph and the path physical distance or travel time as weights, calculating the shortest path between each key node; filling the path between key nodes to obtain lane data; and obtaining global path data containing the starting point, ending point, key nodes, lanes, and continuous distance offsets generated based on the road network geometry, wherein the continuous distance offsets are generated based on the target vehicle's current instantaneous speed, simulation step size, time multiplier, and historical path physical distance.
[0009] Optionally, the step of generating a forward guidance line based on the global path data and the current instantaneous speed of the target vehicle includes: substituting the obtained basic index constant, the current instantaneous speed of the target vehicle, the linear scaling factor, and the reference speed benchmark value into a speed-based linear function to calculate the sampling endpoint index, wherein the sampling endpoint index is used to determine the number of forward guidance points, the detection distance, and the farthest position of the guidance line; taking the current cumulative distance of the target vehicle as the starting point and using a fixed interval as the step size, sequentially intercepting spatial positions along the forward direction of the global path to obtain multiple forward guidance points that meet the number of forward guidance points; and generating the forward guidance line based on the multiple forward guidance points.
[0010] Optionally, the step of initially screening other vehicles in the simulation environment and determining the candidate conflict vehicle set based on the current location information and current driving state of the target vehicle includes: traversing the driving state and speed of all other vehicles in the simulation environment; based on the driving state and speed of all other vehicles, sequentially executing the following multiple exclusion conditions: a first exclusion logic to exclude the target vehicle itself; a second exclusion logic to exclude other vehicles whose spatial distance from the target vehicle exceeds a preset safety threshold; a third exclusion logic to exclude other vehicles that are not in a driving state; a fourth exclusion logic to exclude other vehicles located behind the target vehicle and traveling in the same direction; a fifth exclusion logic to exclude other vehicles existing in a temporary ignore list, wherein the temporary ignore list stores vehicle information to prevent deadlock or behavior jitter caused by vehicles avoiding each other; a sixth exclusion logic to exclude other vehicles with a higher passage priority than the target vehicle; and adding the target vehicle to the candidate conflict vehicle set when all exclusion conditions are not met.
[0011] Optionally, updating the temporary ignore list further includes: acquiring simulation vehicle parameters and real-time location data containing the target vehicle and other vehicles, and recording the simulation vehicle parameters and real-time location data into an initial state table; after the target vehicle completes an obstacle avoidance interaction with other vehicles, performing a two-way anti-re-entry check to determine whether the other vehicles are already in the target vehicle's list, or whether the target vehicle is already in the list of other vehicles; if the other vehicles are not in the target vehicle's list, or the target vehicle is not in the list of other vehicles, confirming that the two-way anti-re-entry check has passed; adding the other vehicles to the target vehicle's temporary ignore list, and synchronously triggering a timed clearing task, wherein the timed clearing task is used to automatically clear the temporary ignore list and restore the normal response logic to other vehicles when the obstacle avoidance deceleration timeout threshold is reached.
[0012] Optionally, based on the forward guidance line, the set of candidate conflict vehicles, and the contour data of the target vehicle, the step of performing multi-dimensional collision detection on the target vehicle includes: in a straight-line driving scenario, performing static space intrusion detection, transforming multiple collision points defined based on the contours of other vehicles into the local coordinate system of the target vehicle; determining whether a collision point intrudes into the safety detection zone of the target vehicle, and if a collision point intrudes into the safety detection zone of the target vehicle, determining that a first collision risk state has occurred and generating a deceleration command flag; if no collision point intrudes into the safety detection zone of the target vehicle, determining that it is statically safe; in a turning driving scenario, performing path-entity proximity detection, probing forward point by point along the forward guidance line of the target vehicle; for each forward guidance point on the forward guidance line, calculating the distance between the forward guidance point and all collision points of other vehicles; if the distance between any forward guidance point and any collision point is less than a preset distance threshold, determining that a second collision risk state has occurred and generating a deceleration command flag; if the distance between all forward guidance points and all collision points is greater than the preset distance threshold, determining that it is physically safe.
[0013] Optionally, the step of performing multi-dimensional collision detection on the target vehicle based on the look-ahead guideline, the candidate conflict vehicle set, and the contour data of the target vehicle further includes: performing path cross-detection using a strategy combining pre-pruning and time window truncation; using the time window truncation strategy, performing point-to-point matching based on the timestamps of each look-ahead guideline point; mapping the expected arrival time corresponding to the spatial positions of the two vector vehicles on the look-ahead guideline after point-to-point matching to determine spatial overlap; if the spatial overlap determination result indicates that the far guideline point of the target vehicle spatially overlaps with the near guideline point of other vehicles, it is determined that the target vehicle has arrived later, and a deceleration instruction sign is generated; if the spatial overlap determination result indicates that the far guideline point of other vehicles spatially overlaps with the near guideline point of the target vehicle, it is determined that other vehicles have arrived later, and a maintain normal driving instruction sign is generated; if the spatial overlap determination result indicates that other vehicles do not spatially overlap with the target vehicle, it is determined that there is no conflict.
[0014] Optionally, the step of performing deadlock detection on the target vehicle based on the collision detection results to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table further includes: if the collision detection results determine that the target vehicle needs to decelerate, extracting the other vehicles with the highest number of current avoidance attempts; checking whether the number of avoidance attempts by the target vehicle against the other vehicles exceeds a first threshold, and whether the number of avoidance attempts by the other vehicles against the target vehicle exceeds a second threshold; if both exceed the corresponding threshold, a two-way deadlock state is determined; in the case of a two-way deadlock state, a forced deceleration command is generated, wherein the forced deceleration command is used to control the other vehicles to enter a continuous deceleration state, while controlling the target vehicle to cancel deceleration; adding the other vehicles to a temporary ignore list and starting a timed clearing task, blocking all subsequent obstacle avoidance detections of the target vehicle and other vehicles during the obstacle avoidance deceleration time, and updating the obstacle avoidance record table.
[0015] Optionally, the step of performing multi-dimensional collision detection on the target vehicle based on the forward guidance line, the candidate conflict vehicle set, and the contour data of the target vehicle further includes: checking the current state of the target vehicle, and if the current state is an idle state or a loading / unloading state, directly skipping all obstacle avoidance logic and not performing collision detection; or, if the previous cycle determined that continuous deceleration was required, marking the target vehicle as a continuous deceleration state, and continuing to perform continuous deceleration operation when entering the current cycle until the deceleration target is reached.
[0016] According to another aspect of the present invention, a vehicle obstacle avoidance simulation device based on look-ahead perception is also provided, comprising: a global path calculation unit, configured to calculate global path data from the starting point to the ending point of the current journey based on a constraint pathfinding strategy when the target vehicle receives a movement command; a look-ahead guidance line generation unit, configured to generate a look-ahead guidance line based on the global path data and the current instantaneous speed of the target vehicle, wherein the look-ahead guidance line includes: a look-ahead guidance point sequence composed of multiple look-ahead guidance points; and a candidate conflict vehicle screening unit, configured to screen for conflict vehicles based on the current position information of the target vehicle. The system uses information and current driving status to perform preliminary screening of other vehicles in the simulation environment, determining a set of candidate conflict vehicles; a multi-dimensional collision detection unit performs multi-dimensional collision detection on the target vehicle based on the look-ahead guide line, the set of candidate conflict vehicles, and the contour data of the target vehicle; a deadlock detection unit performs deadlock detection on the target vehicle based on the collision detection results to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table; and a vehicle obstacle avoidance unit adjusts the driving speed of the target vehicle and updates the vehicle status based on the vehicle obstacle avoidance control commands and the obstacle avoidance record table.
[0017] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute any of the above-described vehicle obstacle avoidance simulation methods based on forward perception.
[0018] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the vehicle obstacle avoidance simulation method based on forward perception as described above.
[0019] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the vehicle obstacle avoidance simulation method based on forward perception as described in any one of the above embodiments.
[0020] In this disclosure, when the target vehicle receives a movement command, the global path data from the starting point to the ending point of the current journey is calculated from the road network topology based on a constraint-based pathfinding strategy. A look-ahead guidance line is generated based on the global path data and the target vehicle's current instantaneous speed. This look-ahead guidance line includes a sequence of look-ahead guidance points. Based on the target vehicle's current position and driving state, other vehicles in the simulation environment are preliminarily screened to determine a set of candidate conflict vehicles. Multi-dimensional collision detection is performed on the target vehicle based on the look-ahead guidance line, the set of candidate conflict vehicles, and the target vehicle's contour data. Based on the collision detection results, deadlock detection is performed on the target vehicle to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table. Based on the vehicle obstacle avoidance control commands and the obstacle avoidance record table, the target vehicle's speed is adjusted, and the vehicle state is updated.
[0021] In this disclosure, upon receiving a movement command, a global path data from the starting point to the destination of the current journey can be calculated from the road network topology based on a constrained pathfinding strategy. This ensures that the predicted path closely matches the actual physical displacement of the vehicle, providing a complete and continuous simulation of the vehicle's entire lifecycle within a limited space. This avoids simulation distortion caused by path reference drift. During the screening phase, based on the target vehicle's current position information and current driving state, other vehicles in the simulation environment are initially screened, quickly filtering out irrelevant vehicles (such as those that are too far away, not in a moving state, located behind, or have just completed a collision avoidance maneuver), thus focusing computational resources on fewer vehicles. The method of counting candidate conflicting vehicles not only solves the performance bottleneck caused by full-scale computation but also enables precise targeting of potential conflicting objects. This overcomes the shortcomings of existing technologies in efficiently handling vehicle interactions across all scenarios. Furthermore, by employing multi-dimensional collision detection and deadlock detection mechanisms, the method monitors the number of times vehicles avoid each other in real time, effectively solving the problem of traffic flow stagnation in high-density interaction scenarios. This makes the simulation results smoother, more human-like, and more consistent with real traffic patterns, significantly improving the accuracy and reliability of obstacle avoidance simulation. This addresses the technical problem of low accuracy in obstacle avoidance simulation due to the lack of data on the driving process and conflict judgment process of all vehicles in the simulation environment. Attached Figure Description
[0022] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0023] Figure 1 This is a flowchart of an optional vehicle obstacle avoidance simulation method based on forward perception according to an embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of an optional vehicle obstacle avoidance simulation device based on forward perception according to an embodiment of the present invention;
[0025] Figure 3 This is a hardware structure block diagram of an electronic device (or mobile device) that performs a vehicle obstacle avoidance simulation method based on forward perception according to an embodiment of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0029] Traffic simulation (TS) refers to the process of using computer technology to model and simulate vehicles, pedestrians, and road environments in a traffic system, in order to evaluate traffic conditions and validate autonomous driving algorithms.
[0030] Connected and Autonomous Vehicles (CAVs) are vehicles that possess perception, decision-making, and execution capabilities and can operate with little or no human intervention.
[0031] Hierarchical Decision Making (HDM) refers to breaking down complex obstacle avoidance tasks into different levels of processing steps, such as global path planning, potential conflict screening, and core obstacle avoidance verification, in order to improve computational efficiency and decision accuracy.
[0032] Benchmark Dynamic Update (BDU) refers to the real-time reset and calibration of accumulated distance and path status during vehicle operation to ensure that the predicted benchmark is synchronized with the actual physical displacement, thus solving the path drift problem.
[0033] Prospective Guide Point (PGP) refers to a virtual sampling point that is adaptively generated along a global path according to speed. It is used to construct a "virtual guide line" for the vehicle and simulate the dynamic visual perception characteristics of the driver.
[0034] A Temporary Ignore List (TIL) is a data structure that stores references to vehicle objects that have already engaged in obstacle avoidance interactions. It is used to block obstacle avoidance detection for specific vehicles within a specific time window to prevent deadlocks or behavioral jitter caused by repeated judgments.
[0035] Deadlock, or DL for short, refers to a state of endless standoff between vehicles in a multi-vehicle interaction scenario, where vehicles try to avoid each other, causing traffic flow to stagnate.
[0036] The Obstacle Avoidance Record Table (OART) is a data structure used to record the number of times a vehicle avoids other vehicles. It uses a dual-threshold detection mechanism to determine whether a vehicle is trapped in a two-way deadlock and triggers a forced release mechanism.
[0037] It should be noted that in this disclosure, customer information is collected and analyzed, and users are provided with corresponding operation entry points to choose whether to agree to or reject the automated decision results; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0038] The following embodiments of the present invention can be applied to various systems / applications / devices based on forward-looking perception for vehicle obstacle avoidance simulation. The present invention is applicable to traffic flow simulation scenarios in closed or semi-closed spaces, such as intelligent transportation system simulation, autonomous driving algorithm verification, and unmanned vehicle path planning and control. For example, it can be applied to high-density collaborative operation simulation scenarios of unmanned vehicles (such as AGVs, intelligent heavy trucks, and unmanned forklifts) in limited spaces (such as docks, logistics warehouses, and mining areas).
[0039] This invention employs a three-tiered progressive decision-making framework of "look-through-screening-verification" to significantly reduce computational overhead during simulation and improve the real-time performance of the algorithm while ensuring driving safety. Through a three-level judgment system that moves from near to far and from static to dynamic, it achieves a smoother, more human-like obstacle avoidance effect that more closely resembles real human driving behavior. By introducing temporary ignore lists and obstacle avoidance record lists, it effectively solves the traffic deadlock problem in multi-vehicle interaction scenarios, ensuring the continuity and efficiency of simulated traffic flow and compensating for the shortcomings of existing discrete models (such as cellular automata) in terms of accuracy and dynamic interaction processing.
[0040] The present invention will now be described in detail with reference to various embodiments.
[0041] Example 1
[0042] According to an embodiment of the present invention, an embodiment of a vehicle obstacle avoidance simulation method based on forward perception is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0043] Figure 1 This is a flowchart of an optional vehicle obstacle avoidance simulation method based on look-ahead perception according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0044] Step S101: When the target vehicle receives the movement instruction, the global path data from the starting point to the end point of this trip is calculated from the road network topology based on the constraint pathfinding strategy.
[0045] Optionally, when the target vehicle receives a movement command, the step of calculating the global path data from the starting point to the ending point of the current journey based on the constraint-based pathfinding strategy includes: when the target vehicle receives a movement command, performing a reset operation to clear the cumulative distance variable to zero and clear the historical path data; determining the set of key nodes that must be passed through in this journey according to the specified rules of vehicle driving; calculating the shortest path between each key node based on the constraint-based pathfinding strategy, using the road network topology as a weighted graph and the path physical distance or travel time as weights; filling the path between key nodes to obtain lane data; and obtaining global path data containing the starting point, ending point, key nodes, lanes, and continuous distance offsets generated based on the road network geometry, wherein the continuous distance offsets are generated based on the target vehicle's current instantaneous speed, simulation step size, time multiplier, and historical path physical distance.
[0046] When the target vehicle receives a movement command, the system first performs a reset operation, clearing the accumulated distance variable to zero and erasing historical path data. This eliminates interference from past driving conditions on the current path calculation, ensuring the independence and accuracy of path planning. Furthermore, based on specified rules governing vehicle movement, the system determines the set of key nodes that must be traversed during the current journey, narrowing the search range in complex road networks. By using preset rules (such as lane allocation rules for entering and exiting buffer zones), key intersections are identified, making path planning more targeted and logical, and avoiding computational redundancy caused by global searches.
[0047] It should be noted that, based on the constraint-based pathfinding strategy, the road network topology is used as a weighted graph, with physical distance or travel time as the weights, to calculate the shortest path between key nodes. This helps optimize vehicle travel routes while satisfying the constraints of key nodes, ensuring that path planning conforms to business rules and has efficiency advantages, and providing a reasonable geometric basis for subsequent forward-looking perception.
[0048] During the journey, the cumulative distance variable is continuously updated through time integration. This ensures that the predicted baseline is synchronized with the actual vehicle displacement. The specific calculation method is as follows:
[0049] ;
[0050] In the formula, This represents the vehicle's current instantaneous speed. This is the simulation step size (i.e., the time increment). This is the time scaling factor (used for displacement compensation and smoothing calibration in the model, e.g., a value of 2). Through this integral calculation, we can achieve... It can accurately reflect the actual physical offset of a vehicle as it dynamically rolls along a predetermined path.
[0051] Step S102: Generate a forward guidance line based on global path data and the current instantaneous speed of the target vehicle. The forward guidance line includes a sequence of forward guidance points consisting of multiple forward guidance points.
[0052] Optionally, the step of generating a look-ahead guideline based on global path data and the current instantaneous speed of the target vehicle includes: substituting the acquired basic index constant, the current instantaneous speed of the target vehicle, the linear scaling factor, and the reference speed baseline into a speed-based linear function to calculate the sampling endpoint index, where the sampling endpoint index is used to determine the number of look-ahead guide points, the detection distance, and the farthest position of the guideline; starting from the current cumulative distance of the target vehicle, and with a fixed interval as the step size, sequentially intercepting spatial positions along the forward direction of the global path to obtain multiple look-ahead guide points that meet the required number of look-ahead guide points; and generating a look-ahead guideline based on the multiple look-ahead guide points. By combining global path data with the current instantaneous speed, the look-ahead guideline can simulate the dynamic visual perception characteristics of a human driver, which helps to achieve obstacle avoidance decisions based on a global perspective.
[0053] The sampling endpoint index is used to determine the number of look-ahead points, the detection distance, and the farthest position of the guide line, enabling adaptive adjustment of the guide line length according to vehicle speed. When the vehicle is traveling at high speed, the linear function increases the number of sampling points to extend the detection distance, allowing for a longer reaction time for high-speed movement; when the vehicle is traveling at low speed, the number of sampling points automatically decreases, and the guide line shortens to near the vehicle body, thereby avoiding wasted computational resources and errors during low-speed steering. The sampling endpoint index of the guide line (i.e., the number of look-ahead points and the detection distance) is determined by the current speed, and its linear function expression is: In the formula, For the sampling endpoint index, Used as a basic index constant (e.g., a value of 3). It is a linear scaling factor (e.g., a value of 12). The vehicle's current instantaneous speed. Using a reference speed base value (e.g., 10), a linear function is used to make the guide line length increase linearly in proportion to the vehicle speed.
[0054] Furthermore, starting from the target vehicle's current cumulative distance and using a fixed interval as the step size, spatial positions are sequentially extracted along the global path in the forward direction to obtain multiple forward guidance points that meet the required number. The planar coordinates (X, Y) of each guidance point are precisely located on the calculated global path data. Continuous virtual guidance lines are formed through equidistant sampling, ensuring that the guidance lines closely match the actual driving trajectory. This allows for the determination of the sampling quantity. Then, the system uses the current cumulative distance Starting from a fixed interval Using a step size of 10 distance units (e.g., 10 distance units), spatial interception is performed sequentially along the global path in the forward direction. Specifically, for the ... The distance offset of each guide point on the path is calculated as follows: Based on this distance offset, the system locates the point on the global path data using a path geometry interception algorithm and extracts its planar coordinates (X,Y), thus forming a continuous virtual guide line. Generating a look-ahead guide line based on multiple look-ahead guide points helps form a coherent geometric curve or polyline sequence. This sequence not only contains spatial location information but also implicitly contains spatiotemporal logic based on the generation order (i.e., the nearest endpoint corresponds to the earlier arrival time, and the farthest endpoint corresponds to the later arrival time), thereby supporting subsequent complex spatiotemporal priority judgment logic.
[0055] Step S103: Based on the target vehicle's current location and driving status, other vehicles in the simulation environment are initially screened to determine the candidate conflict vehicle set. This step quickly identifies potential threats requiring obstacle avoidance judgment from a large number of vehicles in the simulation environment. Through rapid screening using multi-dimensional constraints, this step eliminates the vast majority of irrelevant vehicles, focusing computational resources on a small number of candidates with conflict risk. This optimizes the algorithm's computational efficiency while ensuring safety, achieving a lightweight algorithm.
[0056] Optionally, the step of initially screening other vehicles in the simulation environment and determining the candidate conflict vehicle set based on the target vehicle's current location information and current driving status includes: traversing the driving status and speed of all other vehicles in the simulation environment; based on the driving status and speed of all other vehicles, sequentially executing the following multiple exclusion conditions: first exclusion logic, excluding the target vehicle itself; second exclusion logic, excluding other vehicles whose spatial distance from the target vehicle exceeds a preset safety threshold; third exclusion logic, excluding other vehicles in a non-driving state; fourth exclusion logic, excluding other vehicles located behind the target vehicle and traveling in the same direction; fifth exclusion logic, excluding other vehicles existing in a temporary ignore list, wherein the temporary ignore list stores vehicle information to prevent deadlock or behavior jitter caused by vehicles avoiding each other; sixth exclusion logic, excluding other vehicles with a higher passage priority than the target vehicle; when all exclusion conditions are not met, the target vehicle is added to the candidate conflict vehicle set.
[0057] This process quickly identifies potential threats that require obstacle avoidance from a large number of vehicles in the simulation environment. Through rapid screening of multi-dimensional constraints, this step can eliminate the vast majority of irrelevant vehicles and focus computing resources on a few candidates with conflict risks. This optimizes the computational efficiency of the algorithm while ensuring safety, thus achieving algorithm lightweighting.
[0058] The first exclusion logic excludes the target vehicle itself, avoiding meaningless conflict judgments between the vehicle and itself, reducing redundant calculations, and improving the simplicity of logic execution. The second exclusion logic excludes other vehicles whose spatial distance from the target vehicle exceeds a preset safety threshold, eliminating distant vehicles that do not pose an immediate threat to the target vehicle at the current moment, preventing increased computational overhead or interference from irrelevant data due to excessive focus on distant vehicles. The third exclusion logic primarily excludes other vehicles that are not in motion. Vehicles that are idle, waiting for inspection, or engaged in straight-line loading / unloading, etc., without any intention to move, do not pose a dynamic conflict because they have no predictable movement trajectory, thus further narrowing the selection range. The fourth exclusion logic excludes other vehicles located behind the target vehicle and traveling in the same direction. This helps to determine, based on general traffic flow patterns, that the risk of a rear-end collision with a vehicle traveling in the same direction is usually the responsibility of the following vehicle, therefore the target vehicle does not need to actively make a yield judgment. It should be noted that the fifth exclusion logic excludes other vehicles that exist in the temporary ignore list. The temporary ignore list stores vehicle information to prevent deadlocks or behavioral jitters caused by vehicles avoiding each other. This helps to avoid repeatedly judging vehicles that have just completed the avoidance interaction, prevent traffic flow jitters caused by frequent state switching, maintain the smoothness of the simulation environment, and automatically resume response after the set timeout threshold is reached.
[0059] The sixth exclusion logic refers to excluding other vehicles with higher priority than the target vehicle, establishing a clear right-of-way logic. When the target vehicle has a lower priority, it will avoid the obstacle on its own without the target vehicle having to make an active avoidance judgment. This provides a logical basis for simulating specific scenarios (such as emergency vehicle priority or main road priority), meets the simulation requirements of actual traffic rules, and ensures that the vehicles entering the next stage of core obstacle avoidance verification are high-probability conflict objects that have been strictly screened, reducing the number of candidate vehicles to be verified.
[0060] The establishment of a temporary ignore list enables the system to make logical judgments based on current vehicle entity information rather than solely relying on IDs, improving the accuracy of data processing. Optionally, updating the temporary ignore list also includes: acquiring simulation vehicle parameters and real-time location data containing the target vehicle and other vehicles, and entering the simulation vehicle parameters and real-time location data into an initial state table; after the target vehicle completes an obstacle avoidance interaction with other vehicles, performing a two-way anti-re-entry check to determine whether other vehicles are already in the target vehicle's list, or whether the target vehicle is already in the list of other vehicles; if other vehicles are not in the target vehicle's list, or the target vehicle is not in the list of other vehicles, confirming that the two-way anti-re-entry check has passed; adding other vehicles to the target vehicle's temporary ignore list, and simultaneously triggering a timed clearing task, wherein the timed clearing task is used to automatically clear the temporary ignore list and restore normal response logic to other vehicles when the obstacle avoidance deceleration timeout threshold is reached.
[0061] Among them, the two-way anti-duplicate check refers to determining whether other vehicles are already in the target vehicle's list, or whether the target vehicle is already in other vehicles' lists, and identifying whether both parties have established an ignore mechanism to prevent list redundancy or logical confusion caused by repeatedly adding the same vehicle object. The two-way verification mechanism maintains the purity of the list data.
[0062] Optionally, adding other vehicles to the target vehicle's temporary ignore list and simultaneously triggering a timed clearing task means setting a reasonable time window after the vehicle completes the avoidance action to block the continuous detection of the vehicle, thereby preventing the vehicle from having to perform unnecessary avoidance interactions again after the distance is offset; the timed clearing mechanism can automatically reset the system state, allowing the vehicle to re-perceive the surrounding traffic environment and maintain the dynamic balance and continuity of traffic flow.
[0063] Step S104: Perform multi-dimensional collision detection on the target vehicle based on the forward guidance line, the set of candidate conflict vehicles, and the contour data of the target vehicle.
[0064] Optionally, the step of performing multi-dimensional collision detection on the target vehicle based on the look-ahead guide line, the set of candidate conflict vehicles, and the contour data of the target vehicle further includes: checking the current state of the target vehicle, and if the current state is idle or loading / unloading, directly skipping all obstacle avoidance logic and not performing collision detection; or, if the previous cycle determines that continuous deceleration is required, marking the target vehicle as in a continuous deceleration state, and continuing to perform continuous deceleration operation when entering the current cycle until the deceleration target is reached. This avoids meaningless calculations for vehicles in a non-driving state, as such vehicles currently have no intention to move and will not constitute a dynamic conflict; by skipping logic in advance, the computational load of the system can be significantly reduced, improving the efficiency of simulation operation. Furthermore, if the previous cycle determines that continuous deceleration is required, controlling the target vehicle to continuously decelerate helps maintain the continuity and smoothness of obstacle avoidance actions, preventing the vehicle from frequently switching states (such as sudden acceleration and deceleration) due to small fluctuations in a single detection result during deceleration, thereby simulating smoother acceleration and deceleration behavior that is more in line with human driving habits and improving the realism of the simulation.
[0065] Optionally, based on the look-ahead guideline, the set of candidate conflict vehicles, and the contour data of the target vehicle, the steps of performing multi-dimensional collision detection on the target vehicle include: in a straight-line driving scenario, performing static space intrusion detection, transforming multiple collision points defined based on the contours of other vehicles into the local coordinate system of the target vehicle; determining whether the collision points intrude into the target vehicle's safety detection zone, and if the collision points intrude into the target vehicle's safety detection zone, determining that a first collision risk state has occurred and generating a deceleration instruction flag; if no collision points intrude into the target vehicle's safety detection zone, determining that it is statically safe; in a turning driving scenario, performing path-entity proximity detection, probing forward point by point along the look-ahead guideline of the target vehicle; for each look-ahead guide point on the look-ahead guideline, calculating the distance between the look-ahead guide point and all collision points of other vehicles; if the distance between any look-ahead guide point and any collision point is less than a preset distance threshold, determining that a second collision risk state has occurred and generating a deceleration instruction flag; if the distance between all look-ahead guide points and all collision points is greater than the preset distance threshold, determining that it is physically safe.
[0066] Determining whether the collision point intrudes into the target vehicle's safety detection zone identifies the most imminent direct collision risk. The safety detection zone typically covers key areas such as the center, front, and rear of the vehicle. Once the collision point of the other vehicle is detected entering this zone, it indicates a very high probability of an immediate collision, triggering a deceleration command to facilitate immediate braking and avoid an accident. Confirming that there is no direct spatial overlap or intrusion at the current moment leads to the conclusion that there is no static conflict on the current straight segment, thus avoiding subsequent, more complex dynamic detection processes and saving computational resources.
[0067] For non-straight-line driving trajectories, refined risk prediction is performed because the instantaneous position of a vehicle during a turn separates from its future trajectory. Simple position detection cannot reflect the risk of trajectory intersection. By probing along the guide line, the potential approach trends between the vehicle's future path and other vehicle entities can be captured. For each forward-looking guide point on the forward-looking guide line, the distance between the guide point and all collision points of other vehicles is calculated. The spatial interval between key nodes on the vehicle's predicted path and surrounding obstacles is quantified. By calculating the distance point by point, the closest approach distance between the vehicle's path and other vehicle entities can be accurately depicted. It should be noted that if the distance between any forward-looking guide point and any collision point is less than a preset distance threshold, a second collision risk state is determined, and a deceleration command sign is generated. This helps to provide early warning of potential path conflicts. Even if no physical contact has occurred, if a point on the target vehicle's future path is too close to other vehicle entities, it indicates a risk of trajectory interference. Generating a deceleration command at this time helps the vehicle adjust its speed in advance, leaving space for avoidance or waiting, and avoiding collisions in complex scenarios such as turns. If it is confirmed that the vehicle maintains a sufficient safe distance from other vehicles and entities along its entire forward path, it is determined that there is no risk of approaching entities in the current path segment, thereby maintaining the current driving state or continuing to execute other logical judgments to avoid overreaction.
[0068] Optionally, the step of performing multi-dimensional collision detection on the target vehicle based on the look-ahead guideline, the set of candidate conflicting vehicles, and the contour data of the target vehicle further includes: performing path cross-detection using a strategy combining pre-pruning and time window truncation; using the time window truncation strategy, performing point-to-point matching based on the timestamps of each look-ahead guideline point; mapping the expected arrival time corresponding to the spatial positions of the two vector vehicles on the look-ahead guideline after point-to-point matching to determine spatial overlap; if the spatial overlap determination result indicates that the far guideline point of the target vehicle spatially overlaps with the near guideline point of other vehicles, it is determined that the target vehicle has arrived later, and a deceleration instruction sign is generated; if the spatial overlap determination result indicates that the far guideline point of other vehicles spatially overlaps with the near guideline point of the target vehicle, it is determined that other vehicles have arrived later, and a maintain normal driving instruction sign is generated; if the spatial overlap determination result indicates that other vehicles and the target vehicle do not spatially overlap, it is determined that there is no conflict.
[0069] Based on the predicted arrival time corresponding to the spatial position mapping of two vector vehicles on the forward guidance line after point-to-point matching, spatial overlap judgment is made, and a mapping relationship between spatial position and time dimension is established. By utilizing the sequential characteristics of the guidance points generated along the driving direction, spatial proximity is transformed into temporal sequence (i.e., the near endpoint corresponds to the earlier arrival time, and the far endpoint corresponds to the later arrival time). This makes subsequent conflict judgment not only based on the intersection of geometric positions, but also on the time sequence of arrival at the conflict area, thus improving the logical rigor of the judgment.
[0070] It should be noted that if the spatial overlap judgment indicates that the trajectories of the two vehicles intersect and the vehicle is expected to arrive at the intersection area later than the other vehicle, the target vehicle should actively slow down and give way. This aligns with the traffic interaction logic of "the later arrives yield to the earlier arrives," helping to reduce the potential collision risk caused by right-of-way disputes and maintain the orderliness of traffic flow. Conversely, if the spatial overlap judgment indicates that other vehicles are arriving later, a "keep driving" instruction sign is generated. This helps to grant the target vehicle priority when the vehicle is expected to arrive at the intersection area first. The target vehicle does not need to slow down and can maintain normal driving, while other vehicles arriving later perform the yielding action. This collaborative judgment mechanism helps optimize overall traffic efficiency and avoids traffic flow fluctuations caused by unnecessary deceleration. When it is confirmed that the guide lines of both vehicles do not intersect or overlap spatially, a conclusion of no path conflict can be quickly reached, thus skipping complex game theory judgments, maintaining the current driving state, simplifying the decision-making process, and improving the response speed of the simulation system.
[0071] Step S105: Based on the collision detection results, perform deadlock detection on the target vehicle to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table.
[0072] Optionally, the step of performing deadlock detection on the target vehicle based on the collision detection results to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table further includes: if the collision detection results determine that the target vehicle needs to decelerate, extracting the other vehicles with the highest number of current avoidance attempts; checking whether the number of times the target vehicle avoids other vehicles exceeds the first threshold, and whether the number of times the other vehicle avoids the target vehicle exceeds the second threshold; if both exceed the corresponding threshold, a two-way deadlock state is determined; in the case of a two-way deadlock state, a forced deceleration command is generated, wherein the forced deceleration command is used to control other vehicles to enter a continuous deceleration state, while controlling the target vehicle to cancel deceleration; adding other vehicles to a temporary ignore list and starting a timed clearing task, blocking all subsequent obstacle avoidance detections on the target vehicle and other vehicles during the obstacle avoidance deceleration time, and updating the obstacle avoidance record table.
[0073] By introducing a deadlock detection mechanism, vehicle pairs that are in a prolonged state of mutual avoidance can be identified, and mandatory intervention measures can be taken to break the deadlock, thereby restoring the normal flow of traffic and avoiding stagnation phenomena in the simulation that do not conform to realistic logic. If the collision detection results determine that the target vehicle needs to decelerate, other vehicles with the highest number of avoidance attempts can be extracted. Focusing on vehicle pairs that frequently interact can improve the targeting and efficiency of the detection, as the vehicles with the highest number of avoidance attempts are most likely to be in complex interaction dilemmas. Making them the main targets of deadlock detection can improve the targeting and efficiency of the detection and avoid unnecessary judgments on low-frequency interaction vehicles.
[0074] Furthermore, the system checks whether the number of times the target vehicle avoids other vehicles exceeds a first threshold, and whether the number of times other vehicles avoid the target vehicle exceeds a second threshold. This dual-threshold mechanism rigorously filters for deadlock states. Only when both vehicles exhibit high-frequency avoidance behaviors is a two-way deadlock identified. This effectively excludes normal, low-frequency avoidance interactions, prevents accidental triggering of the deadlock resolution mechanism, and ensures the continuity of normal traffic flow. It should be noted that if both exceed their respective thresholds, a two-way deadlock is determined. This helps to formally trigger the deadlock handling process when it is confirmed that both vehicles are unable to continue due to excessive caution or logical conflict, marking a switch from the normal obstacle avoidance mode to the deadlock resolution mode.
[0075] In the event of a two-way deadlock, a forced deceleration command is generated. The asymmetric deadlock is broken by a forced one-way yielding and the other-way passage asymmetric control strategy. The target vehicle is decelerated and can continue to move, thereby offsetting the positions of the two vehicles and creating physical space conditions for restoring traffic flow.
[0076] Furthermore, adding other vehicles to a temporary ignore list and initiating a timed clearing task, which blocks all subsequent obstacle avoidance detection of the target vehicle and other vehicles during the obstacle avoidance deceleration time, helps to completely cut off the perception interaction between the two vehicles during the forced release period. This prevents the target vehicle from triggering new avoidance logic due to detecting the other vehicle again during the driving process, thereby avoiding the re-formation of the deadlock that has just been resolved and maintaining the stability of the release state.
[0077] Step S106: Based on the vehicle obstacle avoidance control command and obstacle avoidance record table, adjust the driving speed of the target vehicle and update the vehicle status.
[0078] By comprehensively referencing vehicle obstacle avoidance control commands (such as deceleration, acceleration, or holding) and status information in the obstacle avoidance log, the instantaneous speed parameters of the target vehicle can be precisely modified, thereby completing closed-loop control from perception and decision-making to execution, ensuring that the behavior of the simulated vehicle conforms to the obstacle avoidance logic set by the algorithm. Then, based on the vehicle obstacle avoidance control commands and the obstacle avoidance log, the target vehicle's speed is adjusted, and the vehicle status is updated, which helps to achieve a smooth transition in vehicle behavior. For example, when the command is deceleration, linear or non-linear adjustments are made based on the difference between the current speed and the target speed to avoid sudden speed changes that cause unnatural simulated motion. Simultaneously, updating the vehicle status includes recording the current driving mode (such as normal driving, obstacle avoidance, forced deceleration, etc.) and related timing information, providing a basis for the status check in the next cycle.
[0079] Through the above steps, when the target vehicle receives a movement command, the global path data from the starting point to the destination of the current journey can be calculated from the road network topology based on the constraint pathfinding strategy. Based on the global path data and the target vehicle's current instantaneous speed, a look-ahead guidance line is generated, which includes a sequence of look-ahead guidance points. Based on the target vehicle's current position information and current driving state, other vehicles in the simulation environment are initially screened to determine a set of candidate conflict vehicles. Based on the look-ahead guidance line, the set of candidate conflict vehicles, and the target vehicle's contour data, multi-dimensional collision detection is performed on the target vehicle. Based on the collision detection results, deadlock detection is performed on the target vehicle to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table. Based on the vehicle obstacle avoidance control commands and the obstacle avoidance record table, the target vehicle's driving speed is adjusted, and the vehicle state is updated. In this embodiment, upon receiving a movement command, the global path data from the starting point to the destination of the current journey can be calculated from the road network topology based on a constrained pathfinding strategy. This ensures that the predicted path closely matches the actual physical displacement of the vehicle, providing a complete and continuous simulation of the vehicle's entire lifecycle within a limited space. This avoids simulation distortion caused by path reference drift. During the filtering phase, based on the target vehicle's current location information and current driving state, other vehicles in the simulation environment are initially filtered out, quickly eliminating irrelevant vehicles (such as those that are too far away, not in motion, located behind, or have just completed a avoidance maneuver). This focuses computational resources on fewer vehicles. The method of counting candidate conflicting vehicles not only solves the performance bottleneck caused by full-scale computation but also enables precise targeting of potential conflicting objects. This overcomes the shortcomings of existing technologies in efficiently handling vehicle interactions across all scenarios. Furthermore, by employing multi-dimensional collision detection and deadlock detection mechanisms, the method monitors the number of times vehicles avoid each other in real time, effectively solving the problem of traffic flow stagnation in high-density interaction scenarios. This makes the simulation results smoother, more human-like, and more consistent with real traffic patterns, significantly improving the accuracy and reliability of obstacle avoidance simulation. This addresses the technical problem of low accuracy in obstacle avoidance simulation due to the lack of data on the driving process and conflict judgment process of all vehicles in the simulation environment.
[0080] The following describes in detail another optional implementation method.
[0081] The present invention provides a method for simulating obstacle avoidance of unmanned vehicles when constructing a simulation model of the operation process in a limited space (such as a dock). Through a three-layer progressive decision-making framework of "look-ahead-screening-verification", the method optimizes computational efficiency and simulation effect while ensuring safety.
[0082] From a global perspective, the algorithm quickly identifies key objects through screening and then makes refined decisions about them. It is divided into three logically interconnected parts: The first part involves acquiring future movement paths, constructing a dynamic and forward-looking "spatiotemporal corridor" for vehicles in the simulation model, i.e., planning their travel trajectories in advance for a short period. The second part involves screening potential conflicting vehicles. While all unmanned vehicles within a limited area can be known during operational process simulations, performing conflict judgments on every vehicle in a large simulation environment would incur significant computational overhead. Therefore, this invention designs an efficient screening function that quickly eliminates the vast majority of "irrelevant vehicles" based on multi-dimensional constraints such as spatial distance between two vehicles, vehicle status, and traffic priority, focusing computational resources on a few potentially threatening "candidate conflicting vehicles," thus achieving a lightweight algorithm. The third part involves core obstacle avoidance judgment and verification. Based on the selected few candidate conflict vehicles, three core, progressive judgment algorithms will be executed to deeply analyze the spatiotemporal relationship between the vehicle and the target vehicle, accurately determine whether there is a risk of collision, and ultimately decide whether the vehicle or the target vehicle needs to take evasive measures such as slowing down to ensure driving safety. Each part will be explained in detail below.
[0083] Part 1: Algorithm for obtaining future movement paths.
[0084] 1. Dynamic Baseline Update: To ensure that the predicted path closely matches the actual vehicle motion, this invention employs a dual mechanism of "first locking the baseline, then integrating and following":
[0085] Baseline route locking (route reset): Whenever a vehicle receives a movement command, a reset operation can be performed immediately. First, the cumulative distance variable is cleared to zero, and the old route data is cleared. Then, the system calculates the global route data from the origin to the destination of this trip from the road network topology.
[0086] Specifically, the path planning adopts a constraint-based pathfinding strategy based on the road network topology: First, according to the specified rules for vehicle travel (such as lane allocation rules for entering and exiting buffer zones), several key nodes (intersections) that must be passed in this trip are determined; then, under the pre-constraint that these key nodes must be passed, the shortest path between key nodes is calculated using the road network topology as a weighted graph and the physical distance or travel time of the path as the weight, thereby filling the path between the key nodes and obtaining a complete sequence of nodes and lanes.
[0087] It should be noted that the calculated global path data not only includes the topological logic information of the starting point, ending point, and intersections and lanes passed through, but also includes continuous distance offsets generated based on the road network geometry.
[0088] Integral synchronization (cumulative value calculation): During driving, the cumulative distance variable is continuously updated by integrating over time. This ensures that the predicted baseline is synchronized with the actual vehicle displacement. The specific calculation method is as follows:
[0089] ;
[0090] In the formula, This represents the vehicle's current instantaneous speed. This is the simulation step size (i.e., the time increment). This is the time scaling factor (used for displacement compensation and smoothing calibration in the model, e.g., a value of 2). The result is calculated through this integral. It can accurately reflect the actual physical offset of a vehicle as it dynamically rolls along a predetermined path.
[0091] 2. Generate Forward Guiding Points: Construct a dynamic, forward-looking "virtual guideline" for the vehicle agent, representing its future movement intentions. This guideline consists of several guiding points, whose data is represented by the x-coordinate (X) and y-coordinate (Y). Its generation logic is not fixed but is directly linked to the vehicle's current speed through a linear function. The specific generation process includes the following two steps:
[0092] Step 1: Calculate the look-ahead length based on a linear function of velocity. The sampling endpoint index of the guide wire (i.e., the number of look-ahead points and the detection distance) is determined by the current velocity, and its linear function expression is: In the formula, For the sampling endpoint index, Used as a basic index constant (e.g., a value of 3). It is a linear scaling factor (e.g., a value of 12). The vehicle's current instantaneous speed. Using a reference speed base value (e.g., 10), a linear function is used to make the guide line length increase linearly in proportion to the vehicle speed.
[0093] Step 2: Generate guide points by sampling at equal intervals along the global path. (This involves determining the number of samples.) Then, the system uses the current cumulative distance Starting from a fixed interval Using a step size of 10 distance units (e.g., 10 distance units), spatial interception is performed sequentially along the global path in the forward direction. Specifically, for the ... The distance offset of each guide point on the path is calculated as follows: Based on this distance offset, the system locates the point on the global path data using a path geometry interception algorithm and extracts its planar coordinates (X,Y), thereby forming a continuous virtual guide line.
[0094] Mathematical Relationship: As mentioned above, the farthest position of the guide line (i.e., the number of forward sampling points) is defined and derived by a linear function, and its coverage is directly proportional to the speed: for every increase in speed, the number of points extending forward by the guide line increases by a fixed proportion. 1) The guide points are intercepted along the global path based on the distance offset. The offset calculation follows the principle of arc length integration of the path. The guide points strictly fall on the original path, naturally conforming to the road curvature, and will not cause spatial distortion at turns; 2) The continuous path adopts discrete sampling with a fixed interval. The geometric accuracy of the polyline approximation can be controlled by adjusting the sampling interval; 3) The application scenario of this invention is constrained driving based on a given road network. The guide line generation belongs to the dynamic forward detection of the road network, rather than the path-vehicle joint planning in free space. The vehicle trajectory is strictly limited by the road network, and there is no need to introduce dynamic steering angle constraints of the vehicle. Obstacle avoidance is achieved by adjusting the speed profile along the path.
[0095] By employing a linear growth algorithm, the number of sampling points can be significantly increased at high speeds, extending the detection distance of the guide line and allowing for longer reaction time and safer braking distance for vehicles moving at high speeds. At low speeds, the number of sampling points automatically decreases, and the guide line shortens to near the vehicle body. This not only avoids wasting computational resources but also prevents erroneous obstacle avoidance judgments due to interference from excessively distant path points during low-speed steering or precision maneuvers.
[0096] Part Two: Screening Rules for Potential Conflict Vehicles. The core objective is to establish an efficient "filter" to quickly identify candidates from all surrounding vehicles that truly require obstacle avoidance judgment by this vehicle. The judgment logic follows a core principle: if any condition that eliminates the need for judgment is met, the target is immediately excluded; only when all conditions are not met is it determined that further detailed obstacle avoidance verification is required.
[0097] This set of screening rules consists of the following aspects:
[0098] 1. Basic physics and state elimination.
[0099] Self-elimination: The vehicle does not need to make obstacle avoidance judgments with itself.
[0100] Too far away: First, exclude vehicles that are more than a preset safety threshold away from this vehicle, as these vehicles do not pose any immediate threat to this vehicle at the current moment.
[0101] State-independent: Exclude vehicles that are not in motion, such as those that are idle, waiting for inspection, or loading / unloading in a straight line. These vehicles do not currently have any intention to move or their movement trajectory is predictable, and therefore do not constitute a dynamic conflict.
[0102] 2. Directional exclusion.
[0103] The system determines whether other vehicles are behind it and identifies vehicles traveling in the same direction along the same road. The vehicle does not need to actively avoid vehicles traveling in the same direction behind it.
[0104] 3. Logic and priority exclusion.
[0105] Temporary ignore mechanism: Introduce a temporary ignore list to prevent deadlocks or behavioral jitters caused by vehicles avoiding each other.
[0106] Data Structure: The temporary ignore list is implemented using a dynamic object list, which stores object references of other vehicles that are ignored (i.e., directly stores the entities of other vehicles, rather than just their IDs). This allows the current vehicle to directly access the real-time status of the ignored objects in subsequent judgments.
[0107] Storage and Update Mechanism: After a vehicle completes a collision avoidance interaction with another vehicle, a two-way re-entry check is first performed (i.e., determining whether the other vehicle is already in the vehicle's list, or whether the vehicle is already in the other vehicle's list). If the check passes, the other vehicle object is added to the vehicle's temporary ignore list, and a timed clearing task is triggered simultaneously. This timed task has a timeout threshold that matches the obstacle avoidance deceleration time. Once the timeout is reached, the list will be automatically cleared, and the normal response logic for the relevant vehicle will be restored.
[0108] Priority principle: Establish a clear priority system. When the vehicle's priority is higher than that of other vehicles, the vehicle will not make a judgment to avoid the target vehicle; the vehicle with the lower priority will avoid it on its own.
[0109] The filtering function uses five dimensions—distance, state, direction, temporary interaction history, and priority—to quickly filter out the vast majority of irrelevant vehicles with extremely low computational cost. This ensures that only targets with genuine potential conflict risks can enter the next stage of core computation, thus achieving an effective balance between algorithm efficiency and security.
[0110] Part Three: Core Obstacle Avoidance Judgment and Verification Algorithm. This is the decision-making center of the entire obstacle avoidance algorithm. It receives the future movement path generated in Part One and the candidate conflict vehicles selected in Part Two. Through a multi-level and multi-dimensional cross-verification mechanism, it ultimately issues precise instructions to decelerate or accelerate. Specifically, based on the vehicle's future path, it predicts spatiotemporal conflicts with other vehicles through three progressive collision detection models, and finally combines a deadlock resolution mechanism to make the final trade-off.
[0111] First, decision-making and status checks.
[0112] Before making complex judgments, the vehicle's own status can be checked first. If the vehicle is in an idle or non-moving state such as loading or unloading, all obstacle avoidance logic can be skipped to avoid unnecessary calculations. If the previous cycle determined that continuous deceleration was required, it was marked as a continuous deceleration state, and this cycle directly inherits that decision to ensure the continuity of the avoidance action until the deceleration target is achieved.
[0113] Second, triple core judgment and verification.
[0114] When a judgment is required, each candidate conflict vehicle selected in the second part can be traversed, and the following three core checks can be performed in sequence.
[0115] Verification 1: Static space intrusion detection (which can be understood as collision box detection). This is used to detect the most direct and urgent collision risks.
[0116] For straight-line driving scenarios, the outlines of other vehicles are defined as a series of collision points, which are then transformed into the local coordinate system of the vehicle itself. It is then determined whether these points intrude into the vehicle's safety detection zone. The vehicle's safety detection zone can be set at the center, front, and rear of the vehicle, with a width equal to the vehicle's width and a length set according to the required detection precision. A longer length can be set for scenarios requiring more precise detection, but in practice, excessive precision can lead to overly easy triggering. If even one collision point intrudes into the safety detection zone, it is considered an extremely high risk, and the vehicle must immediately decelerate. This is the most basic and highest priority avoidance trigger condition.
[0117] Verification 2: Path-entity proximity detection (can be understood as guide line and vehicle body detection). This involves anticipating potential obstacles, especially in curves or complex road conditions, to detect whether the vehicle's future path will approach other vehicles too closely.
[0118] The system probes forward point by point along the vehicle's forward guidance line. For each point on the guidance line, it calculates the distance between that point and all collision points of other vehicles. If the distance between any guidance point and any collision point is less than a preset threshold, a potential conflict is considered to exist. At this point, a continuous deceleration command is triggered, and a temporary ignore mechanism is activated to ensure the smooth completion of the avoidance maneuver and prevent repeated judgments due to minor vibrations.
[0119] Verification 3: Path-to-path intersection detection (which can be understood as guide line to guide line detection). This enables more advanced cooperative obstacle avoidance by determining whether the future driving intentions of the two vehicles will result in trajectories intersecting.
[0120] A strategy combining pre-pruning and time window truncation is adopted: First, by making full use of the multi-level filtering mechanism such as distance, direction, and ignore list mentioned above, most irrelevant vehicles have been filtered out before entering this detection stage, greatly reducing the number of vehicle pairs that need to be matched; Second, during actual matching, time window truncation is adopted, and only guiding point pairs with similar timestamps are compared.
[0121] Optimization strategy: Relying on a multi-level filtering mechanism (including distance verification, state verification, direction verification, and pre-pruning rules such as temporary ignore lists) to filter all vehicles, ensuring that only a very small number of associated vehicles with a high probability of conflict enter this cross-detection stage, thereby keeping the actual computational scale of point-pair matching at a very low level and ensuring the real-time performance of the algorithm.
[0122] Space-time priority judgment: Since the points on the guide line are generated sequentially along the driving direction, the farthest point in space (farthest from the vehicle) corresponds to the later point in time (expected arrival time is later); the nearth point in space (closest to the vehicle) corresponds to the earlier point in time (expected arrival time is earlier).
[0123] Based on the spatiotemporal mapping relationship, the judgment logic is as follows: if the far end point (arriving later) of this vehicle coincides with the near end point (arriving earlier) of the other vehicle, it means that the other vehicle will arrive at the conflict area first, so this vehicle slows down to avoid it; conversely, if the far end point (arriving later) of the other vehicle coincides with the near end point (arriving earlier) of this vehicle, it means that this vehicle will arrive at the conflict area first, so the algorithm instructs the other vehicle to slow down, and this vehicle continues to drive normally.
[0124] III. Decision optimization and deadlock resolution mechanism.
[0125] After completing the triple check, the algorithm will not be executed immediately. A crucial deadlock detection and resolution logic is added to solve the deadlock problem commonly seen in simulations, so as to prevent two or more vehicles from getting into an infinite loop of static confrontation due to mutual avoidance.
[0126] Obstacle Avoidance Records and Threshold Detection: Maintain an obstacle avoidance record table to accumulate the number of times the vehicle avoids a specific other vehicle in real time. When the vehicle determines that it needs to decelerate, extract the conflicting vehicle with the highest number of avoidances. Only when the number of times the vehicle avoids a conflicting vehicle exceeds the first high threshold (e.g., 20 times), and the number of times that conflicting vehicle avoids the vehicle simultaneously exceeds the second high threshold (e.g., 30 times), is the two vehicles considered to be in a two-way deadlock state.
[0127] Forced Release and Linked Ignore: Once a deadlock is confirmed, the stalemate is forcibly broken by using a forced command to put the conflicting vehicle into a continuous forced deceleration state, while the main vehicle cancels its deceleration (releases it). Crucially, this triggers data linkage: the main vehicle immediately adds the conflicting vehicle to the aforementioned temporary ignore list, and within the set obstacle avoidance deceleration time, all obstacle avoidance detection by the main vehicle for the conflicting vehicle is blocked.
[0128] The aforementioned deadlock resolution mechanism enables anti-shake and state recovery. First, an extremely high trigger threshold (e.g., 20 / 30 times) ensures that it will only be triggered during a truly prolonged standoff. Second, the temporary ignore mechanism after triggering completely severs the connection between the two vehicles within the deceleration time window, preventing further interaction before the two vehicles break contact and pass each other. When the deceleration time ends, the temporary ignore list is automatically cleared, and both vehicles resume normal obstacle avoidance perception.
[0129] IV. Final Decision Implementation.
[0130] After all the above judgments and optimizations, the algorithm derives the final dece (whether to decelerate) flag.
[0131] If dece is true: the vehicle performs a deceleration operation, reducing the current speed and recording the deceleration time.
[0132] If DECE is false: the vehicle determines that the road ahead is safe, performs an acceleration operation until it returns to normal driving speed, and records the acceleration time.
[0133] Ultimately, by setting vehicle speed, decisions are translated into actual vehicle behavior, completing a full perception-decision-execution closed loop. This ensures that the vehicle can react to immediate dangers, anticipate future risks, and maintain efficient and smooth operation in complex traffic environments through collaborative and deadlock prevention logic.
[0134] Through the above implementation method, a three-layer progressive decision-making framework of look-ahead, screening, and verification can be introduced. First, a dynamic look-ahead guidance line is generated using a velocity-based linear function to provide a spatiotemporal reference for decision-making. Second, through a rapid screening rule that includes multiple dimensions such as distance, state, direction, temporary interaction history, and priority, the vast majority of irrelevant vehicles are eliminated from a large number of vehicles in the simulation environment, retaining only a few candidate vehicles with potential conflict risks. Finally, a refined triple verification is performed on the candidate vehicles. This layered processing mechanism focuses computational resources on high-risk objects, significantly reduces the computational overhead of pairwise comparisons between all vehicles, and significantly improves the algorithm's operating efficiency and real-time response capability in large-scale vehicle simulation scenarios.
[0135] The above implementation methods can improve the accuracy and realism of obstacle avoidance judgment. A three-level judgment system, from near to far and from static to dynamic, is adopted to achieve comprehensive defense from direct physical collision (static spatial intrusion detection) to path proximity (path-entity proximity detection) and then to trajectory game theory (path-path intersection detection). Among these, the spatial overlap judgment mechanism based on the guide point timestamp can accurately identify the order in which both parties arrive at the conflict area, thereby determining which party should yield. This makes the behavior of the simulated vehicle smoother and more human-like, reducing frequent starts and stops and trajectory jitter caused by oversensitivity or misjudgment.
[0136] The above implementation method effectively solves the traffic deadlock problem by introducing a deadlock resolution mechanism that combines a temporary ignore list mechanism with an obstacle avoidance record table. The temporary ignore list, through a timed clearing function, prevents behavioral instability caused by repeated avoidance interactions between vehicles in a short period. The obstacle avoidance record table, by monitoring whether the number of avoidance attempts in both directions exceeds a set threshold, accurately identifies a two-way deadlock state that has entered a prolonged standoff. Once a deadlock is confirmed, one vehicle is forced to continuously slow down while the other continues to pass, breaking the symmetrical deadlock within the window of the detection shield. This effectively avoids the problem of infinitely looping stillness or low traffic efficiency caused by mutual yielding in multi-vehicle environments, ensuring the continuous flow of traffic.
[0137] The above implementation methods can also optimize path planning and dynamic perception capabilities. A dual mechanism of first locking the baseline and then integrating and following dynamically updates the vehicle's future path, combined with a speed-based adaptive look-ahead guideline generation strategy. This allows the guideline length to increase linearly with vehicle speed, providing long-range detection at high speeds to allow sufficient reaction time, and shortening the detection range at low speeds to avoid interference. This enables the vehicle to adjust its perception range according to real-time speed, ensuring safety at high speeds while avoiding computational waste and misjudgments at low speeds, thus improving the adaptability and robustness of the simulation model under complex road conditions.
[0138] The following is a detailed description with reference to another embodiment.
[0139] Example 2
[0140] The vehicle obstacle avoidance simulation device based on forward perception provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.
[0141] Figure 2 This is a schematic diagram of an optional vehicle obstacle avoidance simulation device based on forward perception according to an embodiment of the present invention, such as... Figure 2 As shown, the vehicle obstacle avoidance simulation device based on forward perception may include: a global path calculation unit 21, a forward guidance line generation unit 22, a candidate conflict vehicle screening unit 23, a multi-dimensional collision detection unit 24, a deadlock detection unit 25, and a vehicle obstacle avoidance unit 26.
[0142] The global path calculation unit 21 is used to calculate the global path data from the starting point to the end point of the current journey from the road network topology based on the constraint pathfinding strategy when the target vehicle receives the movement command.
[0143] The forward guidance line generation unit 22 is used to generate a forward guidance line based on global path data and the current instantaneous speed of the target vehicle. The forward guidance line includes a sequence of forward guidance points composed of multiple forward guidance points.
[0144] The candidate conflict vehicle screening unit 23 is used to perform preliminary screening of other vehicles in the simulation environment based on the current location information and current driving status of the target vehicle, and to determine the candidate conflict vehicle set.
[0145] The multi-dimensional collision detection unit 24 is used to perform multi-dimensional collision detection on the target vehicle based on the forward guidance line, the set of candidate conflict vehicles, and the contour data of the target vehicle.
[0146] The deadlock detection unit 25 is used to perform deadlock detection on the target vehicle based on the collision detection results, so as to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table.
[0147] The vehicle obstacle avoidance unit 26 is used to adjust the driving speed of the target vehicle and update the vehicle status based on the vehicle obstacle avoidance control command and the obstacle avoidance record table.
[0148] The aforementioned vehicle obstacle avoidance simulation device based on forward perception can, through the global path calculation unit 21, calculate the global path data from the starting point to the ending point of the current journey based on the constraint pathfinding strategy when the target vehicle receives the movement command; through the forward guidance line generation unit 22, generate a forward guidance line based on the global path data and the target vehicle's current instantaneous speed, wherein the forward guidance line includes a sequence of forward guidance points composed of multiple forward guidance points; through the candidate conflict vehicle screening unit 23, perform preliminary screening of other vehicles in the simulation environment based on the target vehicle's current position information and current driving state to determine the candidate conflict vehicle set; through the multi-dimensional collision detection unit 24, perform multi-dimensional collision detection on the target vehicle based on the forward guidance line, the candidate conflict vehicle set, and the target vehicle's contour data; through the deadlock detection unit 25, perform deadlock detection on the target vehicle based on the collision detection results to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table; and through the vehicle obstacle avoidance unit 26, adjust the target vehicle's driving speed and update the vehicle state based on the vehicle obstacle avoidance control commands and the obstacle avoidance record table. In this embodiment, upon receiving a movement command, the global path data from the starting point to the destination of the current journey can be calculated from the road network topology based on a constrained pathfinding strategy. This ensures that the predicted path closely matches the actual physical displacement of the vehicle, providing a complete and continuous simulation of the vehicle's entire lifecycle within a limited space. This avoids simulation distortion caused by path reference drift. During the filtering phase, based on the target vehicle's current location information and current driving state, other vehicles in the simulation environment are initially filtered out, quickly eliminating irrelevant vehicles (such as those that are too far away, not in motion, located behind, or have just completed a avoidance maneuver). This focuses computational resources on fewer vehicles. The method of counting candidate conflicting vehicles not only solves the performance bottleneck caused by full-scale computation but also enables precise targeting of potential conflicting objects. This overcomes the shortcomings of existing technologies in efficiently handling vehicle interactions across all scenarios. Furthermore, by employing multi-dimensional collision detection and deadlock detection mechanisms, the method monitors the number of times vehicles avoid each other in real time, effectively solving the problem of traffic flow stagnation in high-density interaction scenarios. This makes the simulation results smoother, more human-like, and more consistent with real traffic patterns, significantly improving the accuracy and reliability of obstacle avoidance simulation. This addresses the technical problem of low accuracy in obstacle avoidance simulation due to the lack of data on the driving process and conflict judgment process of all vehicles in the simulation environment.
[0149] Optionally, the global path calculation unit includes: a reset module, used to perform a reset operation when the target vehicle receives a movement command, clearing the accumulated distance variable to zero and clearing the historical path data; determining the set of key nodes that must be passed through in this trip according to the specified rules of vehicle driving; a shortest path calculation module, used to calculate the shortest path between key nodes based on a constrained pathfinding strategy, using the road network topology as a weighted graph and the path physical distance or travel time as weights; a path filling module, used to fill the path between key nodes to obtain lane data; and a global path generation module, used to obtain global path data including the start point, end point, key nodes, lanes, and continuous distance offsets generated based on the road network geometry, wherein the continuous distance offsets are generated based on the target vehicle's current instantaneous speed, simulation step size, time multiplier, and historical path physical distance.
[0150] Optionally, the forward guidance line generation unit includes: a sampling endpoint index calculation module, used to substitute the acquired basic index constant, the current instantaneous speed of the target vehicle, the linear scaling factor, and the reference speed benchmark value into a speed-based linear function to calculate the sampling endpoint index, wherein the sampling endpoint index is used to determine the number of forward guidance points, the detection distance, and the farthest position of the guidance line; a guidance point interception module, used to intercept spatial positions sequentially along the global path forward direction with the current cumulative distance of the target vehicle as the starting point and a fixed interval as the step size, to obtain multiple forward guidance points that meet the number of forward guidance points; and a guidance line generation module, used to generate a forward guidance line based on the multiple forward guidance points.
[0151] Optionally, the candidate conflict vehicle screening unit includes: a vehicle driving state traversal module, used to traverse the driving state and speed of all other vehicles in the simulation environment; a vehicle exclusion module, used to execute the following exclusion conditions sequentially based on the driving state and speed of all other vehicles: a first exclusion logic to exclude the target vehicle itself; a second exclusion logic to exclude other vehicles whose spatial distance from the target vehicle exceeds a preset safety threshold; a third exclusion logic to exclude other vehicles in a non-driving state; a fourth exclusion logic to exclude other vehicles located behind the target vehicle and traveling in the same direction; a fifth exclusion logic to exclude other vehicles existing in a temporary ignore list, wherein the temporary ignore list stores vehicle information to prevent deadlock or behavior jitter caused by vehicles avoiding each other; and a sixth exclusion logic to exclude other vehicles with a higher passage priority than the target vehicle; and a candidate conflict vehicle screening module, used to add the target vehicle to the candidate conflict vehicle set when all exclusion conditions are not met.
[0152] Optionally, when updating the temporary ignore list, the vehicle obstacle avoidance simulation device based on forward perception further includes: a real-time position acquisition module, used to acquire simulation vehicle parameters and real-time position data including the target vehicle and other vehicles, and input the simulation vehicle parameters and real-time position data into an initial state table; a two-way anti-re-entry check module, used to perform a two-way anti-re-entry check after the target vehicle completes an obstacle avoidance interaction with other vehicles, to determine whether other vehicles are already in the target vehicle's list, or whether the target vehicle is already in the list of other vehicles; if other vehicles are not in the target vehicle's list, or the target vehicle is not in the list of other vehicles, the two-way anti-re-entry check is confirmed to have passed; and a timed clearing task triggering module, used to add other vehicles to the target vehicle's temporary ignore list and synchronously trigger a timed clearing task, wherein the timed clearing task is used to automatically clear the temporary ignore list and restore the normal response logic to other vehicles when the obstacle avoidance deceleration timeout threshold is reached.
[0153] Optionally, the multi-dimensional collision detection unit includes: a static space intrusion detection module, used to perform static space intrusion detection in straight-line driving scenarios, transforming multiple collision points defined based on the contours of other vehicles into the local coordinate system of the target vehicle; determining whether a collision point intrudes into the target vehicle's safety detection zone, and if a collision point intrudes into the target vehicle's safety detection zone, determining a first collision risk state and generating a deceleration command flag; if no collision point intrudes into the target vehicle's safety detection zone, determining it to be statically safe; and a path-entity proximity detection module, used to perform path-entity proximity detection in turning driving scenarios, probing forward point by point along the target vehicle's forward guidance line; for each forward guidance point on the forward guidance line, calculating the distance between the forward guidance point and all collision points of other vehicles; if the distance between any forward guidance point and any collision point is less than a preset distance threshold, determining a second collision risk state and generating a deceleration command flag; if the distance between all forward guidance points and all collision points is greater than the preset distance threshold, determining it to be physically safe.
[0154] Optionally, the multi-dimensional collision detection unit further includes: a path intersection detection execution module, used to perform path intersection detection using a strategy combining pre-pruning and time window truncation, employing a time window truncation strategy to perform point-to-point matching based on the timestamps of each forward guidance point on the forward guidance line; a spatial overlap judgment module, used to perform spatial overlap judgment based on the expected arrival time corresponding to the spatial position mapping of the two vector vehicles on the forward guidance line after point-to-point matching; a deceleration instruction flag generation module, used to determine that the target vehicle is arriving later if the spatial overlap judgment result indicates that the far-end guidance point of the target vehicle is spatially overlapped with the near-end guidance point of other vehicles, and generate a deceleration instruction flag; a normal driving instruction flag generation module, used to determine that other vehicles are arriving later if the spatial overlap judgment result indicates that the far-end guidance point of other vehicles is spatially overlapped with the near-end guidance point of the target vehicle, and generate a maintain normal driving instruction flag; and a conflict-free judgment module, used to determine that there is no conflict if the spatial overlap judgment result indicates that other vehicles and the target vehicle are not spatially overlapped.
[0155] Optionally, the deadlock detection unit includes: an obstacle avoidance count extraction module, used to extract other vehicles with the highest current obstacle avoidance count if the collision detection result determines that the target vehicle needs to decelerate; check whether the number of obstacle avoidances of the target vehicle to other vehicles exceeds the first threshold, and whether the number of obstacle avoidances of the other vehicle to the target vehicle exceeds the second threshold; if both exceed the corresponding threshold, a two-way deadlock state is determined; in the case of a two-way deadlock state, a forced deceleration command is generated, wherein the forced deceleration command is used to control other vehicles to enter a continuous deceleration state, and at the same time control the target vehicle to cancel deceleration; and a timed clearing task initiation module, used to add other vehicles to a temporary ignore list and start a timed clearing task, which blocks all subsequent obstacle avoidance detections of the target vehicle and other vehicles during the obstacle avoidance deceleration time, and updates the obstacle avoidance record table.
[0156] Optionally, the multi-dimensional collision detection unit may further include: an obstacle avoidance logic skipping module, which checks the current state of the target vehicle and skips all obstacle avoidance logic directly without performing collision detection if the current state is an idle state or a loading / unloading state; or a continuous deceleration module, which marks the target vehicle as a continuous deceleration state if the previous cycle determines that continuous deceleration is required, and continues to perform continuous deceleration operation when entering the current cycle until the deceleration target is reached.
[0157] The aforementioned vehicle obstacle avoidance simulation device based on forward perception may also include a processor and a memory. The aforementioned global path calculation unit 21, forward guidance line generation unit 22, candidate conflict vehicle screening unit 23, multi-dimensional collision detection unit 24, deadlock detection unit 25, vehicle obstacle avoidance unit 26, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0158] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and vehicle obstacle avoidance simulation based on forward-looking perception and hierarchical decision-making can be achieved by adjusting kernel parameters.
[0159] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0160] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute any one of the above-described vehicle obstacle avoidance simulation methods based on forward perception.
[0161] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the vehicle obstacle avoidance simulation method based on forward perception as described in any of the first embodiments above.
[0162] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle obstacle avoidance simulation method based on forward perception described in various embodiments of this application.
[0163] This application also provides a computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the vehicle obstacle avoidance simulation method based on forward perception described in various embodiments of this application.
[0164] Figure 3 This is a hardware structure block diagram of an electronic device (or mobile device) that performs a vehicle obstacle avoidance simulation method based on look-ahead perception according to an embodiment of the present invention. Figure 3 As shown, an electronic device may include one or more ( Figure 3The processor (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and memory 304 for storing data are illustrated using 302a, 302b, ..., 302n. In addition, it may include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 3 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown.
[0165] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0166] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0167] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0168] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0169] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0170] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0171] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A vehicle obstacle avoidance simulation method based on look-ahead perception, characterized in that, include: When the target vehicle receives a movement command, the global path data from the starting point to the destination of this trip is calculated from the road network topology based on the constraint pathfinding strategy. A forward guidance line is generated based on the global path data and the current instantaneous speed of the target vehicle, wherein the forward guidance line includes a sequence of forward guidance points consisting of multiple forward guidance points; Based on the target vehicle's current location information and current driving status, other vehicles in the simulation environment are initially screened to determine a set of candidate conflict vehicles. Based on the forward guidance line, the candidate conflict vehicle set, and the contour data of the target vehicle, multi-dimensional collision detection is performed on the target vehicle. Based on the collision detection results, deadlock detection is performed on the target vehicle to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table; Based on the vehicle obstacle avoidance control command and the obstacle avoidance record table, the driving speed of the target vehicle is adjusted and the vehicle status is updated.
2. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 1, characterized in that, When the target vehicle receives a movement command, the steps for calculating the global path data from the starting point to the destination of this trip based on the road network topology using a constraint-based pathfinding strategy include: When the target vehicle receives a movement instruction, a reset operation is performed, which clears the accumulated distance variable to zero and clears the historical path data; The set of key nodes that must be passed through in this journey is determined according to the specified rules for vehicle movement; Based on the constrained pathfinding strategy, using the road network topology as a weighted graph and the physical distance or travel time as the weight, the shortest path between each key node is calculated. Path filling is performed on the segments between key nodes to obtain lane data; Obtain global path data including start point, end point, key nodes, lanes, and continuous distance offsets generated based on road network geometry, wherein the continuous distance offsets are generated based on the target vehicle's current instantaneous speed, simulation step size, time multiplier, and historical path physical distance.
3. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 1, characterized in that, The step of generating a forward guidance line based on the global path data and the current instantaneous speed of the target vehicle includes: The obtained basic index constant, the current instantaneous speed of the target vehicle, the linear scaling factor, and the reference speed base value are substituted into the speed-based linear function to calculate the sampling endpoint index, which is used to determine the number of forward guidance points, the detection distance, and the farthest position of the guide line. Starting from the current cumulative distance of the target vehicle, and with a fixed interval as the step size, spatial positions are sequentially intercepted along the global path in the forward direction to obtain multiple forward guidance points that meet the required number of forward guidance points; Based on the multiple forward guidance points, the forward guidance line is generated.
4. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 1, characterized in that, Based on the target vehicle's current location information and current driving status, the steps of initially screening other vehicles in the simulation environment to determine the candidate conflict vehicle set include: Iterate through the driving status and speed of all other vehicles in the simulation environment; Based on the driving status and speed of all other vehicles, the following exclusion conditions are executed sequentially: First exclusion logic: exclude the target vehicle itself; Second exclusion logic: exclude other vehicles whose spatial distance from the target vehicle exceeds a preset safety threshold; Third exclusion logic: exclude other vehicles that are not in a driving state; Fourth exclusion logic: exclude other vehicles located behind the target vehicle and traveling in the same direction; Fifth exclusion logic: exclude other vehicles that exist in a temporary ignore list, wherein the temporary ignore list stores vehicle information to prevent deadlock or behavior jitter caused by vehicles avoiding each other; Sixth exclusion logic: exclude other vehicles with a higher passage priority than the target vehicle. If none of the exclusion conditions are met, the target vehicle is added to the candidate conflict vehicle set.
5. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 4, characterized in that, When updating the temporary ignore list, the following is also included: Acquire the simulated vehicle parameters and real-time location data, which include the target vehicle and other vehicles, and enter the simulated vehicle parameters and real-time location data into the initial state table; After the target vehicle completes a collision avoidance interaction with other vehicles, a two-way anti-re-entry check is performed to determine whether the other vehicles are already in the target vehicle's list, or whether the target vehicle is already in the list of other vehicles. If other vehicles are not in the target vehicle list, or the target vehicle is not in the other vehicles list, confirm that the two-way anti-re-entry check has passed. The other vehicles are added to the target vehicle's temporary ignore list, and a timed clearing task is triggered simultaneously. The timed clearing task is used to automatically clear the temporary ignore list and restore the normal response logic for other vehicles when the obstacle avoidance deceleration timeout threshold is reached.
6. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 1, characterized in that, Based on the forward guidance line, the candidate collision vehicle set, and the contour data of the target vehicle, the steps of performing multi-dimensional collision detection on the target vehicle include: In a straight-line driving scenario, static space intrusion detection is performed, transforming multiple collision points defined based on the contours of other vehicles into the local coordinate system of the target vehicle; it is determined whether the collision point intrudes into the target vehicle's safety detection zone, and if the collision point intrudes into the target vehicle's safety detection zone, a first collision risk state is determined, and a deceleration command flag is generated; if no collision point intrudes into the target vehicle's safety detection zone, it is determined to be statically safe. In a turning scenario, path-entity proximity detection is performed, probing forward point by point along the forward guidance line of the target vehicle; for each forward guidance point on the forward guidance line, the distance between the forward guidance point and all collision points of other vehicles is calculated; if the distance between any forward guidance point and any collision point is less than a preset distance threshold, a second collision risk state is determined, and a deceleration instruction sign is generated; if the distance between all forward guidance points and all collision points is greater than the preset distance threshold, the vehicle is determined to be safe.
7. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 6, characterized in that, The step of performing multi-dimensional collision detection on the target vehicle based on the forward guidance line, the candidate collision vehicle set, and the contour data of the target vehicle further includes: A strategy combining pre-pruning and time window truncation is used to perform path cross-detection. The time window truncation strategy is used to perform point-to-point matching based on the timestamps of each look-ahead guide point on the look-ahead guide line. Based on the estimated arrival time corresponding to the spatial position mapping of the two vector vehicles on the forward guidance line after point-to-point matching, spatial overlap judgment is performed. If the spatial overlap judgment result indicates that the far guide point of the target vehicle coincides with the near guide point of other vehicles, it is determined that the target vehicle has arrived later, and a deceleration instruction sign is generated. If the spatial overlap judgment result indicates that the far guide point of other vehicles and the near guide point of the target vehicle are spatially overlapped, it is determined that other vehicles have arrived later, and a keep normal driving instruction sign is generated. If the spatial overlap determination result indicates that other vehicles do not spatially overlap with the target vehicle, it is determined that there is no conflict.
8. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 1, characterized in that, The step of performing deadlock detection on the target vehicle based on the collision detection results to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table further includes: If the collision detection results determine that the target vehicle needs to decelerate, extract the other vehicles with the highest number of avoidance attempts. Check whether the number of times the target vehicle avoids other vehicles exceeds the first threshold, and whether the number of times other vehicles avoid the target vehicle exceeds the second threshold. If both exceed the corresponding number of times threshold, a bidirectional deadlock is determined to have occurred. If a two-way deadlock is detected, a forced deceleration command is generated. The forced deceleration command is used to control the other vehicles to enter a continuous deceleration state, while controlling the target vehicle to cancel the deceleration. Add the other vehicles to the temporary ignore list and start a timed clearing task. During the obstacle avoidance deceleration time, block all subsequent obstacle avoidance detection of the target vehicle and other vehicles, and update the obstacle avoidance record table.
9. The vehicle obstacle avoidance simulation method based on look-ahead perception according to claim 1, characterized in that, The step of performing multi-dimensional collision detection on the target vehicle based on the forward guidance line, the candidate collision vehicle set, and the contour data of the target vehicle further includes: Check the current state of the target vehicle, and if the current state is idle or loading / unloading, skip all obstacle avoidance logic and do not perform obstacle collision detection; or, If the previous cycle determined that continuous deceleration was required, the target vehicle was marked as being in a continuous deceleration state. When entering the current cycle, the continuous deceleration operation continued until the deceleration target was reached.
10. A vehicle obstacle avoidance simulation device based on forward-looking perception, characterized in that, include: The global path calculation unit is used to calculate the global path data from the starting point to the end point of the current journey from the road network topology based on the constraint pathfinding strategy when the target vehicle receives the movement command. A forward guidance line generation unit is used to generate a forward guidance line based on the global path data and the current instantaneous speed of the target vehicle, wherein the forward guidance line includes a forward guidance point sequence composed of multiple forward guidance points; The candidate conflict vehicle screening unit is used to perform preliminary screening of other vehicles in the simulation environment based on the current location information and current driving status of the target vehicle, and to determine the candidate conflict vehicle set. A multi-dimensional collision detection unit is used to perform multi-dimensional collision detection on the target vehicle based on the forward guidance line, the set of candidate conflict vehicles, and the contour data of the target vehicle. The deadlock detection unit is used to perform deadlock detection on the target vehicle based on the collision detection results, so as to generate vehicle obstacle avoidance control commands and an updated obstacle avoidance record table. The vehicle obstacle avoidance unit is used to adjust the driving speed of the target vehicle and update the vehicle status based on the vehicle obstacle avoidance control command and the obstacle avoidance record table.
11. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the vehicle obstacle avoidance simulation method based on forward perception as described in any one of claims 1 to 9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the vehicle obstacle avoidance simulation method based on forward perception as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Traffic simulation model construction method and device and storage medium
CN115906367A
Traffic simulation method and related equipment
CN117454519A
Intersection traffic distribution and trajectory calculation method for traffic simulation
CN117854271A