Skip to content

104. Match scenario modifiers – Trailer / compound-object handling

This section describes how each modifier behaves when one or more actors are compound objects, such as a tractor towing a trailer.

Two independent situations exist for each modifier:

Situation When it applies
Compound main actor The subject of the modifier (the vehicle whose property is being checked) is a compound object.
Compound parameter A reference vehicle passed as a modifier parameter (e.g., ref_car, ref_object, ahead_of) is a compound object.

104.0.1 Compound strategies reference

Strategy Meaning
Tractor only Only the tractor is evaluated; the trailer is ignored.
OR (tractor or trailer) Returns true if either the tractor or the trailer satisfies the condition.
AND (tractor and trailer) Returns true only if both the tractor and the trailer satisfy the condition.
Area-weighted average Combines tractor and trailer contributions weighted by their bounding-box areas (length × width).
Closest part Selects the part (tractor or trailer) whose value is closest to the reference.
Minimum absolute distance Uses the part with the smallest absolute distance to the reference.
Center average Uses the arithmetic mean of the tractor's and trailer's center positions as the representative center of the compound vehicle.

104.1 physical_object.on_road for compound objects

Role Strategy Details
Compound main actor Area-weighted average The on-road percentage is computed separately for tractor and trailer. The results are combined using an area-weighted average (size_ratio = tractor_area / trailer_area). The combined fraction must satisfy min_threshold for the modifier to return true.

104.2 physical_object.object_in_junction for compound objects

Role Strategy Details
Compound main actor OR Returns true if the tractor or the trailer is inside the junction within the specified distance.
Compound parameter (ref_car) OR The condition is satisfied if either the tractor or the trailer of ref_car is inside the junction, for example when the trailer remains inside the junction while the tractor has already exited.

104.3 physical_object.on_lane for compound objects

Role Strategy Details
Compound main actor OR Returns true if either the tractor or the trailer is in the same lane as ref_car.
Compound parameter (ref_car) Tractor only When ref_car is a compound object, only the tractor is used as the reference lane.

104.4 vehicle.lane_boundary for compound objects

Role Strategy Details
Compound main actor OR Returns true if either the tractor or the trailer is on, approaching, or departing from the lane markings. This ensures that a trailer remaining on the markings after the tractor has left is correctly detected.

104.5 vehicle.speed for compound objects

Role Strategy Details
Compound main actor Tractor only Speed is evaluated on the tractor, since the trailer is a passive follower.
Compound parameter (faster_than / slower_than) Tractor only The reference vehicle's speed is evaluated on the tractor only.

104.6 vehicle.lateral_speed for compound objects

Role Strategy Details
Compound main actor Tractor only Lateral speed is measured on the tractor.

104.7 vehicle.yields for compound objects

Role Strategy Details
Compound main actor Tractor only The yielding check (deceleration / standstill) is evaluated on the tractor.

104.8 vehicle.position for compound objects

Role Strategy Details
Compound main actor Closest part The longitudinal distance to the SUT is calculated independently for the tractor and the trailer. The part with the smaller absolute distance (i.e. the one closest to the SUT) is used for the range comparison. This correctly handles both cases: when the tractor is nearest and where the trailer is nearest.
Compound parameter Tractor only Due to reliance on pre-calculated TSV distance properties, only the tractor is used as a reference.

104.9 vehicle.lane for compound objects

Role Strategy Details
Compound main actor OR Returns true if either the tractor or the trailer is in the evaluated lane (or satisfies the side/same/leftmost/rightmost condition).
Compound parameter (same_as / side_of) OR The condition is met if either the tractor or the trailer of the compound parameter is in the expected lane relative to the main actor.

104.10 sut_vehicle.lane_occupied for compound objects

Role Strategy Details
Compound main actor (ego) Tractor only The Ego's position and side lane are determined from the tractor only.

Note

When an NPC found in the relevant lane is a compound object (tractor + trailer), the check is satisfied if either part occupies the lane within the distance constraints.

104.11 vehicle.oncoming for compound objects

Role Strategy Details
Compound main actor OR The compound vehicle is considered oncoming if either the tractor or the trailer is moving towards the reference vehicle.
Compound parameter (ref_car) OR The ref_car is considered oncoming if either the tractor or the trailer of the compound ref_car is approaching.

104.12 vehicle.veering_to_opposite_lane for compound objects

Role Strategy Details
Compound main actor Area-weighted average Tractor and trailer veering fractions, which represent the portion of the vehicle width beyond the leftmost lane edge, are combined using an area-weighted average. The resulting fraction is compared to veer_threshold. Parts fully inside the lane contribute 0 to the weighted average, and any negative contributions are clamped to zero.

104.13 vehicle.in_junction for compound objects

Role Strategy Details
Compound main actor OR Returns true if either the tractor or the trailer are inside the junction while satisfying all other constraints, such as turn_direction, and start_offset.
Compound parameter (ref_car) OR The condition is met if either the tractor or the trailer of ref_car is in the junction, matching the same reasoning as above.

104.14 vehicle.in_encroachment_area for compound objects

Role Strategy Details
Compound main actor OR Returns true if either the tractor or the trailer is within the encroachment area.
Compound parameter (ref_car) Tractor only The lane history used to compute the encroachment area is taken from the tractor of the compound ref_car.

104.15 sut_vehicle.global_position for compound objects

Role Strategy Details
Compound main actor (ego) Minimum distance The closest part of the compound vehicle (tractor or trailer) is used.
Compound parameter (ref_object) Minimum distance The closest part of the compound vehicle (tractor or trailer) is used.

104.16 sut_vehicle.lateral_position for compound objects

Role Strategy Details
Compound main actor (ego) measure_by-dependent For nearest: the closest part of the compound vehicle (tractor or trailer) is used. For center_to_center: Only the tractor is taken into account.
Compound parameter (ref_object) measure_by-dependent For nearest: the closest part of the compound vehicle (tractor or trailer) is used. For center_to_center: The average between the tractor and trailer distances is used.

104.17 sut_vehicle.longitudinal_position for compound objects

Role Strategy Details
Compound main actor (ego) measure_by-dependent For nearest: the closest part of the compound vehicle (tractor or trailer) is used. For center_to_center: Only the tractor is taken into account.
Compound parameter (ref_object) measure_by-dependent For nearest: the closest part of the compound vehicle (tractor or trailer) is used. For center_to_center: The average between the tractor and trailer distances is used.

104.18 vehicle.traffic_light for compound objects

Role Strategy Details
Compound main actor OR Returns true if the tractor or the trailer detects a matching traffic light within the specified distance.

104.19 vehicle.keep_lane for compound objects

Role Strategy Details
Compound main actor Tractor only Lane-keeping continuity is tracked for the tractor only, as the tractor steers and the trailer necessarily follows.

104.20 vehicle.lateral_offset for compound objects

Role Strategy Details
Compound main actor Line-dependent The behaviour depends on the line parameter:
  • center – only the tractor's center offset is used; the trailer is ignored.
  • left – the maximum (further-left) offset between tractor and trailer is selected, so the modifier reflects the leftmost edge of the full compound vehicle.
  • right – the minimum (further-right) offset between tractor and trailer is selected, so the modifier reflects the rightmost edge of the full compound vehicle.
The selected offset is then compared to the distance range.

Note

When the vehicle is on a non-driving lane and return_value_for_non_driving_lane is set, that configured value is returned immediately without considering the trailer.

104.21 vehicle.nearest_on_lane for compound objects

Role Strategy Details
Compound main actor Tractor only Nearness is determined based on the tractor only. During the internal search, trailers of compound NPC vehicles are also evaluated as candidates – if a trailer is the closest part to the reference vehicle, it counts (with the tractor credited as the nearest vehicle).
Compound parameter (ahead_of / behind) Tractor only The reference lane is determined from the tractor of the compound ahead_of / behind vehicle.

104.22 sut_vehicle.leading_to_junction for compound objects

Role Strategy Details
Compound main actor OR Returns true if the tractor or the trailer is in the leading-to-junction zone (satisfying start_offset constraints for either part).

Additionally, when collecting actors that share junctions with the SUT, trailers of those actors are also considered as potential junction-sharing actors.

104.23 vehicle.on_road_element for compound objects

Role Strategy Details
Compound main actor OR Returns true if the tractor or the trailer is on the specified road element (e.g. highway, highway_exit, …).

104.24 vehicle.off_road for compound objects

Role Strategy Details
Compound main actor Mode-dependent The behaviour depends on the is_off_any_road parameter:
  • is_off_any_road = trueAND logic: the compound vehicle is considered off any road only if both the tractor and the trailer have no occupied driving lanes.
  • is_off_any_road = false (default)Area-weighted average: off-road fractions are computed separately for tractor and trailer, combined using an area-weighted average, and compared to veer_threshold.

104.25 vehicle.road for compound objects

Role Strategy Details
Compound main actor OR Returns true if the tractor or the trailer is on the same or opposite road as the reference object, within the specified time windows.
Compound parameter (ref_car) OR The condition is met if the tractor or the trailer of ref_car is on the matched road.

104.26 vehicle.angles_within_range for compound objects

Role Strategy Details
Compound main actor Tractor only The yaw-angle difference is computed using the tractor's angle.
Compound parameter (ref_car) Tractor only The reference yaw is taken from the tractor of the compound ref_car.

104.27 vehicle.traffic_ahead for compound objects

Role Strategy Details
Compound main actor Tractor only The receiving vehicle's position is evaluated on the tractor.

Additionally, when searching for blocking vehicles ahead, the search also considers the trailer of any compound vehicle in traffic. If the trailer is within the longitudinal and lateral distance thresholds and is slow enough, it can trigger the modifier.

104.28 Modifiers without dedicated compound handling

The following modifiers do not have dedicated compound-object implementations.

They are evaluated on the tractor of the compound vehicle by the base modifier infrastructure:

  • vehicle.driving_against_lane_direction
  • vehicle.acceleration
  • vehicle.height

104.29 Glossary

Term Definition
Compound object A tractor that has a trailer attached to it.
Tractor The front, powered vehicle of a compound object, considered the primary actor for motion control.
Trailer The rear, unpowered vehicle of a compound object that is towed by the tractor.
Compound main actor The compound object is the subject of the modifier evaluation (the actor whose property is being checked).
Compound parameter A compound object appears as a reference value in one of the modifier's parameters (e.g., ref_car, ahead_of).