Creating a New Scenario From Scratch#
SUMO Network and Configuration#
For compatibility with the VCE, your SUMO scenario must contain the following:
A routes file (
.rou.xml) with the following information:<vType id="ego-type" color="blue"/> <route id="ego-route" edges="-19206342#0 -19206341#6 -19206341#4 -19206341#3 -19206341#1 -323350445#1 -369470720"/>
- vType:
A vehicle type definition for
ego-type.- route:
The route that the ego vehicle will (likely) travel. This is mainly necessary for other traffic participants to react appropriately depending on whether the ego vehicle is going to go straight at an intersection or turn right.
If you look at some of the example scenarios (e.g.,
scenarios/example-intersection/), you may notice that they have two.rou.xmlfiles, and that one of them is namedego-vehicle-only.rou.xml. Since the SUMO configuration file (.sumo.cfgor.sumocfg) allows us to define multiple route files for one scenario, we can keep the ego vehicle definition separate from other routes that we might regenerate more frequently.A network file (
.net.xml) with a specific setting ofprojParameterin thelocationelement. For the time being, our 3D Environment simply passes this parameter on to a third-party library, which has no understanding of SUMO’s-or!special definitions ofprojParameter. If your scenario is generated artificially, you may simply copy a value ofprojParameterfrom one of the example scenarios.An additionals file (
.poly.xml).When you select a
.net.xmlin the 3D Environment, it will automatically look for a file with the same name that has the.poly.xmlfile name extension.This file should include at least one point of interest (
poi) of typeEgoVehicleStartto define where the ego vehicle will be spawned.In addition the additionals file may include
polyelements of typebuildingorpoielements for supported street signs – currently type values starting withStreetSign_and ending with:yieldprioritystopno_entryno_left_turnno_right_turnno_straight_ononeway_leftoneway_rightonly_left_turnonly_right_turnspeed_limit_30speed_limit_50
EVI Configuration#
Todo
TODO
Optional Triggers File#
The EVI can optionally read a <scenario name>.triggers.yaml file and trigger certain events when the ego vehicle approaches a trigger point and gets closer than a defined distance.
Events include the following, corresponding to their respective class in evi/src/evi/triggers.py:
- SpawnEvent:
Spawn a new vehicle.
- ResumeEvent:
Resume a previously stopped vehicle.
- SignalEvent:
Set the active signals of a given vehicle, such as lights or open doors (which are also defined as signals in SUMO).
A triggers file may look as follows:
config:
default_vehicle_type: default
triggers_max_radius: 3
triggers:
- ego_xy: [42, 1337, 0]
spawn:
- arrival_lane:
vehicle_id: triggered-car0
arrival_pos:
arrival_speed:
depart_delay_seconds:
depart_lane:
depart_pos:
depart_speed:
num_vehicles: 1
vehicle_type: default # we could leave this out because of line 2
route…
Veins-EVI#
Todo
TODO