Method and device for judging compliance of autonomous driving with traffic rules based on opendrive map data
Patent Information
- Application Number
- CN202310868243.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-07-14
AI Technical Summary
[0004]各类仿真平台多数使用OpenDrive格式的地图数据(以下简称为“OpenDrive地图数据”)描述其仿真静态道路交通网络,而目前却没有与OpenDrive地图数据相匹配的自动驾驶交规合规性测试验证方法
[0072] Since most simulation platforms use OpenDrive map data to describe their simulated static road traffic networks, but lack a method for testing and verifying autonomous driving traffic compliance that matches OpenDrive map data, this invention provides a method for testing and verifying autonomous driving traffic compliance that matches OpenDrive map data, enriching the methods for determining whether an autonomous driving system complies with traffic rules in a simulation environment. When conducting autonomous driving tests in a simulation environment, this invention first analyzes and judges the traffic scene where the test object is located based on OpenDrive map data (including the number of scene participants, the lanes where scene participants are located, and the relative positional relationships between scene participants). Then, it acquires the driving data of the test object and other relevant scene participants (including speed, acceleration, driving trajectory, etc.) and scene data of the test object's location (including lane traffic signs, lane surface friction coefficient, etc.). Combining this with scene characteristics and other multi-faceted data, it determines whether the autonomous driving system complies with the corresponding traffic rules in the simulation environment. This more comprehensively considers the traffic rules that autonomous driving systems should follow during operation, enriching the methods for determining whether autonomous driving systems comply with traffic rules in a simulation environment and improving the accuracy and reliability of autonomous driving simulation test results.
Smart Images

Figure CN116994429B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of autonomous driving testing technology, and in particular to a method and device for judging the traffic compliance of autonomous driving based on OpenDrive map data. Background Technology
[0002] Autonomous driving is a cutting-edge technology that relies on computer and artificial intelligence to complete safe and efficient driving without human intervention. Autonomous driving systems use onboard sensors to perceive the road environment, collecting information such as road conditions, vehicle position, and obstacles, enabling the vehicle to drive safely and reliably to its destination.
[0003] Autonomous driving simulation testing primarily uses mathematical modeling to digitize autonomous driving application scenarios and then verifies the autonomous driving system through software simulation. Due to its advantages such as low testing cost, rich testing scenarios, high testing coverage, and high testing safety, simulation testing has become an indispensable part of autonomous driving testing and verification. During the testing process, for safety and reliability reasons, whether the vehicle complies with traffic rules is also an important factor in evaluating the performance of the autonomous driving system.
[0004] Most simulation platforms use OpenDrive format map data (hereinafter referred to as "OpenDrive map data") to describe their simulated static road traffic networks, but there is currently no autonomous driving traffic regulation compliance testing and verification method that matches OpenDrive map data. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a method and apparatus for judging the traffic compliance of autonomous driving systems based on OpenDrive map data. This method can parse OpenDrive map data in a simulation environment to construct a road relationship connection diagram, which helps to achieve comprehensive testing and verification of whether autonomous driving systems comply with traffic rules in a simulation environment, and enriches the testing and verification methods for whether autonomous driving systems comply with traffic rules in a simulation environment.
[0006] According to a first aspect of the present disclosure, a method for determining the traffic compliance of autonomous driving based on OpenDrive map data is provided, including:
[0007] Based on OpenDrive map data, a road relationship connection map is constructed, which includes: a road segment connection map for indicating the predecessor and successor relationships between various road segment nodes in the road and a lane connection map for indicating the predecessor and successor relationships between various lane nodes in the road.
[0008] Based on the road relationship connection diagram and the coordinate values of corresponding points in the reference line coordinate system, the relative positional relationship between the test object and other scene participants is determined; wherein, the relative positional relationship includes: whether the test object and the other scene participants are in the same lane, the front-back relative positional relationship between the other scene participants and the test object, and the left-right relative positional relationship between the other scene participants and the test object;
[0009] Obtain the attribute information of the lane where the test object is located;
[0010] Obtain motion information of the test subject and other participants in the scenario;
[0011] Based on the test subject, other scene participants, and lane-related information, a traffic scene is determined, and it is judged whether the test subject complies with the traffic rules corresponding to the traffic scene.
[0012] Optionally, constructing a road relationship connection map based on OpenDrive map data includes:
[0013] The OpenDrive map data is parsed to construct a road topology network of the OpenDrive map data in a simulation scenario; wherein, the nodes in the road topology network include roads, road segments, and lanes;
[0014] Traverse all roads in the road topology network to obtain the road segments and lanes of all roads;
[0015] Establish the predecessor and successor relationships between the nodes of each road segment to construct the road segment connection graph;
[0016] Establish the predecessor and successor relationships between all lane nodes to construct the lane connection graph.
[0017] Optionally, the process of determining whether the test subject and the other participants in the scenario are in the same lane includes:
[0018] Based on the road segment connection graph, determine the connectivity between the road segment node where the test object is located and the road segment nodes where the other scene participants are located;
[0019] If the road segment node where the test subject is located is not connected to the road segment nodes where the other scenario participants are located, it is determined that the test subject and the other scenario participants are on different roads.
[0020] If the road segment node where the test object is located is connected to the road segment node where the other scenario participants are located, it is determined that the test object and the other scenario participants are on the same road, and based on the lane connection map, the connectivity relationship between the lane node where the test object is located and the lane node where the other scenario participants are located is determined;
[0021] If the lane node where the test subject is located is connected to the lane nodes where the other scenario participants are located, it is determined that the test subject and the other scenario participants are in the same lane.
[0022] If the lane node where the test subject is located is not connected to the lane nodes where the other scenario participants are located, it is determined that the test subject and the other scenario participants are in different lanes.
[0023] Optionally, the process of determining the relative positions of the other scenario participants and the test subject includes:
[0024] When the other scene participants and the test object are located on the same road segment, the relative front-to-back position relationship between the other scene participants and the test object is determined based on the s value of the other scene participants and the test object in the reference line coordinate system corresponding to the road segment.
[0025] When the other scenario participants and the test object are located on different road segments, the road segment nodes where the other scenario participants and the test object are located are determined based on the road segment connection diagram. Then, the relative positional relationship between the other scenario participants and the test object is determined according to the connectivity and predecessor-successor relationship of the road segment nodes where the other scenario participants and the test object are located.
[0026] Optionally, determining the relative positional relationship between the other scene participants and the test object based on the 's' value in the reference line coordinate system corresponding to the road segment, based on the location of the other scene participants and the test object, includes:
[0027] If the s-value in the reference line coordinates of the other participants is greater than the s-value in the reference line coordinates of the test subject, and the tangent vector of the road reference line of the road segment where the test subject is located... With respect to the motion direction vector of the test object The directional angle is less than a preset threshold, or the s-value in the reference line coordinates of the other scenario participants is less than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object If the directional angle is greater than a preset threshold, then it is determined that the other scene participants are in front of the test object;
[0028] If the s-value in the reference line coordinates of the other participants is less than the s-value in the reference line coordinates of the test subject, and the tangent vector of the road reference line of the road segment where the test subject is located... With respect to the motion direction vector of the test object The directional angle is less than a preset threshold, or the s-value in the reference line coordinates of the other scenario participants is greater than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object If the directional angle is greater than a preset threshold, then it is determined that the other scene participants are located behind the test object.
[0029] Optionally, determining the relative positional relationship between the other scenario participants and the test object based on the connectivity and predecessor / successor relationships of the road segment nodes where the other scenario participants and the test object are located includes:
[0030] If the road segment nodes where the other scenario participants and the test object are located are connected, and the road segment where the other scenario participants are located is the successor node of the road segment where the test object is located, then it is determined that the other scenario participants are in front of the test object.
[0031] If the road segment nodes where the other scenario participants and the test object are located are connected, and the road segment where the other scenario participants are located is the predecessor node of the road segment where the test object is located, then it is determined that the other scenario participants are located behind the test object.
[0032] Optionally, the process of determining the left-right relative positional relationship between the other scenario participants and the test object includes:
[0033] When the other scene participants and the test object are located on the same road segment, the left-right relative position relationship between the other scene participants and the test object is determined based on the t value of the other scene participants and the test object in the reference line coordinate system corresponding to the road segment.
[0034] When the other scenario participants and the test object are located on different road segments, based on the lane connection map, a target lane node that is connected to the lane where the other scenario participants are located and is located on the same road segment as the lane where the test object is located is obtained, and based on the t value in the reference line coordinate system corresponding to the target lane node, the left-right relative position relationship between the other scenario participants and the test object is determined.
[0035] Optionally, determining the left-right relative positional relationship between the other scene participants and the test object based on the t-value of their positions in the reference line coordinate system corresponding to the road segment includes:
[0036] If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the other participants in the scenario is less than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t value in the reference line coordinates of the other scene participants is greater than the t value in the reference line coordinates of the test object, then it is determined that the other scene participants are located to the right of the test object.
[0037] If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the other participants in the scenario is greater than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the other scene participants is less than the t-value in the reference line coordinates of the test object, then it is determined that the other scene participants are located to the left of the test object.
[0038] Optionally, determining the left-right relative positional relationship between the other scenario participants and the test object based on the t value in the reference line coordinate system corresponding to the target lane node includes:
[0039] If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the target lane node is less than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t value in the reference line coordinates of the target lane node is greater than the t value in the reference line coordinates of the test object, then it is determined that the other scenario participants are located to the right of the test object.
[0040] If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the target lane node is greater than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the target lane node is less than the t-value in the reference line coordinates of the test object, then it is determined that the other scenario participants are located to the left of the test object.
[0041] Optionally, the attribute information of the lane where the test object is located includes the lane direction, and the calculation process of the lane direction vector corresponding to the lane direction includes:
[0042] Parse the OpenDrive map data to obtain the road segment where the test object is located, as well as the starting point P1 and ending point P2 of the road segment reference line;
[0043] The reference line coordinates of the starting point P1 and the ending point P2 are converted into coordinates in the world coordinate system.
[0044] Using the starting point P1 as a reference point, when the t value in the reference line coordinates of the reference point is greater than 0, the direction of the lane direction vector in the world coordinate system is the same as the direction of the vector corresponding to the starting point P1 to the ending point P2; when the t value in the reference line coordinates of the reference point is less than 0, the direction of the lane direction vector in the world coordinate system is opposite to the direction of the vector corresponding to the starting point P1 to the ending point P2.
[0045] Optionally, the traffic scenario includes: the test subject and the other scenario participants are in the same lane, and the relative positions of the other scenario participants and the test subject are such that the other scenario participants are in front of the test subject;
[0046] The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes:
[0047] The velocity, acceleration, and reaction time at the start of braking of the test object were obtained.
[0048] Calculate the braking distance of the test object based on its speed, acceleration, and reaction time at the start of braking.
[0049] If the braking distance is less than the preset safe distance, then it is determined that the test object complies with the traffic rules corresponding to the traffic scenario.
[0050] If the braking distance is greater than the preset safety distance, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
[0051] Optionally, the traffic scenario includes: the test subject and the other scenario participants are in the same lane;
[0052] The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes:
[0053] Calculate lane direction vector relative to the motion direction vector of the test object The angle between them;
[0054] If the included angle is less than the preset angle, the test object travels in the lane direction of the lane, and it is determined that the test object complies with the traffic rules corresponding to the traffic scenario.
[0055] If the included angle is greater than a preset angle, then the test object is not driving in the lane direction of the lane, and it is determined that the test object has not complied with the traffic rules corresponding to the traffic scenario.
[0056] Optionally, the traffic scenario includes: the test subject passes through an intersection with guide lane lines and changes its driving direction at the intersection;
[0057] The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes:
[0058] Parse the OpenDrive map data to obtain the direction of the guide lane lines;
[0059] Calculate the lane direction vector of the guide lane line. and the motion direction vector of the test object The lane direction vector is obtained by dimensional expansion. Lane three-dimensional direction vector and the motion direction vector The three-dimensional direction vector of motion
[0060] For the lane three-dimensional direction vector and the three-dimensional direction vector of motion Perform the cross product to obtain the vector. Where, if the vector If the coordinate value on the z-axis is greater than 0, then the direction vector of motion is... Located in the lane direction vector The right side of the vector; if the vector If the coordinate value on the z-axis is less than 0, then the direction vector of motion is... Located in the lane direction vector The left side;
[0061] In the vector If the coordinate value on the z-axis is greater than 0, then the lane direction vector If the instruction is to drive to the right, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the left, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
[0062] In the vector If the coordinate value on the z-axis is less than 0, then the lane direction vector If the instruction is to drive to the left, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the right, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
[0063] According to a second aspect of the present disclosure, an autonomous driving traffic regulation compliance judgment device based on OpenDrive map data is provided, comprising:
[0064] The connection graph construction module is used to construct a road relationship connection graph based on OpenDrive map data. The road relationship connection graph includes: a road segment connection graph indicating the predecessor and successor relationships between various road segment nodes in the road and a lane connection graph indicating the predecessor and successor relationships between various lane nodes in the road.
[0065] The positional relationship determination module is used to determine the relative positional relationship between the test object and other scene participants based on the road relationship connection diagram and the coordinate values of corresponding points in the reference line coordinate system; wherein, the relative positional relationship includes: whether the test object and the other scene participants are in the same lane, the front-back relative positional relationship between the other scene participants and the test object, and the left-right relative positional relationship between the other scene participants and the test object;
[0066] The lane attribute acquisition module is used to acquire the attribute information of the lane where the test object is located;
[0067] The motion information acquisition module is used to acquire motion information of the test subject and other participants in the scenario;
[0068] The compliance judgment module is used to determine the traffic scenario based on the test object, other scenario participants, and lane-related information, and to determine whether the test object complies with the traffic rules corresponding to the traffic scenario.
[0069] According to a third aspect of the present disclosure, a computer device is provided, the computer device comprising: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the autonomous driving traffic regulation compliance judgment method based on OpenDrive map data provided in the first aspect of the present disclosure.
[0070] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein computer program instructions are stored on the computer-readable storage medium, and when executed by a processor, the computer program instructions implement the autonomous driving traffic regulation compliance judgment method based on OpenDrive map data provided in the first aspect of the present disclosure.
[0071] The technical solutions provided in this disclosure have at least the following beneficial effects:
[0072] Since most simulation platforms use OpenDrive map data to describe their simulated static road traffic networks, but lack a method for testing and verifying autonomous driving traffic compliance that matches OpenDrive map data, this invention provides a method for testing and verifying autonomous driving traffic compliance that matches OpenDrive map data, enriching the methods for determining whether an autonomous driving system complies with traffic rules in a simulation environment. When conducting autonomous driving tests in a simulation environment, this invention first analyzes and judges the traffic scene where the test object is located based on OpenDrive map data (including the number of scene participants, the lanes where scene participants are located, and the relative positional relationships between scene participants). Then, it acquires the driving data of the test object and other relevant scene participants (including speed, acceleration, driving trajectory, etc.) and scene data of the test object's location (including lane traffic signs, lane surface friction coefficient, etc.). Combining this with scene characteristics and other multi-faceted data, it determines whether the autonomous driving system complies with the corresponding traffic rules in the simulation environment. This more comprehensively considers the traffic rules that autonomous driving systems should follow during operation, enriching the methods for determining whether autonomous driving systems comply with traffic rules in a simulation environment and improving the accuracy and reliability of autonomous driving simulation test results.
[0073] Furthermore, this invention analyzes OpenDrive map data to construct a road relationship connection map that includes road segment connection maps and lane connection maps. This road relationship connection map represents the connection relationships between road segments and lanes in the simulation environment. Based on this, a series of calculation methods are proposed to determine the relative positional relationships of scene participants and the traffic scenario they are in, such as: in the same lane, in different lanes, other scene participants to the left of the test object, other scene participants to the right of the test object, other scene participants in front of the test object, other scene participants behind the test object, etc. The above methods accurately determine the relative positional relationships between scene participants and precisely locate the traffic scenario in which the autonomous driving system is located. This solves the technical problem of the inability to represent relative positional relationships in current simulation environments, and enables the judgment of whether the autonomous driving system complies with relevant traffic regulations based on different traffic scenarios. It effectively improves the verification technology for vehicle traffic rule compliance in autonomous driving testing under simulation environments and expands the applicability of traffic rule compliance testing verification methods.
[0074] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0075] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0076] Figure 1 This is a flowchart illustrating an autonomous driving traffic compliance judgment method based on OpenDrive map data, according to an exemplary embodiment.
[0077] Figure 2 This is a schematic diagram illustrating the definition and description of roads using OpenDrive map data according to an exemplary embodiment.
[0078] Figure 3 This is a schematic diagram illustrating the road segment connection relationship in OpenDrive map data according to an exemplary embodiment.
[0079] Figure 4 This is a schematic diagram of a road segment connection diagram according to an exemplary embodiment.
[0080] Figure 5 This is a schematic diagram illustrating lane connection relationships in OpenDrive map data according to an exemplary embodiment.
[0081] Figure 6 This is a schematic diagram of a lane connection diagram according to an exemplary embodiment.
[0082] Figure 7 This is a schematic diagram illustrating a traffic scenario where two vehicles are located on the same road segment, according to an exemplary embodiment.
[0083] Figure 8 This is a schematic diagram illustrating a traffic scenario where two vehicles are located on different road sections, according to an exemplary embodiment.
[0084] Figure 9 This is a schematic diagram of a traffic scenario where two vehicles are located on the same road segment, according to another exemplary embodiment.
[0085] Figure 10 This is a schematic diagram of a traffic scenario where two vehicles are located on different road segments, according to another exemplary embodiment.
[0086] Figure 11 This is a schematic diagram illustrating the calculation of the lane direction vector according to an exemplary embodiment.
[0087] Figure 12 This is a schematic diagram illustrating the guide lane lines and their directions at an intersection according to an exemplary embodiment.
[0088] Figure 13 This is a block diagram illustrating an autonomous driving traffic compliance judgment device based on OpenDrive map data, according to an exemplary embodiment.
[0089] Figure 14 This is a block diagram illustrating a computer device 1400 according to an exemplary embodiment. Detailed Implementation
[0090] The exemplary embodiments will now be described in detail with reference to the accompanying drawings.
[0091] like Figure 1 As shown, the traffic regulation compliance judgment method in this invention includes the following steps (steps 1 to 5).
[0092] Step 1: Construct a road relationship connection diagram based on OpenDrive map data.
[0093] Before conducting autonomous driving tests, the computer equipment first performs scenario analysis using OpenDrive map data corresponding to the simulation scenario. This analysis determines the relative positions of the test vehicle (equipped with an autonomous driving system) and other scenario participants (including ambient vehicles and pedestrians) on the road. Based on these relative positions, the computer calculates whether the test vehicle meets the corresponding traffic rules for that traffic scenario. For example, if two vehicles are in the same lane and an ambient vehicle is in front of the test vehicle, the test vehicle should maintain a safe distance from that ambient vehicle. If two vehicles are in adjacent lanes, the test vehicle must not obstruct the normal driving of ambient vehicles in the left and right lanes when changing lanes.
[0094] like Figure 2 As shown, OpenDrive map data uses the concepts of roads, road segments, and lanes to describe roads and road topology networks, and uses a reference line coordinate system to describe the location of the midpoint of a road segment; among which, Figure 2 Road3, Road12, and Road20 in the map represent three road segments within a single road, each containing six lanes: -3, -2, -1, 1, 2, and 3. However, because different road segments belong to different reference line coordinate systems, the relative positional relationship between two points within the road remains difficult to determine. To obtain the relative positional relationship between two points, it is necessary to first determine the connection relationship between road segment nodes and lane nodes. However, OpenDrive map data only provides the predecessor-successor relationship between road segments and cannot directly determine whether two road segment nodes or lane nodes are connected.
[0095] Based on this, the present invention constructs a road relationship connection diagram to facilitate the determination of the relative positional relationship between two points in a simulation scenario, such as whether they are in the same lane or different lanes. The road relationship connection diagram is used to indicate the predecessor-successor relationship (road segment connection relationship) between various road segment nodes and the predecessor-successor relationship (lane connection relationship) between various lane nodes. In one example, the road relationship connection diagram includes a road segment connection diagram and a lane connection diagram; step 1 above includes the following sub-steps (steps 1.1 to 1.4).
[0096] Step 1.1: Parse the OpenDrive map data and construct the road topology network of the OpenDrive map data in the simulation scenario.
[0097] In this invention, the computer device first parses the OpenDrive map data. The OpenDrive map data defines the road topology network in the simulation scenario based on XML format. <road> 、 <lanesection> 、 <lanes> 、 <lane>The labels represent roads, road segments, left / right lanes, and lanes.
[0098] Step 1.2: Traverse all roads in the road topology network and obtain the road segments and lanes of all roads.
[0099] Because the construction of the road relationship connection map requires information on road segments and lanes, it is necessary to traverse all roads in the OpenDrive map data, obtain the road segments of all roads, and traverse all road segments in the OpenDrive map data to obtain the lanes of all road segments.
[0100] Step 1.3: Establish the predecessor and successor relationships between the nodes of each road segment to construct the road segment connection diagram.
[0101] Based on the road topology network and its road segments, predecessor-successor relationships are established between nodes of each road segment to construct a road segment connection graph. Optionally, the road segment connection graph is a bidirectional connection graph, where each road segment is a node. If two road segment nodes are adjacent and connected, then these two road segment nodes are each other's predecessor-successor nodes, and the connection between these two road segment nodes is considered an edge in the road segment connection graph. The road connection graph is obtained by performing the above processing on all road segments. Exemplarily, this invention will... Figure 3 The road segment connection relationships shown are represented to construct a system as follows: Figure 4 The diagram shows the road segment connections.
[0102] Step 1.4: Establish the predecessor and successor relationships between the nodes of each road segment to construct the road segment connection diagram.
[0103] Based on the road topology network and its road segments and lanes, a predecessor-successor relationship is established between all lane nodes to construct a lane connectivity graph. Unlike the road segment connectivity graph, the lane connectivity graph refines the nodes to each lane of the road, with each lane representing a node. The lane connectivity graph can be used to determine the connectivity between two lane nodes. If two lane nodes are adjacent and connected, then these two lane nodes are each other's predecessor-successor nodes. The lane connectivity graph extends the concept of lanes in OpenDrive map data from the road segment level to the road level. For example, this invention will... Figure 5 The lane connection relationships shown are represented to construct a system as follows: Figure 6 The lane connection diagram is shown.
[0104] Step 2: Based on the road relationship connection diagram and the coordinate values of the corresponding points in the reference line coordinate system, determine the relative positional relationship between the test object and other scene participants.
[0105] When conducting autonomous driving tests, the computer equipment first determines the relative positional relationship between the test subject and other participants in the scenario to determine the traffic rules the test subject should follow. In determining relative positional relationships, in addition to determining the positional relationship between the test subject and the lanes occupied by other participants, it is also necessary to determine the front-to-back and left-to-right relative positions of the test subject and other participants. For example, when an ambient vehicle is directly in front of the test subject, the test subject should maintain a safe distance from that vehicle; when an ambient vehicle is to the left or right of the test subject, the test subject should maintain a safe lateral distance from that vehicle, and the test subject must not obstruct the normal driving of the ambient vehicle when overtaking or changing lanes.
[0106] For OpenDrive map data, this invention proposes a method for determining relative position based on road relationship connection diagrams and reference line coordinates. In one example, step 2 above includes the following sub-steps (steps 2.1 to 2.3).
[0107] Step 2.1: Based on the road relationship connection diagram, determine whether the test object is in the same lane as other scenario participants.
[0108] In this invention, the computer device first uses a road segment connectivity graph to determine the connectivity between the road segment node where the test object is located and the road segment nodes where other scene participants (such as environmental vehicles) are located. If these two road segment nodes are connected, the test object and other scene participants are determined to be on the same road; otherwise, they are determined to be on different roads. If they are determined to be on different roads, the test object and scene participants are not in the same lane. If they are determined to be on the same road, a further determination is required. At this point, the computer device uses a lane connectivity graph to determine the connectivity between the lane node where the test object is located and the lane nodes where other scene participants are located. If these two lane nodes are connected, the test object and other scene participants are determined to be in the same lane; otherwise, they are determined to be in different lanes.
[0109] Step 2.2: Based on the coordinate values of the corresponding points in the reference line coordinate system and / or the road segment connection diagram, determine the relative positional relationship between other scenario participants and the test object.
[0110] In this invention, when other scene participants (such as environmental vehicles) are located on the same road segment as the test subject, their relative positional relationship can be determined based on the 's' value in the reference line coordinate system corresponding to that road segment. Here, when determining the relative position of the test subject with other scene participants, it is not required that they be in the same lane, only that they are on the same road segment.
[0111] Assume the tangent vector of the road reference line of the road segment where the test object is located is The direction vector of motion of the test object is If the s-value in the reference line coordinates of other participants is greater than the s-value in the reference line coordinates of the test subject, and If the angle between the two vector directions is less than a preset threshold (e.g., 90 degrees), or if the s-value in the reference line coordinates of other participants is less than the s-value in the reference line coordinates of the test subject, and If the angle between the two vector directions is greater than a preset threshold, then other scene participants are located in front of the test subject; if the s-value in the reference line coordinates of other scene participants is less than the s-value in the reference line coordinates of the test subject, and If the angle between the two vector directions is less than a preset threshold, or if the s-value in the reference line coordinates of other participants is greater than the s-value in the reference line coordinates of the test subject, and If the angle between the two vector directions is greater than a preset threshold, then other participants in the scenario are located behind the test subject.
[0112] For example, calculations such as Figure 7 When considering the relative positions of two vehicles in the traffic scenario shown (the ego vehicle is the test subject, and the NPC vehicle is another participant in the scenario), the calculation formula is as follows.
[0113]
[0114]
[0115] Among them, s npc The s value is the reference line coordinate value of the NPC vehicle. ego The s value is the reference line coordinate value of the test object.
[0116] In this invention, when other scene participants and the test object are located on different road segments, since they are not in the same reference line coordinate system, it is impossible to compare their relative positions using the reference line coordinate values. It is necessary to use the road segment connection diagram to determine the predecessor and successor relationship. After locating the road segment nodes where the other scene participants and the test object are located, the relative positional relationship between the other scene participants and the test object is determined based on the connectivity and predecessor and successor relationship of the road segment nodes where the other scene participants and the test object are located.
[0117] For example, calculations such as Figure 8 In the traffic scenario shown, when considering the relative positions of two vehicles (the ego vehicle is the test subject, and the NPC vehicle is another participant in the scenario), the calculation formula is as follows. Based on this, if the two road segment nodes are connected (the road segment nodes where the test subject and other participants are located can be adjacent or separated by multiple road segments, but they must be connected), and the road segment where the other participant is located is the successor node of the road segment where the test subject is located, then it is determined that the other participant is in front of the test subject.
[0118]
[0119] Step 2.3: Based on the coordinate values of the corresponding points in the reference line coordinate system and / or the lane connection diagram, determine the left-right relative positional relationship between the participants in other scenarios and the test object.
[0120] In this invention, if other scene participants (such as environmental vehicles) are located on the same road segment as the test object, they are in the same reference line coordinate system. Therefore, the judgment can be made directly based on the coordinate values (t values) of the two objects in the t-axis direction.
[0121] Assume the tangent vector of the road reference line of the road segment where the test object is located is The direction vector of motion of the test object is If the two vectors are in the same direction, and the t-value in the reference line coordinates of other scene participants is less than the t-value in the reference line coordinates of the test object, or if the two vectors are in different directions, and the t-value in the reference line coordinates of other scene participants is greater than the t-value in the reference line coordinates of the test object, then the other scene participants are located to the right of the test object. If the two vectors are in the same direction, and the t-value in the reference line coordinates of other scene participants is greater than the t-value in the reference line coordinates of the test object, or if the two vectors are in different directions, and the t-value in the reference line coordinates of other scene participants is less than the t-value in the reference line coordinates of the test object, then the other scene participants are located to the left of the test object.
[0122] For example, calculations such as Figure 9 When considering the relative left and right positions of two vehicles in the traffic scenario shown (the ego vehicle is the test subject, and the NPC vehicle is another participant in the scenario), the calculation formula is as follows.
[0123]
[0124]
[0125] Among them, t npc The t value is the reference line coordinate value of the NPC vehicle. ego The t value is the reference line coordinate value of the test object.
[0126] In this invention, when other scenario participants and the test subject are located on different road segments, their reference line coordinate values cannot be directly compared because they are not in the same reference line coordinate system. Therefore, a lane connection diagram is required. First, based on the lane connection diagram, all lane nodes connecting to the lanes of other scenario participants are identified. Then, lane nodes located on the same road segment as the test subject's lane are found. Finally, the comparison method used when other scenario participants and the test subject are on the same road segment is applied to determine their left-right relative positional relationship.
[0127] For example, such as Figure 10 As shown, the ego vehicle (the test subject) is located on road segment Road1, and the NPC vehicle (another participant in the scenario) is located on road segment Road2. Since the two vehicles are on different road segments, the first step is to find the lane node connected to the lane of the NPC vehicle and located on the road segment of the ego vehicle, based on the lane connectivity graph. Figure 10 The lane node containing the dashed box area is located in the reference line coordinate system of Road1. Then, the left and right relative positions of the lane where the ego vehicle is located and the lane where the dashed box area is located are compared in the reference line coordinate system of Road1. By comparing the reference line coordinate values of the two, it can be found that the NPC vehicle is to the right of the ego vehicle.
[0128] Step 3: Obtain the attribute information of the lane where the test object is located.
[0129] In this invention, the computer device analyzes OpenDrive map data to obtain various attribute information about lanes in the simulation scenario, such as lane direction, road number, lane number, ground friction coefficient, traffic signs, and other basic road information. Since the simulation scenario does not specify the driving direction for each road when using OpenDrive map data to describe the roads, this invention proposes a method for calculating lane direction vectors based on OpenDrive map data, using right-hand drive as the standard and combining it with coordinate calculations from a reference line coordinate system.
[0130] like Figure 11 As shown, firstly, the road segment where the test object is located in the simulation scene is obtained, and the starting point P1 and ending point P2 of the reference line of this road segment are obtained. Then, the reference line coordinates of the two points are converted into coordinates in the world coordinate system. Then, taking P1 as the reference point, the direction vector of the road reference line (i.e., the lane direction vector) in the world coordinate system is calculated by judging the t value in the reference line coordinate value of the reference point and selecting the corresponding calculation formula. As shown in the following formula, when the t value in the reference line coordinate value of the reference point is greater than 0, the lane direction vector... and The vectors have the same direction; when the t value in the reference line coordinates of the reference point is less than 0, the lane direction vector... and The vectors are in opposite directions.
[0131]
[0132] Step 4: Obtain motion information of the test subject and other participants in the scenario.
[0133] In this invention, the computer device acquires motion information of all participants in the traffic scene (including test subjects, environmental vehicles, pedestrians, etc.), calculates and analyzes the motion information, and acquires motion information including but not limited to speed, acceleration, direction of motion, trajectory of motion, and position coordinates at different time frames. Among them, basic information such as speed and acceleration can be directly obtained from the traffic scene without complex calculation process, while the trajectory of motion requires further calculation.
[0134] When acquiring the motion trajectory of scene participants, the computer device records the world coordinates of the scene participants in the traffic scene, as well as basic information such as the velocity and acceleration of the scene participants at each time frame within the corresponding time period. Therefore, when calculating the motion trajectory vector of scene participants, the computer device first acquires the start and end time frames of the motion trajectory segment, then acquires the position coordinates of the scene participants in these two time frames, and performs coordinate calculations to obtain the motion trajectory vector of the scene participants. Optionally, the computer device first acquires the motion trajectory and position coordinates of the scene participants throughout the entire motion process in the traffic environment, then extracts the trajectory required for calculation, acquires the start and end points, and converts the reference line coordinates (s1, t1) and (s2, t2) of the two points into coordinates (x1, y1) and (x2, y2) in the world coordinate system, and then performs coordinate calculations to obtain the motion trajectory vector of the scene participants in this process. For example, the motion trajectory vector of the scene participants... The calculation formula is shown below.
[0135]
[0136] Step 5: Determine the traffic scenario based on the test subject, other scenario participants, and lane information, and determine whether the test subject complies with the traffic rules corresponding to the traffic scenario.
[0137] Based on the above four steps, the computer device can obtain the relative positional relationships between scene participants, test object information, traffic participant information, and road information, and determine the traffic scene based on this information. It then selects the traffic rules that the test object needs to follow under this traffic scene and further determines whether the test object complies with the traffic rules. This invention provides different methods for determining whether a test object complies with traffic rules for different traffic scenes, combined with the characteristics of the corresponding traffic rules. Some exemplary embodiments are provided below. It should be understood that these embodiments do not constitute a limitation of this invention. In practical applications, other matching judgment methods can also be set in combination with the traffic scene and its corresponding traffic rules.
[0138] Optionally, the traffic scenario includes the test subject being in the same lane as other scenario participants (such as environmental vehicles), with the other scenario participants located in front of the test subject; in this case, the test subject should meet the traffic rule that "motor vehicles should maintain an appropriate distance from the vehicle in front in the same lane." The calculation of traffic compliance is related to the motion state of both parties, such as speed, acceleration, braking deceleration, and braking reaction time. For example, the safe distance that the two parties should maintain is shown in the following formula, where v1 and a1 are the speed and acceleration of the test subject, respectively, and t is the reaction time of the test subject when it begins to brake.
[0139]
[0140] Optionally, the traffic scenario includes the test subject traveling straight in a lane; in this case, the test subject should meet the traffic rule that "vehicles should travel in the direction of the lane and cannot travel against the flow of traffic." When calculating whether the test subject is traveling against the flow of traffic, i.e., whether the lane direction is consistent with the test subject's trajectory in that lane, the lane direction vector is calculated. relative to the motion direction vector of the test object The angle between the two vectors is used to determine whether the test object is traveling in the direction of the lane. Optionally, if the angle between the two vectors is less than 90 degrees, the test object is considered to be traveling in the direction of the lane; otherwise, the test object is considered to be traveling in the wrong direction. For example, the angle α between the two vectors is calculated using the following formula.
[0141]
[0142] Optionally, the traffic scenario includes the test subject passing through an intersection with lane markings and needing to change direction at that intersection; in this case, the test subject should meet the traffic rule that "vehicles should travel in the direction indicated by the lane markings." When calculating whether the test subject is traveling in the direction indicated by the lane markings, such as... Figure 12 As shown, the arrows on the road in the diagram represent guide lane lines, indicating the correct direction vehicles should travel at the intersection. For example, when a vehicle at point A in the diagram passes the intersection, it should follow trajectory AB; traveling along trajectory AC would violate the guide lane line instructions. Computer equipment can parse OpenDrive map data to obtain the indicated directions of the guide lane lines, and then process the lane direction vectors... (x R ,y R ) and the motion direction vector of the test object We expand the dimension, from a two-dimensional vector to a three-dimensional vector. For ease of calculation, we directly use z... R z V Assigning a value of 0, thus Expanded into a three-dimensional vector Expanded into a three-dimensional vector Then, perform a cross product on the two expanded vectors to obtain the vector. pass Numerical judgment of two vectors The relative position. For example, vectors The calculation formula is shown below.
[0143]
[0144] As shown in the following formula, if vector If the coordinate value on the z-axis is greater than 0, then the vector Located in vector On the right, meaning the vehicle is turning right into the right lane; if the vector If the coordinate value on the z-axis is less than 0, then the vector Located in vector Left side, meaning the vehicle turns into the left lane.
[0145]
[0146] Finally, combine the lane direction vector The compliance assessment results for the test object are shown below.
[0147] In vector If the coordinate value on the z-axis is greater than 0, then the lane direction vector If the instruction is to drive to the right, it confirms that the test subject is complying with the traffic rules corresponding to the traffic scenario; if the lane direction vector... If the instruction is to drive to the left, it indicates that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
[0148] In vector If the coordinate value on the z-axis is less than 0, then the lane direction vector If the instruction is to drive to the left, it confirms that the test subject is complying with the traffic rules corresponding to the traffic scenario; if the lane direction vector... If the instruction is to drive to the right, it indicates that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
[0149] In summary, this invention addresses the problem that most simulation platforms use OpenDrive format map data to describe their simulated static road traffic networks, but lack a method for testing and verifying the compliance of autonomous driving traffic regulations with OpenDrive map data. It proposes a method for judging the compliance of autonomous driving traffic regulations based on OpenDrive map data, which helps to achieve comprehensive testing and verification of whether autonomous driving systems comply with traffic rules in a simulation environment, enriching the testing and verification methods for whether autonomous driving systems comply with traffic rules in a simulation environment.
[0150] This invention analyzes OpenDrive map data to construct road segment connection maps and lane connection maps. The road relationship connection maps represent the connection relationships between road segments and lanes in the simulation environment. Based on this, a series of calculation methods are proposed to determine the relative positional relationships of scene participants and the traffic scenario they are in, such as: in the same lane, in different lanes, other scene participants to the left of the test object, other scene participants to the right of the test object, other scene participants in front of the test object, other scene participants behind the test object, etc. These methods solve the technical problem of the inability to represent relative positional relationships in current simulation environments, enabling the judgment of whether autonomous driving systems comply with traffic regulations based on different traffic scenarios. This effectively improves the verification technology for vehicle traffic rule compliance in autonomous driving testing under simulation environments and expands the applicability of traffic rule compliance testing verification methods.
[0151] Exemplary device
[0152] Figure 13 This is an exemplary embodiment illustrating an autonomous driving traffic compliance judgment device based on OpenDrive map data, with reference to... Figure 13 The device includes: a connection diagram construction module 1310, a position relationship determination module 1320, a lane attribute acquisition module 1330, a motion information acquisition module 1340, and a compliance judgment module 1350.
[0153] The connection graph construction module 1310 is used to construct a road relationship connection graph based on OpenDrive map data. The road relationship connection graph includes: a road segment connection graph indicating the predecessor and successor relationship between each road segment node in the road and a lane connection graph indicating the predecessor and successor relationship between each lane node in the road.
[0154] The positional relationship determination module 1320 is used to determine the relative positional relationship between the test object and other scene participants based on the road relationship connection diagram and the coordinate values of corresponding points in the reference line coordinate system; wherein, the relative positional relationship includes: whether the test object and the other scene participants are in the same lane, the front-back relative positional relationship between the other scene participants and the test object, and the left-right relative positional relationship between the other scene participants and the test object.
[0155] Lane attribute acquisition module 1330 is used to acquire attribute information of the lane where the test object is located;
[0156] The motion information acquisition module 1340 is used to acquire motion information of the test subject and other participants in the scenario.
[0157] The compliance judgment module 1350 is used to determine the traffic scenario based on the test object, other scenario participants and lane information, and to determine whether the test object complies with the traffic rules corresponding to the traffic scenario.
[0158] In one embodiment of this disclosure, the connection graph construction module 1310 is further configured to: parse the OpenDrive map data and construct a road topology network of the OpenDrive map data in a simulation scenario; wherein the nodes in the road topology network include roads, road segments, and lanes; traverse all roads in the road topology network to obtain road segments and lanes in all roads; establish predecessor and successor relationships between each road segment node to construct the road segment connection graph; and establish predecessor and successor relationships between all lane nodes to construct the lane connection graph.
[0159] In one embodiment of this disclosure, the position relationship determination module 1320 is further configured to: determine the connectivity between the road segment node where the test object is located and the road segment nodes where other scene participants are located, based on the road segment connection map; determine that the test object and other scene participants are on different roads if the road segment node where the test object is located and the road segment nodes where other scene participants are located are not connected; determine that the test object and other scene participants are on the same road if the road segment node where the test object is located and the road segment nodes where other scene participants are located are connected; and determine the connectivity between the lane node where the test object is located and the lane node where other scene participants are located, based on the lane connection map; determine that the test object and other scene participants are in the same lane if the lane node where the test object is located and the lane node where other scene participants are located are connected; and determine that the test object and other scene participants are in different lanes if the lane node where the test object is located and the lane node where other scene participants are located are not connected.
[0160] In one embodiment of this disclosure, the position relationship determination module 1320 is further configured to: when the other scene participants and the test object are located on the same road segment, determine the relative positional relationship between the other scene participants and the test object based on the s-value of the location of the other scene participants and the test object in the reference line coordinate system corresponding to the road segment; when the other scene participants and the test object are located on different road segments, determine the road segment nodes where the other scene participants and the test object are respectively located based on the road segment connection diagram, and determine the relative positional relationship between the other scene participants and the test object based on the connectivity and predecessor / successor relationships of the road segment nodes where the other scene participants and the test object are respectively located.
[0161] In one embodiment of this disclosure, the positional relationship determination module 1320 is further configured to: if the s-value in the reference line coordinates of the other scene participants is greater than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directional angle is less than a preset threshold, or the s-value in the reference line coordinates of the other scenario participants is less than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object If the directional angle is greater than a preset threshold, then it is determined that the other scene participants are in front of the test object; if the s-value in the reference line coordinates of the other scene participants is less than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directional angle is less than a preset threshold, or the s-value in the reference line coordinates of the other scenario participants is greater than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object If the directional angle is greater than a preset threshold, then it is determined that the other scene participants are located behind the test object.
[0162] In one embodiment of this disclosure, the position relationship determination module 1320 is further configured to: if the road segment nodes where the other scene participants and the test object are respectively located are connected, and the road segment where the other scene participants are located is the successor node of the road segment where the test object is located, then determine that the other scene participants are in front of the test object; if the road segment nodes where the other scene participants and the test object are respectively located are connected, and the road segment where the other scene participants are located is the predecessor node of the road segment where the test object is located, then determine that the other scene participants are behind the test object.
[0163] In one embodiment of this disclosure, the position relationship determination module 1320 is further configured to: when the other scene participants and the test object are located on the same road segment, determine the left-right relative position relationship between the other scene participants and the test object based on the t value in the reference line coordinate system corresponding to the road segment; when the other scene participants and the test object are located on different road segments, obtain a target lane node that is connected to the lane where the other scene participants are located and is located on the same road segment as the lane where the test object is located based on the lane connection map, and determine the left-right relative position relationship between the other scene participants and the test object based on the t value in the reference line coordinate system corresponding to the target lane node.
[0164] In one embodiment of this disclosure, the positional relationship determination module 1320 is further configured to: if the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the other participants in the scenario is less than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the other scene participants is greater than the t-value in the reference line coordinates of the test object, then it is determined that the other scene participants are located to the right of the test object; if the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the other participants in the scenario is greater than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the other scene participants is less than the t-value in the reference line coordinates of the test object, then it is determined that the other scene participants are located to the left of the test object.
[0165] In one embodiment of this disclosure, the positional relationship determination module 1320 is further configured to: if the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the target lane node is less than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the target lane node is greater than the t-value in the reference line coordinates of the test object, then it is determined that the other scenario participants are located to the right of the test object; if the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the target lane node is greater than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the target lane node is less than the t-value in the reference line coordinates of the test object, then it is determined that the other scenario participants are located to the left of the test object.
[0166] In one embodiment of this disclosure, the attribute information of the lane where the test object is located includes the lane direction. The lane attribute acquisition module 1330 is further configured to: parse the OpenDrive map data to obtain the road segment where the test object is located, and the starting point P1 and ending point P2 of the road segment reference line; convert the reference line coordinates of the starting point P1 and the ending point P2 into coordinates in the world coordinate system; using the starting point P1 as a reference point, when the t value in the reference line coordinate value of the reference point is greater than 0, the lane direction vector in the world coordinate system has the same direction as the vector corresponding to the starting point P1 to the ending point P2; when the t value in the reference line coordinate value of the reference point is less than 0, the lane direction vector in the world coordinate system has the opposite direction to the vector corresponding to the starting point P1 to the ending point P2.
[0167] In one embodiment of this disclosure, the traffic scenario includes: the test subject and other scenario participants are in the same lane, and the relative positions of the other scenario participants and the test subject are such that the other scenario participants are in front of the test subject; based on this traffic scenario, the compliance judgment module 1350 is further configured to: obtain the speed, acceleration, and braking start reaction time of the test subject; calculate the braking distance of the test subject based on the speed, acceleration, and braking start reaction time of the test subject; if the braking distance is less than a preset safety distance, determine that the test subject complies with the traffic rules corresponding to the traffic scenario; if the braking distance is greater than the preset safety distance, determine that the test subject does not comply with the traffic rules corresponding to the traffic scenario.
[0168] In one embodiment of this disclosure, the traffic scenario includes: the test subject and other scenario participants are in the same lane; based on this traffic scenario, the compliance judgment module 1350 is further configured to: calculate the lane direction vector. relative to the motion direction vector of the test object The angle between the two lanes; if the angle is less than a preset angle, the test subject travels in the direction of the lane, and it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the angle is greater than a preset angle, the test subject does not travel in the direction of the lane, and it is determined that the test subject does not comply with the traffic rules corresponding to the traffic scenario.
[0169] In one embodiment of this disclosure, the traffic scenario includes: the test subject passes through an intersection with guide lane lines and changes its driving direction at the intersection; based on this traffic scenario, the compliance judgment module 1350 is further configured to: parse the OpenDrive map data to obtain the direction indication of the guide lane lines; and calculate the lane direction vector of the guide lane lines. and the motion direction vector of the test object The lane direction vector is obtained by dimensional expansion. Lane three-dimensional direction vector and the motion direction vector The three-dimensional direction vector of motion For the lane three-dimensional direction vector and the three-dimensional direction vector of motion Perform the cross product to obtain the vector. Where, if the vector If the coordinate value on the z-axis is greater than 0, then the direction vector of motion is... Located in the lane direction vector The right side of the vector; if the vector If the coordinate value on the z-axis is less than 0, then the direction vector of motion is... Located in the lane direction vector To the left of the vector; If the coordinate value on the z-axis is greater than 0, then the lane direction vector If the instruction is to drive to the right, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the left, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario; in the vector If the coordinate value on the z-axis is less than 0, then the lane direction vector If the instruction is to drive to the left, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the right, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
[0170] The exemplary device is an embodiment of the device corresponding to the exemplary method described above. The specific operation of each module can be understood with reference to the description of the method embodiment, and will not be repeated here.
[0171] Exemplary electronic devices
[0172] Figure 14 This is a block diagram illustrating a computer device 1400 according to an exemplary embodiment. The computer device 1400 may be a terminal, a laptop computer, a desktop computer, a server, a computer cluster, a vehicle controller, an in-vehicle terminal, an in-vehicle computer, or other types of electronic equipment.
[0173] Reference Figure 14 The computer device 1400 may include at least one processor 1410 and a memory 1420. The processor 1410 can execute instructions stored in the memory 1420. The processor 1410 is communicatively connected to the memory 1420 via a data bus. In addition to the memory 1420, the processor 1410 may also be communicatively connected to an input device 1430, an output device 1440, and a communication device 1450 via the data bus.
[0174] Processor 1410 can be any conventional processor. Processors may include central processing units (CPUs), graphics processing units (GPUs), field-programmable gate arrays (FPGAs), systems on chips (SoCs), application-specific integrated circuits (ASICs), or combinations thereof.
[0175] The memory 1420 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0176] In this embodiment of the present disclosure, the memory 1420 stores executable instructions, and the processor 1410 can read the executable instructions from the memory 1420 and execute the instructions to implement all or part of the steps of the autonomous driving traffic regulation compliance judgment method based on OpenDrive map data in the above exemplary embodiment.
[0177] Exemplary computer-readable storage media
[0178] In addition to the methods and apparatus described above, exemplary embodiments of this disclosure also include a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to perform all or part of the steps described in the exemplary embodiments above.
[0179] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. These programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages, and scripting languages (e.g., Python). The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0180] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media include: static random access memory (SRAM) having one or more electrically connected wires, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, or any suitable combination thereof.
[0181] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.< / lane> < / lanes> < / lanesection> < / road>
Claims
1. A method for judging the traffic compliance of autonomous driving based on OpenDrive map data, characterized in that, The method includes: Based on OpenDrive map data, a road relationship connection map is constructed, which includes: a road segment connection map for indicating the predecessor and successor relationships between various road segment nodes in the road and a lane connection map for indicating the predecessor and successor relationships between various lane nodes in the road. Based on the road relationship connection diagram and the coordinate values of corresponding points in the reference line coordinate system, the relative positional relationship between the test object and other scene participants is determined; wherein, the relative positional relationship includes: whether the test object and the other scene participants are in the same lane, the front-back relative positional relationship between the other scene participants and the test object, and the left-right relative positional relationship between the other scene participants and the test object; Obtain the attribute information of the lane where the test object is located; Obtain motion information of the test subject and other participants in the scenario; Based on the test subject, other scene participants, and lane-related information, a traffic scene is determined, and it is judged whether the test subject complies with the traffic rules corresponding to the traffic scene. The traffic scenario includes a situation where the test subject is in the same lane as the other participants in the scenario. The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes: Calculate lane direction vector relative to the motion direction vector of the test object The angle between them; If the included angle is less than the preset angle, the test object travels in the lane direction of the lane, and it is determined that the test object complies with the traffic rules corresponding to the traffic scenario. If the included angle is greater than the preset angle, then the test object is not driving in the lane direction of the lane, and it is determined that the test object has not complied with the traffic rules corresponding to the traffic scenario. The traffic scenario includes: the test subject passes through an intersection with guide lane lines and changes its driving direction at the intersection; The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes: Parse the OpenDrive map data to obtain the direction of the guide lane lines; Calculate the lane direction vector of the guide lane line. and the motion direction vector of the test object The lane direction vector is obtained by performing dimensional expansion. Lane three-dimensional direction vector and the motion direction vector The three-dimensional direction vector of motion ; For the lane three-dimensional direction vector and the three-dimensional direction vector of the motion Perform the cross product to obtain the vector. Wherein, if the vector If the coordinate value on the z-axis is greater than 0, then the direction vector of motion is... Located in the lane direction vector The right side of the vector; if the vector If the coordinate value on the z-axis is less than 0, then the direction vector of motion is... Located in the lane direction vector The left side; In the vector If the coordinate value on the z-axis is greater than 0, then the lane direction vector If the instruction is to drive to the right, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the left, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario. In the vector If the coordinate value on the z-axis is less than 0, then the lane direction vector If the instruction is to drive to the left, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the right, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
2. The method according to claim 1, characterized in that, The construction of the road relationship connection map based on OpenDrive map data includes: The OpenDrive map data is parsed to construct a road topology network of the OpenDrive map data in a simulation scenario; wherein, the nodes in the road topology network include roads, road segments, and lanes; Traverse all roads in the road topology network to obtain the road segments and lanes of all roads; Establish the predecessor and successor relationships between the nodes of each road segment to construct the road segment connection graph; Establish the predecessor and successor relationships between all lane nodes to construct the lane connection graph.
3. The method according to claim 1, characterized in that, The process of determining whether the test subject is in the same lane as other participants in the scenario includes: Based on the road segment connection graph, determine the connectivity between the road segment node where the test object is located and the road segment nodes where the other scene participants are located; If the road segment node where the test subject is located is not connected to the road segment nodes where the other scenario participants are located, it is determined that the test subject and the other scenario participants are on different roads. If the road segment node where the test object is located is connected to the road segment node where the other scenario participants are located, it is determined that the test object and the other scenario participants are on the same road, and based on the lane connection map, the connectivity relationship between the lane node where the test object is located and the lane node where the other scenario participants are located is determined; If the lane node where the test subject is located is connected to the lane nodes where the other scenario participants are located, it is determined that the test subject and the other scenario participants are in the same lane. If the lane node where the test subject is located is not connected to the lane nodes where the other scenario participants are located, it is determined that the test subject and the other scenario participants are in different lanes.
4. The method according to claim 1, characterized in that, The process of determining the relative positions of the participants in the other scenarios and the test subject includes: When the other scene participants and the test object are located on the same road segment, the relative front-to-back position relationship between the other scene participants and the test object is determined based on the s value of the other scene participants and the test object in the reference line coordinate system corresponding to the road segment. When the other scenario participants and the test object are located on different road segments, the road segment nodes where the other scenario participants and the test object are located are determined based on the road segment connection diagram. Then, the relative positional relationship between the other scenario participants and the test object is determined according to the connectivity and predecessor-successor relationship of the road segment nodes where the other scenario participants and the test object are located.
5. The method according to claim 4, characterized in that, The determination of the relative positions of the other scene participants and the test subject based on the 's' value in the reference line coordinate system corresponding to the road segment includes: If the s-value in the reference line coordinates of the other participants is greater than the s-value in the reference line coordinates of the test subject, and the tangent vector of the road reference line of the road segment where the test subject is located... With respect to the motion direction vector of the test object The directional angle is less than a preset threshold, or the s-value in the reference line coordinates of the other scenario participants is less than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object If the directional angle is greater than a preset threshold, then it is determined that the other scene participants are in front of the test object; If the s-value in the reference line coordinates of the other participants is less than the s-value in the reference line coordinates of the test subject, and the tangent vector of the road reference line of the road segment where the test subject is located... With respect to the motion direction vector of the test object The directional angle is less than a preset threshold, or the s-value in the reference line coordinates of the other scenario participants is greater than the s-value in the reference line coordinates of the test object, and the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object If the directional angle is greater than a preset threshold, then it is determined that the other scene participants are located behind the test object.
6. The method according to claim 4, characterized in that, The step of determining the relative positions of the other scenario participants and the test object based on the connectivity and predecessor / successor relationships of the road segment nodes where the other scenario participants and the test object are located includes: If the road segment nodes where the other scenario participants and the test object are located are connected, and the road segment where the other scenario participants are located is the successor node of the road segment where the test object is located, then it is determined that the other scenario participants are in front of the test object. If the road segment nodes where the other scenario participants and the test object are located are connected, and the road segment where the other scenario participants are located is the predecessor node of the road segment where the test object is located, then it is determined that the other scenario participants are located behind the test object.
7. The method according to claim 1, characterized in that, The process of determining the left-right relative positional relationship between the participants in the other scenarios and the test subject includes: When the other scene participants and the test object are located on the same road segment, the left-right relative positional relationship between the other scene participants and the test object is determined based on the t value of the other scene participants and the test object in the reference line coordinate system corresponding to the road segment. When the other scenario participants and the test object are located on different road segments, based on the lane connection map, a target lane node that is connected to the lane where the other scenario participants are located and is located on the same road segment as the lane where the test object is located is obtained, and based on the t value in the reference line coordinate system corresponding to the target lane node, the left-right relative position relationship between the other scenario participants and the test object is determined.
8. The method according to claim 7, characterized in that, The determination of the left-right relative positional relationship between the other scene participants and the test object based on the t value in the reference line coordinate system corresponding to the road segment, based on the location of the other scene participants and the test object, includes: If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the other participants in the scenario is less than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t value in the reference line coordinates of the other scene participants is greater than the t value in the reference line coordinates of the test object, then it is determined that the other scene participants are located to the right of the test object. If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the other participants in the scenario is greater than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the other scene participants is less than the t-value in the reference line coordinates of the test object, then it is determined that the other scene participants are located to the left of the test object.
9. The method according to claim 7, characterized in that, Determining the left-right relative positional relationship between the other scenario participants and the test object based on the t value in the reference line coordinate system corresponding to the target lane node includes: If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the target lane node is less than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t value in the reference line coordinates of the target lane node is greater than the t value in the reference line coordinates of the test object, then it is determined that the other scenario participants are located to the right of the test object. If the tangent vector of the road reference line of the road segment where the test object is located... With respect to the motion direction vector of the test object The directions are consistent, and the t-value in the reference line coordinates of the target lane node is greater than the t-value in the reference line coordinates of the test object, or the tangent vector of the road reference line of the road segment where the test object is located. With respect to the motion direction vector of the test object If the directions are inconsistent, and the t-value in the reference line coordinates of the target lane node is less than the t-value in the reference line coordinates of the test object, then it is determined that the other scenario participants are located to the left of the test object.
10. The method according to claim 1, characterized in that, The attribute information of the lane where the test object is located includes the lane direction. The calculation process for the lane direction vector corresponding to the lane direction includes: Parse the OpenDrive map data to obtain the road segment where the test object is located, as well as the starting point P1 and ending point P2 of the road segment reference line; The reference line coordinates of the starting point P1 and the ending point P2 are converted into coordinates in the world coordinate system. Using the starting point P1 as a reference point, when the t value in the reference line coordinates of the reference point is greater than 0, the direction of the lane direction vector in the world coordinate system is the same as the direction of the vector corresponding to the starting point P1 to the ending point P2; when the t value in the reference line coordinates of the reference point is less than 0, the direction of the lane direction vector in the world coordinate system is opposite to the direction of the vector corresponding to the starting point P1 to the ending point P2.
11. The method according to any one of claims 1 to 10, characterized in that, The traffic scenario includes: the test subject and the other scenario participants are in the same lane, and the relative positions of the other scenario participants and the test subject are such that the other scenario participants are in front of the test subject; The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes: The velocity, acceleration, and reaction time at the start of braking of the test object were obtained. Calculate the braking distance of the test object based on its speed, acceleration, and reaction time at the start of braking. If the braking distance is less than the preset safe distance, then it is determined that the test object complies with the traffic rules corresponding to the traffic scenario. If the braking distance is greater than the preset safety distance, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
12. A device for determining the traffic compliance of autonomous driving based on OpenDrive map data, characterized in that, The device includes: The connection graph construction module is used to construct a road relationship connection graph based on OpenDrive map data. The road relationship connection graph includes: a road segment connection graph indicating the predecessor and successor relationships between various road segment nodes in the road and a lane connection graph indicating the predecessor and successor relationships between various lane nodes in the road. The positional relationship determination module is used to determine the relative positional relationship between the test object and other scene participants based on the road relationship connection diagram and the coordinate values of corresponding points in the reference line coordinate system; wherein, the relative positional relationship includes: whether the test object and the other scene participants are in the same lane, the front-back relative positional relationship between the other scene participants and the test object, and the left-right relative positional relationship between the other scene participants and the test object; The lane attribute acquisition module is used to acquire the attribute information of the lane where the test object is located; The motion information acquisition module is used to acquire motion information of the test subject and other participants in the scenario; The compliance judgment module is used to determine the traffic scenario based on the test object, other scenario participants, and lane-related information, and to determine whether the test object complies with the traffic rules corresponding to the traffic scenario. The traffic scenario includes a situation where the test subject is in the same lane as the other participants in the scenario. The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes: Calculate lane direction vector relative to the motion direction vector of the test object The angle between them; If the included angle is less than the preset angle, the test object travels in the lane direction of the lane, and it is determined that the test object complies with the traffic rules corresponding to the traffic scenario. If the included angle is greater than the preset angle, then the test object is not driving in the lane direction of the lane, and it is determined that the test object has not complied with the traffic rules corresponding to the traffic scenario. The traffic scenario includes: the test subject passes through an intersection with guide lane lines and changes its driving direction at the intersection; The step of determining whether the test subject complies with the traffic rules corresponding to the traffic scenario includes: Parse the OpenDrive map data to obtain the direction of the guide lane lines; Calculate the lane direction vector of the guide lane line. and the motion direction vector of the test object The lane direction vector is obtained by performing dimensional expansion. Lane three-dimensional direction vector and the motion direction vector The three-dimensional direction vector of motion ; For the lane three-dimensional direction vector and the three-dimensional direction vector of the motion Perform the cross product to obtain the vector. Wherein, if the vector If the coordinate value on the z-axis is greater than 0, then the direction vector of motion is... Located in the lane direction vector The right side of the vector; if the vector If the coordinate value on the z-axis is less than 0, then the direction vector of motion is... Located in the lane direction vector The left side; In the vector If the coordinate value on the z-axis is greater than 0, then the lane direction vector If the instruction is to drive to the right, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the left, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario. In the vector If the coordinate value on the z-axis is less than 0, then the lane direction vector If the instruction is to drive to the left, it is determined that the test subject complies with the traffic rules corresponding to the traffic scenario; if the lane direction vector If the instruction is to drive to the right, it is determined that the test subject has not complied with the traffic rules corresponding to the traffic scenario.
13. A computer device, characterized in that, The computer device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the autonomous driving traffic regulation compliance judgment method based on OpenDrive map data as described in any one of claims 1-11.
Citation Information
Patent Citations
Automatic driving test-oriented traffic regulation compliance automatic judgment method and device
CN115662118A