Skip to end of metadata
Go to start of metadata

Elements in this tab allow the user to load and transform Commonroad scenarios which follow the 2018 or 2020 specifications. The scenario will then be drawn in the MapView of the LCC and obstacles will either be simulated or used to control real vehicles with VehicleCommandTrajectory messages. (TODO:) Planning problems, obstacles etc. defined in the scenario will be used for the simulation and will be communicated to the participants when the simulation is started in Setup.

The tab also shows some basic information about the set planning problems, allows to transform the problem (and to store that transformation) and gives options on what elements of the problem to show.

Choosing a Scenario

A scenario can be chosen similarly to the script selection in Setup. Either use the Open button or edit the path text field and hit Enter.

Commonroad Specification

Some unsupported features and minor problems during parsing lead to warnings visible in the LCC Errors Tab. More severe warnings will lead to an error message (see below).

Traffic lights are currently not being simulated, but their position is shown, if possible.

We also do not (yet) have a consistent handling of inexact positional values (we currently use the average) and rotations for shapes. The assumed default value for positions is (0,0) (origin).

Your chosen scenario gets centered when it is loaded, w.r.t the middle of the Lab's IPS boundaries. It is not automatically resized, though, so you might not see the whole scenario when you load it.

Error Messages

Upon loading a scenario. you might receive an error message. Parts of the implemented loader check your scenario for consistency with the Commonroad specification. If it is malformed, values are missing or wrong types are used, you will find that the scenario will not load. Instead, a window will appear, which refers you to the line (in your scenario file) that raised the error.

IMPORTANT: There are also less relevant errors, e.g. related to drawing, which might be caused by currently missing implementation or decisions made on which Commonroad types to support. These error messages are shown in the LCC Errors Tab and will not prevent your scenario from loading. Keep in mind that these parts of the scenario might then not be supported in the simulation and also might not show up on the screen.

Transforming the Scenario

You can also transform your scenario:

  • Resize it by setting a minimum lane width
  • Translate its x or y coordinates
  • Rotate it around its center
  • Change the time steps

Just enter the desired values in the according text boxes and either hit Enter if you just want to change one value, or set values for multiple fields first before applying them by clicking on Apply transformation. The values in the fields are set to 0.0 again after the transformation was applied.

When you change the time steps, you change the time between each time step set in commonroad. Larger timesteps mean a slower simulation and vice-versa. Speed and acceleration values are adjusted accordingly. (Example: Changing from 0.1seconds to 0.2seconds means half the speed)

IMPORTANT: The scenario gets centered when it is first loaded, as the set coordinates might be out of scope. This means, if your scenario only uses coordinates e.g. larger than 200 for x and y values, it should still show up in the MapView. The current centering is not perfect, so you may want to translate it further.

Transformation Profile

You might be interested in keeping the transformation that you set for your scenario. We use a YAML profile to accomplish this. You do not need to access it directly:

  • Load saved transformation This button applies transformations that you have stored before to the currently loaded scenario. Important: It does not reset changes made before, so you might want to (Re)Load before pressing this button.
  • Save transformation Save the current transformation in the profile for your current file. Important: Changes in x / y are added, not overwritten. 
  • Reset saved transformation Resets the transformation profile for the current file. Important: This also includes the initial centering that takes place automatically, and every transformation you have done so far. It is thus advisable to (Re)Load after performing a reset.

Rotation is not being stored. It is the only operation where the order truly matters, and it is also non-linear. It was thus left out for now.

Scenario Preview

If you want to see what the scenario looks like during the simulation, you can preview the movement of the obstacles from within the Commonroad Tab:

Toggle Additional Information

We did not want the view to become too cluttered. Thus, parts of the simulation like traffic signs or vehicle information are only drawn on demand. They can be toggled in this part. The explanation of the toggled descriptions can be found on the bottom of this page. Please note that the view below might be outdated (more toggles might exist), but it still works the same way.

Obstacles and IDs

The loaded Commonroad scenario may define obstacles. The obstacle ID set in Commonroad is interpreted as the ID of the vehicle in the scenario. This is especially important if you choose to use the movement defined for the obstacle to be used as trajectory for a real vehicle. In this case, the real vehicle with the same ID will respond to the message.

In the image above, the path of obstacle 1 is communicated in form of trajectory messages for vehicle 1 - which can also be received and followed by a real vehicle - while the other obstacles are simulated without controlling real vehicles.

We only allow for obstacle IDs up to 256 due to the message types in use (uint8_t for ID) (TODO?), thus the ID is taken mod 256 if it is higher than that - we do not expect that you need to use more than 256 obstacles within one scenario (this might also have bad consequences for the performance of a simulation).

Obstacle Classes

Commonroad defines DynamicObstacle, StaticObstacle and EnvironmentObstacle as different obstacle classes. We only allow for trajectory simulation for the first two, as environment obstacles should not be on the lanelet (and don't move as well). Static obstacles may include static vehicles, so we decided to allow trajectory simulation for them, although they also never move (as their name already implies).

Goal Information

Additional information about the goal states are shown at the bottom of the Commonroad-Tab. Please note that goals are only drawn in the MapView if a position for the goal was set.

Lanelet Information

Additional information about the lanelets are shown below the goal information. The lanelet IDs can be toggled to know which lanelet the information belongs to.

Most information that are not visible in this table are visible implicitly or explicitly on the MapView (and / or can be toggled as additional information). 

Using Commonroad as Part of the Simulation

To actually see / use the obstacle simulation, you need to:

  1. Click Deploy in the Setup Tab
  2. Switch to the Timer Tab and press Start

This should be your usual workflow for starting your own script via the LCC as well.

Obstacles disappear

As soon as you press Deploy, the obstacles disappear. This is done on purpose! The obstacle simulation, as all other simulation, is performed as soon as the lab simulation is started in the Timer Tab. As soon as the timer is started, the obstacles will reappear.

Further information

Descriptions for obstacles, lanelets etc. use few latters to save space. Their meaning is explained here.

Descriptions for Obstacles

EPose is exact
IPose is not exact
MObstacle is moving
SObstacle is static
UnkUnknown obstacle
CarObstacle is a car
TruckObstacle is a truck
BusObstacle is a bus
MCycleObstacle is a motorcycle
BCycleObstacle is a bicycle
PedObstacle is a pedestrian
PrioObstacle is a priority vehicle
TrainObstacle is a train
TaxiObstacle is a taxi
ConstrObstacle is a construction zone
ParkedObstacle is a parked vehicle
BoundaryObstacle is a road boundary
BuildingObstacle is a building (not on the road)
PillarObstacle is a pillar (should not be on the road)
MedianObstacle is a median strip in between lanes

Descriptions for Traffic Signs

The text drawn for traffic signs is taken from its definition in the Commonroad file:

Traffic Sign ID (list of additional values) Traffic Sign ID (list of additional values) Traffic Sign ID (list of additional values) ...

Descriptions for Goal States

ID (ID of the planning problem) - time when the goal should be reached (mean), v speed within the goal (mean)

Color Code for Obstacles

Filled OrangeDynamic obstacle with exact position
Filled VioletDynamic obstacle with inexact position
Orange Border, not filledNon-Dynamic obstacle (static or environment) with exact position
Violet Border, not filledNon-Dynamic obstacle (static or environment) with inexact position

Lanelet Orientation Arrows

Arrow / TriangleGives the lanelet orientation. No user is allowed to use the lanelet in the other direction.
Circle / Point

At least one user is allowed to use the lanelet in both directions. The Lanelet information table,

given the ID of the Lanelet (if shown, which can be toggled), shows which user is allowed to use

the lanelet in both directions (e.g. a bicycle).

Lanelet Border Colors 

BlueLanelets are adjacent and have the same driving direction → Crossing this line should be allowed
BlackAll other lanelets
Light greyLanelets for which no_marking was defined. Is overwritten by blue in case of adjacency to another lanelet.

Lanelet Border Style

The Lanelet Border Style can be defined in the Commonroad file (e.g. dashed or broad). Unknown and no_marking are not easy to draw. Thus, unknown is drawn like any solid line, and no_marking is drawn in a transparent grey color. Both colors can be overwritten by blue in case of adjacency (this information is more important).

  • No labels