Method and system for managing and controlling agents in an autonomous driving simulation scenario, and electronic device
By verifying the effectiveness of the agent and the trajectory of risk preference coding parameters step by step in the autonomous driving simulation scenario, the problem of single agent behavior takeover trigger is solved, the controllability and reproducibility of simulation testing are realized, and the accuracy and credibility of the test are improved.
Patent Information
- Application Number
- CN202611635895.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-20
AI Technical Summary
In autonomous driving simulation scenarios, the triggering method for the intelligent agent's behavior takeover is singular, making it difficult to balance the controllability of simulation testing with the realism of interaction in real traffic scenarios. The behavior decisions of deep learning intelligent agents rely heavily on multiple candidate trajectories output by the prediction module, resulting in the inability to stably reproduce the simulation scenario and making it difficult to trace the test results.
By determining the target intelligent agent set, the validity, attributes, interaction relationships and collision risks of candidate intelligent agents are verified step by step. Based on the preset risk preference coding parameters, the target trajectory is selected from the candidate trajectory set to realize the movement of the intelligent agent.
It improves the accuracy and controllability of takeover triggering, enables the configurability and reproducibility of risk preferences, and enhances the standardization and credibility of simulation testing.
Smart Images

Figure CN123139801A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, and in particular to methods, systems and electronic devices for controlling intelligent agents in autonomous driving simulation scenarios. Background Technology
[0002] Autonomous driving simulation testing is a core technical means for autonomous driving algorithm iteration, performance verification, and scenario boundary testing. The realism of the agent's behavior, the controllability of risks, and the reproducibility of the test in the simulation scenario directly determine the effectiveness and credibility of autonomous driving simulation testing.
[0003] However, current autonomous driving simulation systems rely on a single triggering method for agent behavior takeover, primarily using simple spatial distance thresholds, collision risk thresholds, or manually specified times to achieve single-action triggering. This triggering mechanism has rigid logic and a single control dimension, making it unsuitable for complex and dynamic road traffic interaction scenarios. It struggles to simultaneously ensure the controllability of simulation testing and the realism of interaction in real traffic scenarios, resulting in weak coverage of extreme risk conditions. Furthermore, existing dynamic agents, such as deep learning agents (DL agents), rely heavily on multiple candidate trajectories output by prediction modules for behavioral decisions. The industry commonly uses a maximum probability trajectory selection strategy, which outputs behavioral trajectories that are mostly conventional average driving behaviors, making it difficult to meet the testing requirements of autonomous driving boundary scenarios and high-risk conditions. If risky behaviors are generated by manually randomly selecting candidate trajectories, a large number of random variables are introduced, leading to unstable reproduction of simulation scenarios and difficulty in tracking test results, significantly reducing the standardization and reliability of simulation testing.
[0004] There is no effective solution to the above-mentioned technical problems in the existing technology. Summary of the Invention
[0005] The present application provides a method, system, and electronic device for controlling intelligent agents in an autonomous driving simulation scenario to solve one or more of the above-mentioned technical problems.
[0006] In a first aspect, embodiments of this application provide a method for managing intelligent agents in an autonomous driving simulation scenario, comprising: determining a set of target intelligent agents currently in a takeover state, wherein the set of target intelligent agents includes a first subset of target intelligent agents specified by a user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents, wherein step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity verification and attribute verification, obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulation host vehicle, and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulation host vehicle; for any target intelligent agent in the set of target intelligent agents, determining a target trajectory from the corresponding candidate trajectory set based on a preset risk preference coding parameter, so that the target intelligent agent moves based on the target trajectory, wherein the preset risk preference coding parameter matches the test target in the current simulation scenario.
[0007] Secondly, embodiments of this application also provide a management and control system for intelligent agents in an autonomous driving simulation scenario, comprising: a takeover determination module, used to determine a set of target intelligent agents currently in a takeover-capable state, wherein the set of target intelligent agents includes a first subset of target intelligent agents specified by a user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents, wherein step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity verification and attribute verification, obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulation host vehicle, and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulation host vehicle; and a risk preference selection module, used to determine a target trajectory from a corresponding candidate trajectory set for any target intelligent agent in the set of target intelligent agents based on preset risk preference coding parameters, so that the target intelligent agent moves based on the target trajectory, wherein the preset risk preference coding parameters match the test target in the current simulation scenario.
[0008] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method described in any of the above-mentioned embodiments.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in any of the above-mentioned embodiments.
[0010] Fifthly, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the method described in any of the above-mentioned embodiments.
[0011] In this embodiment, a set of target agents currently in a takeover-ready state is determined. This set includes a first subset of target agents specified by the user and a second subset of target agents determined after step-by-step verification of candidate agents. The step-by-step verification of candidate agents includes at least: obtaining a first candidate agent from the candidate agents through validity and attribute verification; obtaining a second candidate agent by verifying the interaction relationship between the first candidate agent and the simulated host vehicle; and obtaining a third candidate agent by verifying the collision risk between the second candidate agent and the simulated host vehicle. For any target agent in the set, a target trajectory is determined from the corresponding candidate trajectory set based on preset risk preference coding parameters, so that the target agent moves based on the target trajectory. The preset risk preference coding parameters match the test target in the current simulation scenario. In other words, by combining user-demand-oriented triggering and automatic triggering after step-by-step verification based on different constraints during takeover determination, the technical problem of a single takeover triggering mechanism in related technologies, which struggles to balance controllability and realism, is solved. Furthermore, through the risk preference coding mechanism, different risk strategies no longer rely on human experience but can be directly reproduced through configuration, facilitating batch experiments and regression verification. This solves the technical problems of uncontrollable and unreproducible risk strategies of deep learning agents in related technologies, achieving the technical effect of significantly improving the accuracy and controllability of takeover triggering, as well as the technical effect of making risk preferences configurable, coded, and reproducible.
[0012] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0013] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments according to this application and should not be construed as limiting the scope of this application.
[0014] Figure 1 A flowchart of a control method for intelligent agents in an autonomous driving simulation scenario provided in an embodiment of this application is shown;
[0015] Figure 2A flowchart of another method for controlling an intelligent agent in an autonomous driving simulation scenario provided in this application embodiment is shown;
[0016] Figure 3 A flowchart of a takeover determination method provided in an embodiment of this application is shown;
[0017] Figure 4 A flowchart of a method for synchronizing the pose of a tractor unit and trailer unit assembly provided in an embodiment of this application is shown;
[0018] Figure 5 A flowchart of a trajectory selection and mode switching method based on risk preference provided in an embodiment of this application is shown;
[0019] Figure 6 This paper shows a block diagram of a control system for intelligent agents in an autonomous driving simulation scenario provided in an embodiment of this application.
[0020] Figure 7 A block diagram of an electronic device used to implement embodiments of this application is shown. Detailed Implementation
[0021] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the concept or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0022] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and all of them fall within the protection scope of the embodiments of this application.
[0023] In autonomous driving simulation scenarios, smart agents are typically virtual simulation objects built within a simulation environment to mimic real road traffic participants. They are capable of autonomously making driving decisions, updating trajectories, and engaging in traffic interactions based on simulation rules and environmental conditions. These agents mainly include virtual motor vehicles, non-motorized vehicles, and pedestrians. The control schemes for these smart agents are generally categorized as follows:
[0024] The first type is the pure playback scheme. This type of scheme directly replays the target vehicle's trajectory from the original collected data without intelligently controlling its behavior. The advantage of this scheme is that it directly reproduces the real vehicle record, but the disadvantages are also very obvious. For example, it cannot respond to changes in the vehicle's behavior during simulation. Once the vehicle's trajectory deviates from the original playback trajectory, the interaction between the vehicle and surrounding traffic participants becomes distorted. Furthermore, it cannot proactively construct risky behaviors.
[0025] The second category is rule-driven intelligent agents, such as Intelligent Driver Model Agent (IDM Agent) control schemes. This approach typically uses car-following models, speed limit models, and lane-changing rules to control certain target vehicles. Key features include: IDM-based longitudinal control, trajectory point or spline curve-based lateral tracking, and simple threshold-based takeover decisions, such as closest distance, relative speed, and relative orientation. While common in passenger car or single-rigid-body scenarios, this type of scheme has limitations in commercial vehicle simulations. Specifically, takeover decisions often fail to consider the trailer unit envelope, modeling only the tractor unit, resulting in coarse trailer unit processing; and it lacks the ability to control high-risk behaviors, making it difficult to cover more aggressive or conservative behavioral preferences.
[0026] The third category is the Deep Learning Agent (DL Agent) scheme based on predicted trajectories. This scheme treats the candidate trajectories generated by the prediction module as a distribution of future behaviors of traffic participants, and then selects one of them as the trajectory to be executed by the agent. Common implementation paths include: reading the joint prediction or multimodal prediction results and directly executing the trajectory with the highest probability, or simply sampling several candidate trajectories. This type of scheme is more flexible than the pure rule-based method, but it still has problems in the simulation of autonomous trucks. Specifically, these include: if only the maximum probability is taken, the "most common" rather than the "most dangerous" behavior is generated; if random sampling is performed, the results of multiple runs in the same scenario are unstable; the trajectory risk assessment dimensions are not uniform, and there is a lack of configurable preference encoding and mode switching mechanisms; and it is disconnected from the collision, takeover, and trailer update mechanisms of commercial vehicles with long bodies.
[0027] The fourth category is the simulation scheme for combined vehicles where the tractor and trailer are handled separately. While the relationship between the tractor unit and trailer unit can be recorded, this relationship is typically only retained at the display or perception layer, without being truly integrated into the agent takeover, envelope collision detection, and state update closed loop. Common processing methods include: using only one mapping of the tractor unit and trailer unit in the original perception message; passively following only when the trailer unit is explicitly present; allowing the trailer unit to continue moving along its original trajectory after the tractor unit takes over; or updating the trailer unit position with a fixed offset without time synchronization and articulation angle updates. These methods cannot meet the requirements of commercial vehicle autonomous driving simulation for the geometric and motion continuity of long combined vehicles.
[0028] The fifth category is manual configuration schemes in risk testing. To enhance scenario risk, some simulation tests employ the following methods: manually designating a specific vehicle to take over at a certain time; having testers select a "more dangerous" trajectory; or directly modifying the target vehicle's future route via scripts. While these methods can generate risk scenarios, they generally suffer from problems such as reliance on expert experience, poor reusability, difficulty in batch processing, and inconsistent results from different testers, failing to establish a unified risk preference coding and automated execution mechanism.
[0029] In view of the above problems, the technical solution of this application and how the technical solution of this application solves the aforementioned technical problems will be described in detail below with specific embodiments. The listed specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0030] The agent control method in autonomous driving simulation scenarios provided in this application is applicable to closed-loop simulation platforms for autonomous trucks; autonomous driving algorithm development and regression testing systems for heavy-duty trucks / tractors; re-simulation and problem reproduction scenario generation systems; simulation testing platforms for safety verification, strategy verification, and risk mining; and autonomous driving data playback, offline evaluation, and agent enhancement simulation systems for commercial vehicles. It is particularly suitable for the following scenarios: scenarios where the lead vehicle and a following heavy-duty truck are following, approaching, borrowing lanes, or cutting in; scenarios where a tractor unit with a trailer unit is turning, changing lanes, merging, or avoiding obstacles; reproducible test scenarios where "the same input yields the same risky behavior" in simulation; and scenarios where it is necessary to switch the behavioral styles of traffic participants between "maximum probability," "maximum risk," "no response," and "specified route."
[0031] Additionally, it should be noted that, in terms of engineering implementation, the embodiments of this application can be deployed between the simulation management module and the intelligent agent control module. By reading the original trajectory, the re-simulated trajectory, the master vehicle's planned trajectory, the predicted trajectory, and the head-mounted mapping information, the updated target traffic participant trajectory and visualization information can be output.
[0032] like Figure 1 The diagram shown is a flowchart of a method for controlling an intelligent agent in an autonomous driving simulation scenario according to an embodiment of this application. This method may include:
[0033] Step S101: Determine the set of target intelligent agents currently in a takeover state. The set of target intelligent agents includes a first subset of target intelligent agents specified by the user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents. The step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity verification and attribute verification; obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulated host vehicle; and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulated host vehicle.
[0034] Optionally, in this embodiment, after the simulation starts, the target trajectory queue, offline tracker output trajectory queue, re-simulation scene trajectory queue, original and simulated master vehicle pose, master vehicle planned trajectory, multimodal candidate trajectory output by the prediction module, mapping relationship between tractor unit and trailer unit, and agent configuration file and risk preference code are loaded sequentially from the original scene data recording package. The historical trajectory is organized into a trajectory mapping structure with target ID as key and time series as value, which is used to restore the historical trajectory by target ID, generate the agent's original path curve, find the continuous state before and after takeover, and perform time alignment in head-mounted consistency update. At the same time, a world snapshot containing the original master vehicle pose, the previous frame's original tracking data, the current simulated master vehicle pose, the current planned trajectory, the current predicted obstacle list, and the current manual driving or disengagement state is constructed to comprehensively describe the simulation state.
[0035] It is understood that the above validity verification may include: confirming that the candidate agent is a valid target state within the current perception period; confirming that the candidate agent identifier has a corresponding record in the historical trajectory data mapping relationship; confirming that the number of consecutive survival frames of the candidate agent is greater than or equal to a preset frame threshold, which, as an example, can be configured to be no less than 10 frames; and confirming that the current geometric envelope of the candidate agent does not have a spatial overlap with the envelope of the tractor unit and / or the envelope of the trailer unit, to prevent accidental takeover of targets that have already collided or are in an abnormal state. The above attribute verification may include: confirming that the candidate agent type belongs to a preset set of takeover types, which, as an example, may include: cars, trucks, tractor units, and truck trailers.
[0036] The above-mentioned interaction relationship verification includes at least one of the following logical thresholds: speed threshold judgment: if the speed value of the candidate agent is lower than the preset "no-need-to-pay speed threshold", the takeover judgment process for the candidate agent is terminated; distance threshold judgment: if the spatial distance between the candidate agent and the simulated master vehicle exceeds the preset "concern radius", the takeover judgment process is terminated; backward critical area judgment: according to the configuration parameters, candidate agents located in the area behind the master vehicle or in the extended area of the rear section of the tractor unit and trailer unit combination can be selectively considered; relative situation rationality judgment: if the candidate agent is on the driving path in front of the master vehicle and the master vehicle is in the position of bearing the risk of rear-end collision, the takeover priority is reduced or the takeover process is terminated; necessity judgment of trajectory difference amplification: calculate the difference between the simulated master vehicle and the original master vehicle in position coordinates and heading angle; if the difference is less than the preset threshold, it indicates that the current interaction environment has not significantly deviated from the playback data and no additional risk amplification is required; otherwise, if the difference is significant, the candidate agent is determined to have a high necessity for takeover. Furthermore, for candidate intelligent agents moving at high speeds, this embodiment configures some safety judgment thresholds with dynamic relaxation coefficients to enable early takeover response when the target is rapidly approaching.
[0037] The aforementioned collision risk verification may include: converting the master vehicle's planned trajectory data into a time-series queue of future poses; mapping the historical trajectory data of candidate agents to a spatial sequence of future road signs; incorporating the geometric envelopes of the tractor unit and trailer unit as a whole into the collision detection model; calculating the time-to-collision (TTC) or an equivalent risk assessment index between the master vehicle and the candidate agent; maintaining a non-takeover state when the calculated risk index is lower than a preset risk threshold; and adding the candidate agent to the takeover execution set when the risk index reaches or exceeds the preset risk threshold. Furthermore, embodiments of this application also support a multi-agent interaction risk extension function. When this function is enabled, newly entered candidate agents not only undergo risk assessment comparison with the master vehicle but also further perform interactive risk assessment with the currently controlled agent set in a takeover activation state, thereby enhancing the takeover coverage in complex group interaction scenarios.
[0038] Step S102: For any target agent in the target agent set, a target trajectory is determined from the corresponding candidate trajectory set based on a preset risk preference coding parameter, so that the target agent moves based on the target trajectory, wherein the preset risk preference coding parameter matches the test target in the current simulation scenario.
[0039] It is understood that, in the embodiments of this application, the aforementioned risk preference coding parameters are a set of parameters that quantitatively describe the behavioral patterns of an agent under different risk environments. For example, they include tolerance or avoidance tendencies towards scenarios such as overtaking, lane changing, approaching obstacles, and entering high-risk areas. This coding is typically preset in the system in the form of numerical values, weights, or rule sets. When the simulation starts, the test objective of the current simulation scenario (such as a specific driving task, traffic environment, weather conditions, road type, etc.) is read, and a matching parameter combination is selected from the risk preference coding library based on the scenario characteristics and test requirements. This ensures that the behavioral strategy of the tested agent is consistent with the scenario's risk level, thereby enabling targeted testing. For example, a stricter avoidance strategy can be used in high-risk scenarios, while more aggressive task execution behavior is allowed in low-risk scenarios. This matching process not only improves the realism and relevance of the simulation test but also controls the safety boundaries during the testing process, ensuring that the test results are repeatable and comparable, providing a reliable data foundation for subsequent algorithm optimization and performance evaluation.
[0040] Optionally, in this embodiment, obtaining the candidate trajectory set may include: for each agent that has been taken over or is to be taken over, reading its corresponding multimodal trajectory prediction result, and extracting at least one candidate trajectory from the prediction result. The candidate trajectory may be a joint prediction trajectory or a prediction trajectory generated by other specified models. For example, each candidate trajectory is associated with the following data fields: a trajectory probability score representing the confidence level of the trajectory occurrence; a trajectory label identifying the behavioral semantic category of the trajectory; a temporally sequenced motion state sequence, including the center point position coordinates, velocity values, heading angles, and angular velocity values at multiple sampling times; and reference line information, which may be provided in some trajectory generation modes.
[0041] Optionally, the candidate trajectories mentioned above can carry a "no response" label. When a trajectory with this label is selected, it indicates that the target agent does not perform any obvious avoidance or game-theoretic response behavior to the interaction actions of the simulated vehicle during the corresponding motion phase.
[0042] Through the aforementioned steps S101-S102, a set of target intelligent agents currently in a takeover-ready state is determined. This set includes a first subset of target intelligent agents specified by the user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents. The step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity and attribute verification; obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulated host vehicle; and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulated host vehicle. For any target intelligent agent in the set of target intelligent agents, a target trajectory is determined from the corresponding candidate trajectory set based on preset risk preference coding parameters, so that the target intelligent agent moves based on the target trajectory. The preset risk preference coding parameters match the test target in the current simulation scenario. In other words, by combining user-demand-oriented triggering and automatic triggering after step-by-step verification based on different constraints during takeover determination, the technical problem of a single takeover triggering mechanism in related technologies, which struggles to balance controllability and realism, is solved. Furthermore, through the risk preference coding mechanism, different risk strategies no longer rely on human experience but can be directly reproduced through configuration, facilitating batch experiments and regression verification. This solves the technical problems of uncontrollable and unreproducible risk strategies of deep learning agents in related technologies, achieving the technical effect of significantly improving the accuracy and controllability of takeover triggering, as well as the technical effect of making risk preferences configurable, coded, and reproducible.
[0043] In one possible implementation, the aforementioned preset risk preference coding parameters may include at least one of the following: trajectory selection mode identifier, secondary switching mode identifier, risk assessment mode identifier, takeover risk level mode identifier, sorting result (Top-K) selection sequence number, and trajectory reuse time window length.
[0044] Optionally, the trajectory selection modes mentioned above include, but are not limited to: maximum probability mode (selecting the candidate trajectory with the highest predicted probability score), risk ranking mode (selecting after ranking based on risk assessment results), designated route mode (selecting based on the simulated master vehicle's planned trajectory or other reference routes), and no-response mode (forcibly selecting candidate trajectories labeled "no-response"). It should be noted that in designated route mode, the planned point corresponding to a certain forward moment in the master vehicle's future planned trajectory can be used as the forward guidance reference point for the target agent, causing the target agent to move in the direction of the designated route. This function can be used to construct specific test scenarios such as driving over the line, merging into conflict, close encounters, or active conflict construction.
[0045] The aforementioned secondary switching modes are trajectory selection modes other than those represented by the trajectory selection mode identifier. The aforementioned risk assessment modes include, but are not limited to: hard collision time mode, soft collision time mode, trajectory curve divergence mode, weighted curve guidance mode, and combined risk mode.
[0046] To suppress frequent trajectory switching caused by inter-frame jitter in the prediction results, this application embodiment supports configuring a trajectory reuse time window length parameter. When the trajectory reuse time window is set to a valid value greater than zero, the previously selected candidate trajectory identifier must remain unchanged within the validity period of the time window. For example, the trajectory reuse time window parameter is set to 2 seconds. When "detour to the left" is selected as the current candidate trajectory at a certain moment, the previous trajectory identifier remains unchanged for the next 2 seconds, even if the output best candidate trajectory changes. This ensures that the vehicle continuously executes the same trajectory within a short period of time, avoiding frequent trajectory switching caused by slight changes in the prediction value, thereby improving the smoothness and stability of driving behavior.
[0047] In one possible implementation, when the trajectory selection mode represented by the above trajectory selection mode identifier is the risk ranking mode, the determination of the target trajectory from the corresponding candidate trajectory set based on the preset risk preference coding parameters may include: S11, determining a risk measurement index based on the risk evaluation mode identifier, wherein the risk measurement index includes at least one of the following: hard collision time, soft collision time, trajectory divergence degree, and weighted divergence degree.
[0048] Understandably, the aforementioned hard collision time involves frame-by-frame spatial intersection detection between the future pose sequence corresponding to the candidate trajectory and the tractor and trailer collision boxes of the master vehicle at future moments. The time value at which the first geometric intersection is detected is used as the risk metric; a smaller time value indicates a higher risk. The aforementioned soft collision time is calculated based on the relative velocity vector and relative displacement direction, applicable to situations where the candidate trajectory and the master vehicle trajectory have not yet geometrically intersected but exhibit a significant and rapid approach trend. The aforementioned trajectory divergence is calculated within a preset time window, indicating the degree of deviation between the spatial position of the candidate trajectory and the spatial position of the master vehicle's future planned trajectory. A greater deviation indicates a stronger potential interference of the candidate trajectory with the master vehicle's planned path. The aforementioned weighted divergence assigns a higher weight coefficient to sampling points closer to the current moment on the time axis when calculating trajectory divergence, allowing short-term risks to have a greater impact on the ranking results.
[0049] S12, Based on the risk metric, determine the risk assessment value of each candidate trajectory in the candidate trajectory set, and obtain the ranking result;
[0050] S13. Based on the sorting result, select the corresponding candidate trajectory from the sorting result as the target trajectory.
[0051] In steps S12-S13 above, the risk measurement results are sorted in ascending or descending order for the candidate trajectories, and the final execution trajectory is selected based on the preset Top-K index parameters. For example, if configured as "Top-1 + Risk Sorting", the candidate trajectory with the highest risk assessment value is selected; if configured as "Top-2 + Risk Sorting", the candidate trajectory with the second highest risk assessment value is selected; if configured as "Top-1 + Probability Sorting", the candidate trajectory with the highest predicted probability is selected; if configured as "No Response + Two-Stage Switching", the no-response trajectory is executed in the initial stage, and the system switches to another specified mode after the risk condition is triggered.
[0052] In steps S11 to S13 above, the risk assessment and ranking process of candidate trajectories is executed based on deterministic algorithm logic and deterministic threshold parameters. Therefore, under the same scenario input, the same risk preference encoding and the same initial conditions, the target object will exhibit a consistent and stable risk behavior style, thereby achieving high reproducibility of the test scenario, regressive verification capability of problem discovery, comparable evaluation between different risk strategies, and attributable analysis between simulation results and triggering causes.
[0053] Optionally, when the current simulation state is detected to meet the preset switching conditions, the above method further includes: S21, changing the trajectory selection mode represented by the trajectory selection mode identifier from the currently effective first mode to the second mode represented by the secondary switching mode identifier, wherein the preset switching conditions include at least one of the following situations: the collision time between the simulation master vehicle and the target intelligent agent is lower than a preset switching time threshold, the spatial distance between the simulation master vehicle and the target intelligent agent is lower than a preset switching distance threshold, or it is determined that the current trajectory selection mode does not meet the conditions for maintaining the stable operation of the simulation process.
[0054] Through the above step S21, a more challenging interactive scenario can be constructed in the simulation front end. For example, in the "no-response mode", the target agent does not perform active avoidance in the early stage to increase the risk exposure. After the interaction risk increases significantly, it automatically switches to a relatively controllable trajectory selection mode, such as switching to the risk Top-K mode, the probability Top-K mode or the specified route mode, thereby achieving a dynamic balance between risk construction and simulation stability.
[0055] Optionally, this application embodiment, for the combination of tractor unit and trailer unit in a commercial vehicle scenario, also proposes a consistency control mechanism for tractor unit and trailer unit. Optionally, in response to the target intelligent agent set including truck-type intelligent agents, and the target tractor unit of the truck-type intelligent agent being in a takeover state, the above method further includes:
[0056] S31, based on the identifier of the target tractor unit, look up the identifier of the corresponding trailer unit from the association mapping table to obtain the target trailer unit. The association mapping table stores the bidirectional association relationship between the tractor unit identifier and the trailer unit identifier.
[0057] In this embodiment, two association mapping tables can be maintained. The first mapping table stores the corresponding trailer identifiers, indexed by the tractor identifier; the second mapping table stores the corresponding tractor identifiers, indexed by the trailer identifiers. For updating these mapping tables, this embodiment also provides two update strategies. Specifically, one strategy is a soft update strategy, whereby, upon input of each data frame, an incremental update operation is performed on the association mapping table based on the tractor unit mapping relationship data obtained in the current frame. The other strategy is a hard update strategy, whereby, when a preset mapping change condition is detected, the association mapping table is rebuilt. This mapping change condition includes at least one of the following: the trailer unit is re-matched to a different tractor unit, the existing mapping relationship changes, or either side of the mapping relationship is in a takeover state.
[0058] Through the aforementioned bidirectional association maintenance mechanism, even if there are fluctuations in the identification results of the tractor unit and trailer unit, or the trailer unit is briefly lost and then reappears, a relatively stable association relationship of the combined unit can still be maintained.
[0059] S32, the target trailer unit is included in the target intelligent agent set, and after determining the trajectory of the target tractor unit, the pose synchronization update operation of the target trailer unit is performed.
[0060] Understandably, when a tractor unit is determined to meet the takeover conditions and is added to the target agent set, the association mapping table can be further queried. If there is a valid associated trailer unit identifier for the tractor unit in the current frame data or the internally maintained association mapping table, the trailer unit corresponding to the trailer identifier will be automatically added to the target agent set.
[0061] Through the linkage takeover mechanism in S31~S32 above, the discontinuous movement phenomenon that occurs when the tractor unit is controlled according to the intelligent agent logic, but the trailer unit still moves according to the original playback trajectory can be avoided, thereby ensuring the consistency of behavior of the tractor unit and trailer unit combination as a whole controlled object.
[0062] This application does not determine the trailer unit pose by simply fixing the geometric offset of the trailer unit relative to the tractor unit, but instead employs a time synchronization recovery method based on historical trajectories from the same source. Optionally, the above-mentioned pose synchronization update operation for the target trailer unit may include:
[0063] S41, Based on the arc length parameter corresponding to the target tractor unit's movement on the historical trajectory curve, determine the timestamp corresponding to the arc length parameter to obtain the first reference time;
[0064] S42, on the timeline formed by the historical trajectory data of the target trailer unit, locate the same source road marker that is close to the first reference time;
[0065] S43, if the first reference time is located between the timestamps of two adjacent road signs in the historical trajectory data of the target trailer unit, then perform time interpolation calculation based on the pose data corresponding to the two adjacent road signs to obtain the interpolation calculation result;
[0066] S44, use the interpolation result as the pose of the target trailer unit that is synchronously aligned with the state of the target tractor unit on the time axis.
[0067] Through the above steps S41~S44, the relative motion relationship between the tractor unit and trailer unit assembly in the original recorded data can be reproduced and maintained to the greatest extent possible during the simulation process.
[0068] Optionally, the above-mentioned pose synchronization update operation for the target trailer unit further includes: S51, determining the pose of the target trailer unit based on the following pose calculation operation of the articulated kinematic model.
[0069] It is understood that the embodiments of this application use the current position of the tractor unit, the heading angle of the tractor unit, the heading angle of the trailer unit at the previous moment, and the distance from the tractor unit to the reference point of the trailer unit to update the new heading angle of the trailer unit, which can be expressed as the following formula (1):
[0070] (Formula 1)
[0071] in, This refers to the heading angle of the trailer at the previous moment. This is the current heading angle of the tractor unit; This is the current speed of the tractor unit; Define the geometry parameters for trailer connection; This is the time increment.
[0072] Then, the reference pose of the trailer unit and the center position of the trailer unit envelope are derived from the pose of the tractor unit. In this way, the trailer unit can be kept rotating continuously with the tractor unit in the DL Agent trajectory update scenario, avoiding attitude jumps.
[0073] When conducting collision risk assessment, this embodiment no longer uses only the tractor unit as the assessment object, but incorporates the complete geometric envelope of the tractor unit and trailer unit assembly into the calculation model. Optionally, in response to the simulation master vehicle being a combination of a tractor unit and a trailer unit, the interaction relationship or the collision risk can be determined in the following ways:
[0074] S61, Construct collision detection elements, wherein the collision detection elements include: the collision box of the tractor unit of the simulation master vehicle, the collision box of the trailer unit of the simulation master vehicle, and the collision box of the candidate intelligent agent.
[0075] S62, determine the interaction relationship or the collision risk based on the collision detection element.
[0076] It is understandable that in the above steps S61~S62, when executing the following judgment logic, a comprehensive calculation is performed based on the collision box of the tractor unit and the collision box of the trailer unit: whether the candidate intelligent agent has a collision risk with the main vehicle, whether the candidate intelligent agent is located in the critical area behind the main vehicle, and whether the candidate intelligent agent forms an approaching interaction relationship with the main vehicle.
[0077] Through the above steps S61~S62, the spatial judgment accuracy and risk identification accuracy in long vehicle body combination scenarios are significantly improved.
[0078] When an agent in a takeover active state experiences an abnormal loss of the current perception frame, the above method further includes:
[0079] S71, in response to the fact that the predicted trajectory data or historical trajectory data associated with the agent in the takeover activation state has not terminated, the state data of the agent in the takeover activation state is supplemented based on the historically retained motion state information.
[0080] Through the above step S71, if the target of the tractor unit that has been taken over disappears unexpectedly in the current frame, but it is determined that its trajectory has not ended, the target state can be temporarily supplemented by the historical reserved trajectory to avoid the assembly from suddenly interrupting in the simulation screen and collision detection.
[0081] The embodiments of this application will be illustrated below with specific examples.
[0082] This example provides a method for managing intelligent agents in a commercial vehicle simulation scenario. It should be noted that this method can be summarized into the following steps; however, it should be understood that the division and order of these steps are merely illustrative and can be adjusted or combined according to specific needs during actual implementation. Figure 2 As shown, the control method includes:
[0083] Step S201, Data Loading and Initialization. Load the multi-source input data required to execute this method. The multi-source input data includes at least: the original playback data package (Bag), the re-simulation data package, the offline multi-target tracking data package, the main vehicle planned trajectory data, the target object predicted trajectory data, and various configuration parameters required for system operation.
[0084] Step S202: Historical trajectory mapping construction and snapshot generation. Using target identifiers as the organizational dimension, a historical trajectory data mapping structure for each target object is constructed. Simultaneously, based on the perception information at the current simulation moment, an instantaneous world snapshot representing the current traffic environment state is generated.
[0085] Step S203, Determining the Set of Takeover Targets. Based on the takeover target information specified by the user through the interactive interface, the trigger signals automatically generated based on the risk status, and the preset multi-threshold joint screening rules, the target objects existing in the current scenario are screened to determine the set of target objects to be taken over. See details. Figure 3 Steps S301~S310 are shown.
[0086] Step S204: Update the bidirectional mapping between the tractor unit and trailer unit, and incorporate the combined envelope. Update and maintain the bidirectional association mapping table between the tractor unit identifier and the trailer unit identifier. When performing interaction relationship judgment and collision risk assessment, the geometric envelopes of the main vehicle tractor unit and the main vehicle trailer unit are treated as a whole and jointly participate in the calculation.
[0087] Step S205: Controlled agent instance generation. For each target object in the set of targets to be taken over determined in step S203, a corresponding controlled agent instance is generated. Specifically, when a candidate agent is configured to adopt a learning-driven agent, the multimodal candidate trajectory set of the candidate agent is read from the prediction data; when a candidate agent is configured to adopt a rule-driven agent, the trajectory reference curve of the candidate agent is read from the historical trajectory data mapping.
[0088] Step S206: Synchronous pose update of the tractor unit and trailer unit assembly. For target agents identified as tractor units and trailer unit assemblies, a pose synchronization update operation is performed. This update operation can employ a time-synchronous interpolation method based on shared historical trajectories, or a following pose calculation method based on articulated kinematics models, to ensure the pose continuity and motion rationality of the trailer unit during simulation. See details. Figure 4 The steps S401~S410 are shown.
[0089] Step S207: Trajectory selection and mode switching based on risk preference. For the target object using a learning-driven agent path, a risk assessment and ranking operation is performed on the candidate trajectory set based on preset risk preference encoding parameters, and one candidate trajectory is selected as the current execution trajectory. When the simulation state meets the preset stage switching conditions, the trajectory selection mode is automatically changed to adapt to the changed risk scenario. See details. Figure 5 The steps S501 to S507 are shown.
[0090] Step S208: Simulation State Output and Closed-Loop Iteration. Output the target tracking frame update data and the visualized representation of the agent's behavioral state, processed in this example. This output data is fed back to the main simulation loop as the basic input for the next simulation cycle, thus achieving continuous closed-loop operation of the simulation system.
[0091] In summary, compared with existing technologies, this application has at least the following beneficial effects: Firstly, it significantly improves the accuracy and controllability of takeover triggering. This example unifies user-specified triggering and automatic risk triggering into a single framework, and uses joint screening based on conditions such as survival conditions, target type, speed, distance, backward region, trajectory relationship, and collision time to avoid misjudgments and omissions caused by traditional single-condition triggering. Secondly, it significantly improves the consistency of simulation of the commercial vehicle tractor unit and trailer unit assembly. Through bidirectional mapping maintenance, assembly envelope collision judgment, trailer unit linkage takeover, time synchronization update, and articulated kinematic update, this application can effectively ensure the structural consistency and motion continuity between the tractor unit and trailer unit, especially suitable for scenarios involving long vehicle bodies turning, changing lanes, merging, and following other vehicles. Thirdly, it improves the realism of collision risk assessment. Traditional solutions often only consider the main vehicle body or the target vehicle body, while this application incorporates the overall space occupied by the tractor unit and trailer unit into the risk calculation, which can more realistically depict the actual risk boundary of the truck assembly on the road. Fourthly, it achieves configurable, coded, and reproducible risk preferences. This application employs a risk preference coding mechanism to uniformly encode trajectory patterns, risk patterns, Top-K indices, and reuse time. This eliminates the reliance on human experience for different risk strategies, allowing for direct reproduction through configuration and facilitating batch experiments and regression verification. Furthermore, it supports automatic mode switching when danger escalates. Through a mode switching mechanism based on TTC or distance thresholds, this application achieves a better balance between "risk exposure" and "simulation stability." For example, if an unresponsive trajectory is used to expose problems in the initial stage, the application automatically switches to a more conservative or stable mode in the later stage, preventing premature distortion of the scenario or simulation crashes. Additionally, it enhances scenario coverage and problem reproducibility. This application can stably generate more challenging interactive behaviors than pure playback and maintain repeatability, significantly improving high-risk scenario coverage, problem scenario regression efficiency, fair comparison capabilities between different algorithm versions, and the engineering practicality of commercial vehicle autonomous driving simulation. Finally, it is compatible with rule-based models and deep learning models. This application supports both IDMAgent and DL Agent, allowing for flexible switching between different development stages and testing objectives, demonstrating high engineering compatibility.
[0092] Corresponding to the application scenarios and methods provided in the embodiments of this application, the embodiments of this application also provide a management and control system for intelligent agents in an autonomous driving simulation scenario, such as... Figure 6 The diagram shown is a block diagram of a control system for an intelligent agent in an autonomous driving simulation scenario according to an embodiment of this application. This system may include:
[0093] Takeover determination module 62 is used to determine the set of target intelligent agents currently in a takeover state. The set of target intelligent agents includes a first subset of target intelligent agents specified by the user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents. The step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity verification and attribute verification; obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulated host vehicle; and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulated host vehicle.
[0094] The risk preference selection module 64 is used to determine the target trajectory from the corresponding candidate trajectory set based on the preset risk preference coding parameters for any target agent in the target agent set, so that the target agent moves based on the target trajectory, wherein the preset risk preference coding parameters are matched with the test target in the current simulation scenario.
[0095] pass Figure 6 The apparatus shown determines a set of target agents currently in a takeover-ready state. This set includes a first subset of target agents specified by the user and a second subset of target agents determined through step-by-step verification of candidate agents. The step-by-step verification of candidate agents includes at least: obtaining a first candidate agent from the candidate agents through validity and attribute verification; obtaining a second candidate agent by verifying the interaction relationship between the first candidate agent and the simulated host vehicle; and obtaining a third candidate agent by verifying the collision risk between the second candidate agent and the simulated host vehicle. For any target agent in the set, a target trajectory is determined from the corresponding candidate trajectory set based on preset risk preference coding parameters, so that the target agent moves based on the target trajectory. The preset risk preference coding parameters match the test target in the current simulation scenario. In other words, by combining user-demand-oriented triggering and automatic triggering after step-by-step verification based on different constraints during takeover determination, the apparatus solves the technical problem in related technologies where the takeover triggering mechanism is singular and struggles to balance controllability and realism. Furthermore, through the risk preference coding mechanism, different risk strategies no longer rely on human experience but can be directly reproduced through configuration, facilitating batch experiments and regression verification. This solves the technical problems of uncontrollable and unreproducible risk strategies of deep learning agents in related technologies, achieving the technical effect of significantly improving the accuracy and controllability of takeover triggering, as well as the technical effect of making risk preferences configurable, coded, and reproducible.
[0096] Optionally, the aforementioned preset risk preference coding parameters include at least one of the following: trajectory selection mode identifier, secondary switching mode identifier, risk assessment mode identifier, takeover risk level mode identifier, sorting result selection sequence number, and trajectory reuse time window length; the trajectory selection mode includes at least the maximum probability mode, risk sorting mode, designated route mode, and no-response mode; the secondary switching mode is a trajectory selection mode other than the trajectory selection mode represented by the trajectory selection mode identifier; the risk assessment mode includes at least one of the following: hard collision time mode, soft collision time mode, trajectory curve divergence mode, and weighted curve guidance mode.
[0097] Optionally, the risk preference selection module 64 is further configured to, when the trajectory selection mode represented by the trajectory selection mode identifier is the risk ranking mode, determine a risk measurement index based on the risk evaluation mode identifier, wherein the risk measurement index includes at least one of the following: hard collision time, soft collision time, trajectory divergence degree, and weighted divergence degree; determine the risk evaluation value of each candidate trajectory in the candidate trajectory set based on the risk measurement index to obtain a ranking result; and select the corresponding candidate trajectory from the ranking result based on the selection number as the target trajectory.
[0098] The system also includes a switching module, which, when the current simulation state is detected to meet the preset switching conditions, changes the trajectory selection mode represented by the trajectory selection mode identifier from the currently effective first mode to the second mode represented by the secondary switching mode identifier. The preset switching conditions include at least one of the following: the collision time between the simulation master vehicle and the target intelligent agent is lower than a preset switching time threshold; the spatial distance between the simulation master vehicle and the target intelligent agent is lower than a preset switching distance threshold; or the current trajectory selection mode is determined not to meet the conditions for maintaining the stable operation of the simulation process.
[0099] In one possible implementation, the system further includes: a synchronization control module, configured to respond to the fact that the target agent set contains truck-type agents and the target tractor unit of the truck-type agent is in a takeover state, to look up the identifier of the corresponding trailer unit from the association mapping table based on the identifier of the target tractor unit, thereby obtaining the target trailer unit, wherein the association mapping table stores the bidirectional association relationship between the tractor unit identifier and the trailer unit identifier; to include the target trailer unit in the target agent set, and to perform a pose synchronization update operation on the target trailer unit after determining the trajectory of the target tractor unit.
[0100] The aforementioned synchronization control module is also used to determine the timestamp corresponding to the arc length parameter corresponding to the movement of the target tractor unit on the historical trajectory curve, and obtain a first reference time; locate the same source road sign point close to the first reference time on the time axis formed by the historical trajectory data of the target trailer unit; if the first reference time is located between the timestamps of two adjacent road sign points in the historical trajectory data of the target trailer unit, perform time interpolation calculation based on the pose data corresponding to the two adjacent road sign points to obtain the interpolation calculation result; and use the interpolation calculation result as the pose of the target trailer unit that is synchronously aligned with the state of the target tractor unit on the time axis.
[0101] Optionally, the aforementioned synchronization control module is also used for follow-up pose calculation based on the articulated kinematic model to determine the pose of the target trailer unit.
[0102] The system also includes an update module, which performs an incremental update operation on the associated mapping table based on the tractor unit mapping relationship data obtained in the current frame when each data frame is input; and rebuilds the associated mapping table when a preset mapping change condition is detected to be triggered, wherein the mapping change condition includes at least one of the following situations: the trailer unit is re-matched to a different tractor unit, the existing mapping relationship changes, and any object on one side of the mapping relationship is in a takeover state.
[0103] Optionally, in response to the case that the simulation master vehicle is a combination of a tractor unit and a trailer unit, the above system further includes a collision detection module for constructing collision detection elements, wherein the collision detection elements include: the collision box of the tractor unit of the simulation master vehicle, the collision box of the trailer unit of the simulation master vehicle, and the collision box of the candidate intelligent agent; and the system determines the above-mentioned interaction relationship or the above-mentioned collision risk based on the collision detection elements.
[0104] When an agent in the takeover activation state experiences an abnormal loss of the current perception frame, the system further includes a completion module, which, in response to the fact that the predicted trajectory data or historical trajectory data associated with the agent in the takeover activation state has not terminated, completes the state data of the agent in the takeover activation state based on the historically retained motion state information.
[0105] It should be noted that the embodiments of this application are not limited to a single type of intelligent agent model implementation, but rather construct a unified takeover framework that can simultaneously accommodate multiple intelligent agent control paradigms. Within this framework, the IDM Agent and DLA Agent can share underlying basic capabilities and are respectively suitable for different types of testing requirements. Examples include the aforementioned takeover determination module, synchronization control module, collision detection module, and completion module. Through this architectural design, a unified intelligent agent takeover platform for commercial vehicle scenarios is provided, enabling different types of intelligent agents to be deployed collaboratively in the same simulation environment, ensuring both the reusability of basic capabilities and the flexible scalability of upper-layer control strategies.
[0106] The functions of each module in each system of the embodiments of this application can be found in the corresponding description in the above method, and they have corresponding beneficial effects, which will not be repeated here.
[0107] Figure 7 This is a block diagram of an electronic device used to implement embodiments of this application. For example... Figure 7 As shown, the electronic device includes a memory 701 and a processor 702. The memory 701 stores a computer program that can run on the processor 702. When the processor 702 executes the computer program, it implements the method described in the above embodiments. The number of memories 701 and processors 702 can be one or more.
[0108] The electronic device also includes:
[0109] The communication interface 703 is used to communicate with external devices and perform data exchange and transmission.
[0110] If the memory 701, processor 702, and communication interface 703 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0111] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.
[0112] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in this application.
[0113] This application also provides a chip including a processor for calling and executing instructions stored in a memory, causing a communication device with the chip installed to perform the method provided in this application.
[0114] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.
[0115] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0116] Further, optionally, the aforementioned memory may include read-only memory and random access memory. The memory may be volatile memory or non-volatile memory, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Sync Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0117] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0118] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0119] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0120] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0121] The logic and / or steps described in the flowchart or otherwise herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0122] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0123] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0124] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope described in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for controlling intelligent agents in an autonomous driving simulation scenario, characterized in that, include: A set of target intelligent agents currently in a takeover state is determined, wherein the set of target intelligent agents includes a first subset of target intelligent agents specified by the user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents. The step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity verification and attribute verification; obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulated host vehicle; and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulated host vehicle. For any target agent in the target agent set, a target trajectory is determined from the corresponding candidate trajectory set based on a preset risk preference coding parameter, so that the target agent moves based on the target trajectory, wherein the preset risk preference coding parameter matches the test target in the current simulation scenario.
2. The control method according to claim 1, characterized in that, The preset risk preference coding parameters include at least one of the following: Track selection mode identifier, secondary switch mode identifier, risk assessment mode identifier, takeover risk level mode identifier, sorting result selection sequence number, and track reuse time window length; The trajectory selection mode includes at least the maximum probability mode, risk ranking mode, designated route mode, and no response mode; the secondary switching mode is a trajectory selection mode other than the trajectory selection mode represented by the trajectory selection mode identifier; the risk assessment mode includes at least one of the following: hard collision time mode, soft collision time mode, trajectory curve divergence mode, and weighted curve guidance mode.
3. The control method according to claim 2, characterized in that, When the trajectory selection mode represented by the trajectory selection mode identifier is the risk ranking mode, the step of determining the target trajectory from the corresponding candidate trajectory set based on preset risk preference coding parameters includes: Risk measurement indicators are determined based on the risk assessment model identifier, wherein the risk measurement indicators include at least one of the following: hard collision time, soft collision time, trajectory divergence degree, and weighted divergence degree. Based on the risk metric, the risk assessment value of each candidate trajectory in the candidate trajectory set is determined, and the ranking result is obtained; Based on the sorting result, a corresponding candidate trajectory is selected from the sorting result by the selected sequence number, which is then used as the target trajectory.
4. The control method according to claim 2, characterized in that, When the current simulation state is detected to meet the preset switching conditions, the method further includes: The trajectory selection mode represented by the trajectory selection mode identifier is changed from the currently effective first mode to the second mode represented by the secondary switching mode identifier, wherein the preset switching conditions include at least one of the following: the collision time between the simulation master vehicle and the target intelligent agent is lower than a preset switching time threshold, the spatial distance between the simulation master vehicle and the target intelligent agent is lower than a preset switching distance threshold, or it is determined that the current trajectory selection mode does not meet the conditions for maintaining the stable operation of the simulation process.
5. The control method according to claim 1, characterized in that, In response to the fact that the set of target agents includes truck-type agents, and the target tractor unit of the truck-type agents is in a takeover state, the method further includes: Based on the identifier of the target tractor unit, the identifier of the corresponding trailer unit is found from the association mapping table to obtain the target trailer unit. The association mapping table stores the bidirectional association relationship between the tractor unit identifier and the trailer unit identifier. The target trailer unit is included in the target intelligent agent set, and the pose synchronization update operation of the target trailer unit is performed after the trajectory of the target tractor unit is determined.
6. The control method according to claim 5, characterized in that, The pose synchronization update operation for the target trailer unit includes: Based on the arc length parameter corresponding to the movement of the target tractor unit on the historical trajectory curve, the timestamp corresponding to the arc length parameter is determined to obtain the first reference time; On the timeline formed by the historical trajectory data of the target trailer unit, locate the same source road marker that is close to the first reference time; If the first reference time is located between the timestamps of two adjacent road signs in the historical trajectory data of the target trailer unit, then time interpolation calculation is performed based on the pose data corresponding to the two adjacent road signs to obtain the interpolation calculation result; The interpolation result is used as the pose of the target trailer unit, which is synchronously aligned with the state of the target tractor unit on the time axis.
7. The control method according to claim 5, characterized in that, The pose synchronization update operation for the target trailer unit includes: The pose of the target trailer unit is determined by following the pose calculation operation based on the articulated kinematic model.
8. The control method according to claim 5, characterized in that, The method further includes: When each data frame is input, an incremental update operation is performed on the associated mapping table based on the tractor unit mapping relationship data obtained in the current frame; When a preset mapping change condition is detected to be triggered, the associated mapping table is rebuilt. The mapping change condition includes at least one of the following situations: the trailer unit is re-matched to a different tractor unit, the existing mapping relationship changes, and any object on one side of the mapping relationship is in a takeover state.
9. The control method according to claim 1, characterized in that, In the event that the simulated host vehicle is a combination of a tractor unit and a trailer unit, the interaction relationship or the collision risk is determined in the following manner: Construct collision detection elements, wherein the collision detection elements include: the collision box of the tractor unit of the simulated master vehicle, the collision box of the trailer unit of the simulated master vehicle, and the collision box of the candidate intelligent agent; The interaction relationship or the collision risk is determined based on the collision detection elements.
10. The control method according to claim 1, characterized in that, When an agent in a takeover active state experiences an abnormal loss of the current perception frame, the method further includes: In response to the fact that the predicted trajectory data or historical trajectory data associated with the agent in the takeover activation state has not terminated, the state data of the agent in the takeover activation state is supplemented based on the historically retained motion state information.
11. A control system for intelligent agents in an autonomous driving simulation scenario, characterized in that, include: The takeover determination module is used to determine the set of target intelligent agents currently in a takeover state. The set of target intelligent agents includes a first subset of target intelligent agents specified by the user and a second subset of target intelligent agents determined after step-by-step verification of candidate intelligent agents. The step-by-step verification of candidate intelligent agents includes at least: obtaining a first candidate intelligent agent from the candidate intelligent agents through validity verification and attribute verification; obtaining a second candidate intelligent agent by verifying the interaction relationship between the first candidate intelligent agent and the simulated host vehicle; and obtaining a third candidate intelligent agent by verifying the collision risk between the second candidate intelligent agent and the simulated host vehicle. The risk preference selection module is used to determine a target trajectory from the corresponding candidate trajectory set for any target agent in the target agent set based on preset risk preference coding parameters, so that the target agent moves based on the target trajectory, wherein the preset risk preference coding parameters match the test target in the current simulation scenario.
12. The control system according to claim 11, characterized in that, In response to the fact that the set of target agents includes truck-type agents, and the target tractor unit of the truck-type agents is in a takeover state, the system further includes: The synchronization control module is used to look up the identifier of the corresponding trailer unit from the association mapping table based on the identifier of the target tractor unit to obtain the target trailer unit. The association mapping table stores the bidirectional association relationship between the tractor unit identifier and the trailer unit identifier. The module also includes the target trailer unit in the target intelligent agent set and performs a pose synchronization update operation on the target trailer unit after determining the trajectory of the target tractor unit.
13. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method according to any one of claims 1-10.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-10.
15. A computer program product, characterized in that, Includes computer instructions, wherein when executed by a processor, the computer instructions implement the method described in any one of claims 1-10.
