CalculatePostEncroachmentTime¶
ID: ADAS/CalculatePostEncroachmentTime
Calculates the post encroachment time (PET) between two road participants in seconds. Returns 0 if they collide with each other.
In order to follow a generic approach, this example trace step does not make use of any geometric parameters of the road participants such as bounding boxes. Instead, only the x and y coordinates of the corresponding reference point trajectories are used. The PET is defined by the amount of time that elapses since a first participant left a common space until another participant reaches that common space. The common space itself is implicitly defined by the fact that in environments of the location points of one participant there are also location points of the other participant. More precisely, the environments are given by circles with radius ‘Tolerance’, i.e. the Euclidean distance in the x,y plane is used and must be less than or equal to ‘Tolerance’.
In order to be able to trigger on situations of interest, there are optional outgoing signals ‘FirstParticipantInCommonSpace’ and ‘SecondParticipantInCommonSpace’. These establish a logical connection between the participant and the shared space: They have the signal value True exactly when the participant is in the shared space, otherwise they are False.
Signals¶
FirstParticipantX¶
X coordinate of the first participant.
Direction: IN
Optional: False
FirstParticipantY¶
Y coordinate of the first participant.
Direction: IN
Optional: False
SecondParticipantX¶
X coordinate of the second participant.
Direction: IN
Optional: False
SecondParticipantY¶
Y coordinate of the second participant.
Direction: IN
Optional: False
FirstParticipantInCommonSpace¶
Boolean array that is True during the time where the first participant crossed the common space, otherwise False.
Direction: OUT
Optional: False
SecondParticipantInCommonSpace¶
Boolean array that is True during the time where the second participant crossed the common space, otherwise False.
Direction: OUT
Optional: False
Parameters¶
Tolerance¶
Euclidian distance around the participants, which is used to calculate their common space.
Direction: IN
PostEncroachmentTime¶
The calculated post encroachment time in seconds.
0 if both participants collide at any point in time. Larger than 0 if both participants crossed the same common space within the given tolerance. -1 if both participants never cross each other’s paths.
Note: If there are multiple instances where both participants cross each other’s path without collisions a list of corresponding PETs is returned instead. The use of trigger blocks is encouraged in this case.
Direction: OUT