Adversarial Actions and NADE¶
The framework ports TeraSim's adversarial behaviour generation (#385). There are three ways to use it:
- An adversarial action: one named NPC or pedestrian does one adversarial thing when its trigger holds. For example, it brakes hard in front of a follower, or cuts in.
- NADE: an environment action that picks, every tick, which agent near the ego carries out which adversity. It samples them more often than they happen naturally, and keeps the importance-sampling weight that makes the run's statistics unbiased.
- Scheduled static adversities: a stalled vehicle, or the aftermath of a collision, from one time to another.
The layers¶
| Layer | Module | What it does |
|---|---|---|
| Observation | adversity.observation |
Builds a Scene of the agents in the Lanelet2 map frame. It answers TeraSim's traci questions: the leader and follower within 40 m, the lanes beside, the next signal, a pedestrian's crosswalk and nearest road. |
| Triggers | adversity.triggers |
One pure function per kind. Each takes what the agent sees and returns an AdversarialCommand, or None. adversity_command applies the location gate first, then the kind's trigger. A vehicle's gate reads the lanes ahead from where it is on its lane; a pedestrian's, from its projection on the road nearest it, so one beside the junction end of a long approach is at INTERSECTION (#2024). |
| Location | adversity.location |
AdversityLocation: ANY, INTERSECTION, HIGHWAY, ROUNDABOUT. These are read from the map by the ODD's own probes, so an adversity fires where coverage records that location. |
| Commands | adversity.command |
An acceleration, a lane change or a path, planned along the lanes into a timed path (plan_command, predict_command). |
| Execution | actions._adversarial_execution |
Drives the path: it takes the vehicle from its traffic backend, follows the path, then hands the vehicle back. |
| NADE | adversity.nade, adversity.avoidance |
Candidates, prediction, challenge, avoidability, importance sampling and the victims' response. |
| Actions | actions.adversarial, actions.adversarial_traffic, actions.stalled_object |
What a scenario registers. |
The kinds¶
The numbers are TeraSim's defaults; each can be overridden in
TriggerThresholds. The accelerations come from the Intelligent Driver Model
(adversity.idm), which stands in for SUMO's car-following model.
TriggerThresholds refuses, when it is built, a value outside its bounds,
naming the field and the value (#2024), rather than dividing by zero in the
middle of a tick: a duration, lane_change_duration, abort_resolution,
jaywalk_duration, jaywalk_resolution, pedestrian_speed or
pedestrian_max_speed that is not finite and positive; a
pedestrian_speed_factor whose ends are not finite and positive, or whose
low end is above its high end; a negative or non-finite speed, gain,
distance, angle, headway or stop_crossing_wait deviation; and a
non-finite stop_crossing_wait mean (a negative mean is a pedestrian that
never waits). Its idm, an IdmParameters, refuses its own the same way
(#2200): a max_acceleration, comfortable_deceleration, exponent or
emergency_deceleration that is not finite and positive (a zero
acceleration or comfortable deceleration divides in the car-following
model, a negative emergency deceleration would make BRAKE_CHECK
accelerate), and a negative or non-finite minimum_gap or time_headway.
| Kind | Action | TeraSim | Fires when | Does |
|---|---|---|---|---|
BRAKE_CHECK |
AdversarialBrakeAction |
Follower | A vehicle follows it in its lane within 40 m, and they are not both stopped (under 0.5 m/s). The agent is not speeding up, and the follower is not slowing. | Brakes at the emergency deceleration (9 m/s²) for 2 s. |
IGNORE_LEADER |
IgnoreLeaderAction |
Leader | It is moving (at least 0.5 m/s), its leader holds it back by more than 1.5 m/s² (free flow against car following), and the speed difference is at least 2 m/s. | Accelerates at the free-flow rate for 2 s. |
CUT_IN |
AdversarialCutInAction |
LaneChange | A lane beside is blocked only by the vehicle behind there (closer than SUMO's secure gap). | Changes into that lane in 1 s. |
LANE_CHANGE_ABORT |
LaneChangeAbortAction |
LanechangeAbort | Blocked as for CUT_IN. The agent is moving, and its lanelet lasts more than 1 s more at its speed. |
Drifts half a lane toward that side and back in 1 s. |
HEAD_ON |
HeadOnAction |
Headon | As for IGNORE_LEADER, but the agent's lanelet and its leader's start more than 120° apart. |
Uses IGNORE_LEADER's command. |
TRAFFIC_RULE |
RunTrafficRuleAction |
TrafficRule | A red or yellow light is within 40 m ahead. When it has a leader, it must be held back by the light rather than by that leader (car following beats its acceleration by more than 1.5 m/s²); without a leader this test is skipped. Free flow beats its acceleration by more than 1 m/s², or it is braking while free flow is above 0.2 m/s². | Drives on through at the free-flow rate for 2 s. |
MERGE |
AdversarialMergeAction |
Merge | It is beside a merging lane with traffic on it, and not already changing lanes (turned 5° or more off its lane). | One lane over: speeds up as if the merging vehicle ahead were not there, when that beats giving way by more than 1.5 m/s² and it and its leader are not both stopped, for 2 s. Two lanes over: changes into the lane between in 1 s, when nobody there is within 2 s of headway. |
JAYWALKING |
JaywalkAction |
Jaywalking | A pedestrian is off any crosswalk, with a road within 10 m. | Walks straight across at its speed (1.4 m/s if under 1 m/s) × U(0.5, 2.0), for 5 s. |
RUNNING_RED_LIGHT |
PedestrianRunRedLightAction |
RunningRedLight | A pedestrian is waiting (at most 0.2 m/s) within 3 m of a crosswalk whose light is red. | Crosses it end to end at 2.8 m/s. |
STOP_CROSSING |
StopCrossingAction |
StopCrossing | A pedestrian is on a crosswalk. | Stands still for N(2 s, 0.5 s), then walks a crosswalk's length on along its heading at 2.8 m/s. |
The pedestrian kinds (PEDESTRIAN_KINDS) are only ever a pedestrian's, and
the other kinds only a vehicle's.
When an action fires¶
Each adversarial action takes the entity and a required location. Its
default trigger is an AdversityFeasibleCondition of its kind at that
location, which holds while the kind's trigger would fire. When the action
fires, the command the condition found is planned on the map and driven
(following_mode: FOLLOW by default, or POSITION, as TeraSim's
moveToXY does). At the end of the path the vehicle is handed back to its
traffic backend.
A condition given instead decides when the action fires. On that tick
the adversity's own trigger is still asked; when it does not hold, nothing is
done and a warning is logged. To require both, give the AndCondition of
the two.
from autoware_carla_scenario import (
AdversarialCutInAction,
AdversityLocation,
ElapsedTimeCondition,
)
# Cuts in on a highway whenever the gap allows it.
self.register_pre_tick(AdversarialCutInAction("npc1", AdversityLocation.HIGHWAY))
# Asked once, 3 s in: cuts in if it can then, else logs a warning.
self.register_pre_tick(
AdversarialCutInAction(
"npc2", AdversityLocation.ANY, ElapsedTimeCondition(3.0, label="later")
)
)
What is a merging lane¶
TeraSim recognises a ramp by its SUMO edge name, which contains "Ramp".
Lanelet2 has no such name, so MapFeatures.merges defines a merging lane as
a lane that ends into the lane beside it. It either ends beside that lane,
or shares what follows with it. This holds at the lanelet itself, or along
its straightest successors within 100 m (MERGE_WINDOW_M).
merges(lanelet, side) asks for one side: "left" for a lane ending into
the lane on its left (an on-ramp where traffic keeps right), "right" for
one ending into the lane on its right (where traffic keeps left, as on the
nishishinjuku fixture map). Without a side it answers for either. MERGE
looks on both sides of the agent, the right first, for a lane merging toward
it: on its right, one ending into the lane on its left; on its left, one
ending into the lane on its right. Two lanes over, it changes lanes toward
that side.
A crosswalk's light¶
RUNNING_RED_LIGHT reads the Lanelet2 traffic-light regulatory element that
the crosswalk lanelet carries. That is the pedestrian signal in an Autoware
map. A crosswalk without one has no red light to run.
NADE¶
AdversarialTrafficAction runs TeraSim's NADE loop on every tick of the run:
- Candidates: the
max_controlled(5) vehicles nearest the ego withincontrol_radius(50 m), and every pedestrian there, in one list nearest first whatever their kind (#2024). - Adversity: each candidate's adversity is the first entry of
adversitieswhose trigger fires. That gives{normal: 1 - p, adversarial: p}. - Prediction:
horizon(5 s) everyresolution(0.5 s). The ego is predicted normal: it holds its acceleration along its lane, or changes lane when its turn indicator says so. - Challenge: the candidate's adversarial future conflicts with the
ego's normal future (TeraSim's AV-centred NADE). With
challenge_npcs, it is also checked against the other candidates' futures. - Avoidability: if no victim can brake out of the conflict (emergency
brake, with a 0.5 m buffer),
pis multiplied by 3e-4 and the magnitude by 40. - Importance sampling:
q = clip(p × magnitude (20), 0, max_is_probability (0.05)), orfixed_is_probabilitywhen that is set. At most one adversity is sampled per tick, the nearest challenger first, and none forcooldown(5.5 s) after one. - Response: when the ego is not among the sampled adversity's
victims, its NPC victims avoid it with probability q = 0.2 (p = 0.99) by
braking at the emergency deceleration for 3 s, or else accept it and hold
their speed for 2 s. That response carries its own weight; for an
unavoidable adversity nothing is drawn and they accept it. When the ego
is a victim (TeraSim's
AV_neglected), no response is drawn and no victim is driven, not even an NPC one beside it: the ego drives itself. Withoutchallenge_npcs(the default) the ego is the only victim an adversity can have, so there is never a response.
NadeSettings refuses, when it is built, a value outside its bounds, naming
the field and the value (#1458): max_controlled below 0; a negative or
non-finite control_radius, magnitude or cooldown; a horizon or
resolution that is not finite and positive; and a max_is_probability or
fixed_is_probability outside [0, 1]. A q above 1 would sample the adversity on
every draw yet still weight the run by p / q, under-weighting it in
silence. The editor's Adversarial Traffic card declares the same bounds, so
it reports such a value while the document is edited.
AvoidanceSettings (the avoidance of NadeSettings) refuses its own in
the same way (#1463): an avoid_probability, avoid_is_probability or
unavoidable_factor outside [0, 1]; a negative or non-finite buffer or
unavoidable_magnitude; and an avoid_duration or accept_duration that
is not finite and positive. An avoid_is_probability above 1 would have
every victim avoid yet still weight the run by p / q. Neither the editor
nor a scenario's scenario.* keys set these: they stay TeraSim's unless
built in code.
from autoware_carla_scenario import (
AdversarialTrafficAction,
AdversityKind,
AdversityLocation,
NadeAdversity,
)
self.register_pre_tick(
AdversarialTrafficAction(
[
NadeAdversity(AdversityKind.CUT_IN, AdversityLocation.HIGHWAY, 0.002),
NadeAdversity(AdversityKind.BRAKE_CHECK, AdversityLocation.ANY, 0.001),
],
seed=7,
)
)
seed (as the adversarial actions' and AdversityFeasibleCondition's) is a
whole number from 0 to 2147483647 (2**31 - 1); None, the default, follows the run's seed. A
seed of 2.5, True or -1 is refused when the action is built, naming
seed, rather than read as 2 or 1.
NADE splits a run's seed into three random streams: the sampling draws, the
triggers' own draws (a jaywalker's speed, a crosser's wait) and the victims'
responses. Stream i of seed s is seeded with 3 s + i
(adversity.nade.stream_seed), so no stream of one run is a stream of
another, and a sweep over consecutive seeds gives independent runs (#2024).
A run still repeats from its seed. Before #2024 the streams were seeded
s, s + 1 and s + 2, so run k's triggers drew what run k + 1
sampled with; the draws for a given seed other than 0 changed with the fix.
An AdversityFeasibleCondition -- the default trigger of every adversarial
action -- draws from a stream of its own as well. Its seed is
3 * 2**31 + s * 2**30 + k (adversity.nade.trigger_stream_seed), where s
is its seed (the run's, by default) and k is a 30-bit key of its entity,
kind and label: FNV-1a over "<entity>\x1f<kind>\x1f<label>"
(adversity.nade.trigger_key), not hash(), which Python salts per process.
These seeds are above every seed NADE's streams or a component seeded with
the run's seed itself use, and one-to-one over seeds and keys, so two
jaywalkers following the run's seed draw different speeds and waits, and no
condition draws another run's numbers (#2226). Before #2226 a condition drew
from random.Random(s), the same stream for every condition of a run and, at
seed 3 k, NADE's sampling stream of seed k; the triggers' draws of every
seed changed with the fix.
It drives the NPCs and pedestrians a scenario registers, and with
drive_background (the default) the traffic backend's background vehicles in
the world too (#417): the TrafficManager's background traffic
(background<N>), SUMO's ambient vehicles (sumo:<id>). One that carries out
an adversity, or responds to one, is taken over for as long as its path lasts
-- off autopilot, or published into SUMO from CARLA like a released entity --
and handed back to the backend after. SUMO's mesoscopic vehicles have no actor
to take over, and SUMO's pedestrians are not driven.
A road user NADE drives is held like any action's entity: from the tick its
path starts to the tick it is handed back, NADE holds its movement (both
control domains, #1295). So it never picks
a road user whose longitudinal or lateral domain another action holds, and an
action that fires to command one it is driving raises ControlConflictError
naming AdversarialTrafficAction. An action with overrides=True takes it
instead: that road user's path is stopped and it is handed back to its driver
before the overriding action commands it. Only that road user: NADE runs on,
its weight as it was, and the others it drives (an adversary's victims, say)
carry on.
The weight¶
Each tick of a run multiplies the run's likelihood ratio by one factor:
p / qwhen an adversity is sampled;(1 - p) / (1 - q)for each candidate whose adversity challenged a victim but was not drawn --1 - pwhen itsqis 0 (amagnitudeormax_is_probabilityof 0), as it is never drawn (#2200);- the response's own factor, when one is drawn.
A statistic weighted by this ratio is the naturalistic one. The action's
weight is the ratio. BaseScenario.importance_sampling_weight is the
product of every action's weight, which is 1.0 without NADE. You can read it:
- as the built-in metric
importance_sampling_weight(aggregationlast; see Metrics); - in the trajectory log, where each sampled adversity is an
adversityrecord with itsp, itsq, the weight at that point, the victims and the response (see Trajectory Log). - in the run's coverage file, as
outcome.weight: a run is importance sampled when one of its actions is (BaseScenario.outcome_weight; NADE is), and only such a run records a weight.
To count which kinds were sampled, register a coverage item on
AdversarialTrafficAction.sampled_kind (see Coverage).
Merging a batch's coverage files (scenario-coverage) then estimates the
naturalistic failure rate per scenario and environment: the mean of the
weighted failures with its 95% interval, the relative half width it has
converged to (TeraSim's NADE stops below 0.3), the self-normalised rate and
the effective number of runs (openodd's weighted outcomes, see
Coverage).
Whether an adversity is under way¶
AdversityActiveCondition holds while a road user is carrying out an
adversity. It does not matter who started it: a named NPC's own adversarial
action, or NADE sampling a background vehicle. An EntityFilter says whose
adversities count, and a list of kinds says which (Conditions):
from autoware_carla_scenario import (
AdversityActiveCondition,
AdversityKind,
EntityFilter,
StickyCondition,
)
# A cut-in by anyone within 30 m of the ego, at any time in the run.
self.register_pass_condition(
StickyCondition(
AdversityActiveCondition(
EntityFilter(max_distance_m=30.0),
[AdversityKind.CUT_IN],
label="cut_in_near_ego",
)
)
)
# A brake check by one of the TrafficManager's background vehicles ahead.
AdversityActiveCondition(
EntityFilter(names=("background*",), min_ahead_m=0.0),
[AdversityKind.BRAKE_CHECK],
label="background_brake_check_ahead",
)
How long it holds. It holds from the tick the road user starts driving
the adversity's path to the tick it is handed back to traffic. Under a
StickyCondition it says that the adversity happened. With no filter and no
kinds, it holds for any adversity anywhere.
Victims' responses. A NADE victim's response (it avoids or accepts
another road user's adversity) counts only with include_responses=True. It
counts as the adversity it responds to, and its message names whose that is.
Where the state comes from. Each adversity's execution records itself in
adversity_activity when it starts and removes itself when it hands the road
user back. The runner clears what is recorded before each scenario.
It is the adversity_active card. Its filter fields are the
entity_count card's.
Stalled objects and collisions¶
TeraSim's StalledObjectAdversity and CollisionAdversity are scheduled,
not sampled. StalledObjectAction stands a vehicle still at a pose from
start_time to end_time (scenario seconds; None means it is never
removed). Outside that window the vehicle is out of the world.
A vehicle cannot be spawned once a run has started, so the scenario spawns it
in setup, preferably out of the world (spawn.hidden). The action is a
trajectory run (the engine of RoutingAction's position mode) of a held pose, with hidden_outside_trajectory.
collision_objects creates two of them for a collision's aftermath.
from autoware_carla_scenario import Lanelet2Pose, StalledObjectAction, collision_objects
self.register_pre_tick(
StalledObjectAction("stalled1", Lanelet2Pose(1043, 30.0), start_time=5.0)
)
for crashed in collision_objects(
"npc3", "npc4", Lanelet2Pose(2001, 12.0), Lanelet2Pose(2001, 17.0, heading=0.4),
start_time=0.0, end_time=60.0,
):
self.register_pre_tick(crashed)
Construction zones¶
ConstructionZoneAction lays out TeraSim's ConstructionAdversity along a
lane (adversity.construction): from start_s to end_s metres along it,
past its lanelet's end on along the straightest successors. These are the zones:
| Zone | Where | Objects |
|---|---|---|
| warning | warning_zone_length (100 m) before the start |
signs on the shoulder, every warning_zone_spacing (30 m) |
| taper_in | taper_length_in (60 m) from the start |
cones, from 0.3 m inside the lane's edge to the work zone's offset |
| buffer | buffer_zone_length (10 m) |
cone, cone, barrier |
| work | to taper_length_out (30 m) before the end |
construction_type: cone, barrier, or mixed |
| taper_out | to the end | cones, back to the edge |
| termination | termination_zone_length (30 m) after the end |
signs |
spacing (20 m) is the distance between objects, scaled by 0.7 in a taper
and 0.8 in the buffer. With use_dynamic_spacing and speed_limit_mph,
MUTCD's spacings apply instead. A taper can be linear or curved (an
s-curve). The zone closes in from side, "right" by default; TeraSim instead
picked the side from the SUMO lane's index.
A zone shorter than taper_length_in + buffer_zone_length + taper_length_out
(100 m by default) has no work zone. The two tapers and the buffer are then
shortened in proportion so that they fill the zone from start_s to end_s,
one after another. At full length they would overlap, with cones on top of
each other and past end_s (#2263). The editor warns of such a zone. The
warning zone never reaches before s = 0, so a zone that starts at 0 or
before it has none.
start_s and end_s must be finite, with end_s after start_s.
ConstructionSettings refuses a number that is not finite, a spacing
(spacing, warning_zone_spacing) that is not positive, and a negative
length, speed_limit_mph or merge_signs; a length of 0 means no such
zone. Its text fields must be spelled exactly as listed, in lower case:
construction_type one of cone, barrier or mixed; side one of
right or left; taper_type one of linear or curved; and layout
one of highway or urban. Any other value is refused when the settings
are built, naming the field and the value (#2263). A zone whose spacing
would lay out more than MAX_ZONE_OBJECTS (100,000) objects is refused
when it is placed (#1479).
From start_time to end_time (None: never removed) the objects stand in
the world as CARLA props, each added by a SpawnAction and named
<label>#<k>/<zone>/<n> (docs/api.md), where <k> numbers the zone
actions, so two zones with the same label each own their own props (#2013).
Unlike a vehicle, a prop may appear while a run is under way. When the zone appears, two things happen:
clear_traffictakes the backend's background vehicles in the zone off the road;close_lanetells the backend the lane is closed. SUMO then disallows every vehicle class on it, as TeraSim'sfull_lanemode does. The TrafficManager cannot close a lane, and says so; aTrafficSinkActionon the zone keeps its traffic out.
TeraSim's full_lane mode places no object. Here the objects are always
placed: a closure Autoware cannot see is one it drives into. At end_time the
props are removed and the lane is reopened; when the run ends, the lane is
reopened and the runner takes the props away with every other.
from autoware_carla_scenario import ConstructionSettings, ConstructionZoneAction
self.register_pre_tick(
ConstructionZoneAction(
1043, start_s=120.0, end_s=260.0,
settings=ConstructionSettings(construction_type="mixed", side="right"),
start_time=0.0,
)
)
Urban construction zones¶
layout="urban" lays out TeraSim's UrbanConstructionAdversity
(adversity/static/urban_construction.py) instead (#445). TeraSim builds a
corridor of SUMO edges across several intersections and lays out each edge
on its own. Here one ConstructionZoneAction is one approach of that
corridor: start_s is where the approach begins and end_s is the
intersection it ends at. For a corridor, add one action per approach. Lane
closure, clearing traffic and the props are the same as above. These are the
zones:
| Zone | Where | Objects |
|---|---|---|
| warning | from the start, warning_zone_length (200 m) but at most 0.3 of the approach |
at most three signs, every warning_zone_spacing (30 m) |
| work | to the merge taper (with no merge taper, to 0.9 of the approach) | along the closed side, 0.5 m inside the lane's edge, every spacing (10 m); for construction_type="cone", every fifth object is a barrier |
| merge_signs | before the merge taper | merge_signs (2) signs, 50 m apart, none before the start |
| merge_taper | the last merge_distance (150 m) before the end |
cones every half spacing (5 m), from 0.3 m inside the closed side's edge across to 0.3 m inside the other edge, shutting the lane before the intersection (TeraSim's merge_before) |
An urban zone has no taper in, buffer or termination zone, and no
work_zone_offset or MUTCD spacing. taper_type="curved" shapes the merge
taper. The warning zone and the merge taper include their end, as TeraSim's
do, so with a whole number of steps the last cone stands at the intersection.
The work zone does too when there is no merge taper; with one, it stops
short of its end, where the merge taper's first cone stands.
URBAN_CONSTRUCTION holds TeraSim's urban values. They come from the
UrbanConstructionAdversity source and its Ann Arbor example
(examples/scenarios/ann_arbor/urban_construction.yaml): cones every 10 m in
the work zone and every 5 m in the merge taper, three warning signs 30 m
apart, merge signs 50 m apart, signs 2 m out on the shoulder, a 200 m warning
zone and a 150 m merge taper. In the editor, the urban_construction_zone
action starts from these values.
from autoware_carla_scenario import (
URBAN_CONSTRUCTION,
ConstructionSettings,
ConstructionZoneAction,
)
# The 300 m approach to an intersection, closed from the right.
self.register_pre_tick(ConstructionZoneAction(1043, 0.0, 300.0, URBAN_CONSTRUCTION))
# Closed from the left, with a shorter merge taper and three signs before it.
self.register_pre_tick(
ConstructionZoneAction(
1051, 0.0, 200.0,
ConstructionSettings(
layout="urban", spacing=10.0, warning_zone_length=200.0,
warning_sign_offset=2.0, side="left",
merge_distance=80.0, merge_signs=3,
),
)
)
Coordinate conventions¶
- Triggers and NADE: everything is in the Lanelet2 map frame: x East,
y North, yaw in radians counter-clockwise from +x. Gaps run bumper to
bumper along the lanes. A lane's
sis measured along its centreline, andtis positive to the left. - Execution: planned paths are
MapPosevertices in that frame. The trajectory follower places them in CARLA's left-handed world (y South, yaw in degrees clockwise) through the map's offset, as for any trajectory. - Signals: a light's state is keyed by its Lanelet2 traffic-light
regulatory element's id, and read off CARLA by
adversity.snapshot.
Differences from TeraSim¶
| TeraSim (SUMO) | Here (Lanelet2 and CARLA) |
|---|---|
| SUMO's car-following model | The Intelligent Driver Model, with TeraSim's gains as defaults |
getLeader, getLaneChangeStatePretty |
Scene: lane chains of the routing graph, with SUMO's secure gap for "blocked" |
convert2D along an edge |
The lanelet's centreline and its normal |
A ramp by its edge name "Ramp" |
MapFeatures.merges (above) |
| A walking area controlled by a TLS link | The crosswalk lanelet's own traffic light |
A person's SUMO maxSpeed |
pedestrian_max_speed, 2.8 m/s (the fastest jaywalker) |
| StopCrossing counts steps at dt = 0.1 | The wait is in seconds |
is_lane_changing: heading 5° or more off the SUMO lane's angle |
The same, off the Lanelet2 lanelet's direction (LanePosition.heading) |
| Background vehicles are adversarial | So are they, with drive_background (default): the backend's background vehicles in the world (#417) |
| Construction zones: SUMO vtypes for cones, barriers and signs; full_lane only closes the lane | CARLA props (static.prop.*), always placed, plus the lane closed to the backend (#402) |
UrbanConstructionAdversity: a corridor of edges across num_intersections, found by the edges' road priority, with a merge taper before each intersection |
One approach per ConstructionZoneAction (layout="urban"), from start_s to the intersection at end_s; a corridor is one action per approach (#445) |
| Urban work zone: a barrier added beside every fifth cone | The barrier replaces that cone, so the two props do not overlap |
| Urban work zone up to the merge taper's start inclusive, where the taper's first cone stands too | Short of it, so the two props do not overlap |
| Urban spacings hard-coded: warning signs 30 m, work zone 10 m, merge taper 5 m; the merge taper always linear | warning_zone_spacing, spacing and half spacing (the same with URBAN_CONSTRUCTION); taper_type="curved" shapes the merge taper |
| Urban warning zone of no length: one sign at the edge's start | No warning zone, no sign |
Urban signs: always on the right shoulder; merge signs named by merge_signs texts |
On the closed side's shoulder; merge_signs is how many, all the same prop |
| Urban construction vehicles and workers (excavator, dump trucks, warning vehicles) | Not placed |