Using the SP Model in Practice

This workflow is based on the GeoScenario Server and the reference implementation for the SP Model.

The SP model was developed for the purpose of aiding in the scenario-based testing process for Autonomous Vehicles (AV) and Automated Driving Systems (ADS). Although the model is a general behaviour model and may be applied to other areas of research, this is the application we will focus on.

Scenario-based testing focuses on creating a scenario on which the AV or ADS will run. We use the GeoScenario language to facilitate this process.

The first step is to find a suitable map location for the scenario. The SP model requires Lanelet2-compatible map files, an example of which is show in the figure below. Note that the map must include pedestrian-specific lanelets that define areas such as sidewalks and crosswalks.

We define the scenario in a separate GeoScenario OSM file. Using GeoScenario elements, we add the origin and gsconfig elements. These nodes define a reference point for the Cartesian grid and the configuration information for the scenario such as the scenario name and the Lanelet2 map file.

For each SP pedestrian, we must assign two tags with set values: the agent type tag, gs=pedestrian and the behaviour type tag, btype=SP. The rest of the required tags can have different values between pedestrians. The other required tags (with example values) are the pedestrian's name, name=ped_1, the path to the pedestrian's behaviour tree file, btree=btrees/walk.btree, and a reference to the pedestrian's destination point node, destination=ped_1_dest.

Note that each SP pedestrian must be assigned a destination node with the node-type tag gs=location and the name tag name. The pedestrian's destination tag contains a reference to this node's name. Below are examples of a pedestrian node and a behaviour tree file.

<node id='-2' lat='43.47' lon='-80.51'>
  <tag k='gs' v='pedestrian' />
  <tag k='btype' v='SP' />
  <tag k='name' v='pedestrian_1' />
  <tag k='btree' v='walk_aggressiveness_level_1.btree' />
  <tag k='destination' v='ped_1_dest' />
</node>

During execution of the scenario, each SP pedestrian will run a separate instance of the SP model to navigate the traffic environment to reach their destination point. Since each pedestrian can be assigned individual behaviour tree files, pedestrians can each have a unique customized behaviour within the same scenario.