4 Entities
ASAM OpenSCENARIO 1.2.0 Vehicle
, Pedestrian
, and MiscObject
have corresponding types in ASAM OpenSCENARIO 2.0.0.
Entities Vehicle
and Pedestrian
are represented by structs of the same name but lowercase.
MiscObject
is represented by stationary_object
.
Instead of instantiating a vehicle with a specific category, for example, a motorcycle, the vehicle category is constrained to be a motorcycle. It is good practice to constrain as few entity fields as possible, as this allows for a greater variations range and easier composition of scenarios.
Code 11. ASAM OpenSCENARIO 2.0.0
my_motorcycle: vehicle
keep (my_motorcycle.vehicle_category == vru_vehicle)
keep (my_motorcycle.axles.size() == 2)
keep (my_motorcycle.axles[0].number_of_wheels == 1)
keep (my_motorcycle.axles[1].number_of_wheels == 1)
...