Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit acec266

Browse files
authored
update from OpenSCENARIO 2.0 to OpenSCENARIO DSL V2.1.0 (#221)
1 parent 6a57579 commit acec266

File tree

27 files changed

+116
-1123
lines changed

27 files changed

+116
-1123
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Super-Linter](https://github.com/IntelLabs/Scenario_Execution/actions/workflows/scan.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)
44
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/IntelLabs/scenario_execution/badge)](https://scorecard.dev/viewer/?uri=github.com/IntelLabs/scenario_execution)
55

6-
Scenario execution is a backend- and middleware-agnostic library written in Python based on the generic scenario description language [OpenSCENARIO 2](https://www.asam.net/static_downloads/public/asam-openscenario/2.0.0/welcome.html) and [pytrees](https://py-trees.readthedocs.io/en/devel/).
6+
Scenario execution is a backend- and middleware-agnostic library written in Python based on the generic scenario description language [OpenSCENARIO DSL](https://www.asam.net/standards/detail/openscenario-dsl/) and [pytrees](https://py-trees.readthedocs.io/en/devel/).
77
It reads a scenario definition from a file and then executes it, reusing available checks and actions. It is easily extendable through a library mechanism.
88
This separation of the scenario definition from implementation massively reduces the manual efforts of scenario creation.
99

docs/architecture.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Architecture
77

88
Overview of Scenario Execution
99

10-
Scenario execution is built as a Python library on top of two open-source components: the generic scenario description language `OpenSCENARIO 2 <https://www.asam.net/index.php?eID=dumpFile&t=f&f=3460&token=14e7c7fab9c9b75118bb4939c725738fa0521fe9>`_ and `PyTrees <https://py-trees.readthedocs.io/en/devel/introduction.html>`_.
11-
In general, the user defines a scenario in the OpenSCENARIO 2 language, scenario execution parses the scenario, translates it to a behavior tree, executes it and finally gathers the test results.
10+
Scenario execution is built as a Python library on top of two open-source components: the generic scenario description language `OpenSCENARIO DSL <https://www.asam.net/index.php?eID=dumpFile&t=f&f=3460&token=14e7c7fab9c9b75118bb4939c725738fa0521fe9>`_ and `PyTrees <https://py-trees.readthedocs.io/en/devel/introduction.html>`_.
11+
In general, the user defines a scenario in the OpenSCENARIO DSL language, scenario execution parses the scenario, translates it to a behavior tree, executes it and finally gathers the test results.
1212

1313

1414
.. figure:: images/scenario_execution_arch.png
@@ -18,7 +18,7 @@ In general, the user defines a scenario in the OpenSCENARIO 2 language, scenario
1818

1919
Our implementation is highly modular separating the core components from simulation- and/or middleware-specific modules realized through a plugin-based approach.
2020
In principle, any additional feature that is required by a specific scenario and that can be implemented in Python could be realized as additional library.
21-
A library typically provides an OpenSCENARIO 2 file with additional definitions and may provide code implementing additional functionality such as conditions or actions.
21+
A library typically provides an OpenSCENARIO DSL file with additional definitions and may provide code implementing additional functionality such as conditions or actions.
2222

2323
Currently, the following sub-packages and libraries are available:
2424

@@ -63,11 +63,11 @@ The Internal Model Builder, implemented as a Model Listener does an initial chec
6363
Modules
6464
-------
6565

66-
- ``scenario_execution``: The base package for scenario execution. It provides the parsing of OpenSCENARIO 2 files and the conversion to py-trees. It's middleware agnostic and can therefore be used as a basis for more specific implementations (e.g. ROS). It also provides basic OpenSCENARIO 2 libraries and actions.
67-
- ``scenario_execution_ros``: This package uses ``scenario_execution`` as a basis and implements a ROS2 version of scenario execution. It provides a OpenSCENARIO 2 library with basic ROS2-related actions like publishing on a topic or calling a service.
66+
- ``scenario_execution``: The base package for scenario execution. It provides the parsing of OpenSCENARIO DSL files and the conversion to py-trees. It's middleware agnostic and can therefore be used as a basis for more specific implementations (e.g. ROS). It also provides basic OpenSCENARIO DSL libraries and actions.
67+
- ``scenario_execution_ros``: This package uses ``scenario_execution`` as a basis and implements a ROS2 version of scenario execution. It provides a OpenSCENARIO DSL library with basic ROS2-related actions like publishing on a topic or calling a service.
6868
- ``scenario_execution_control``: Provides code to control scenario execution (in ROS2) from another application such as RViz.
69-
- ``scenario_execution_coverage``: Provides tools to generate concrete scenarios from abstract OpenSCENARIO 2 scenario definition and execute them.
70-
- ``scenario_execution_gazebo``: Provides a `Gazebo <https://gazebosim.org/>`_-specific OpenSCENARIO 2 library with actions.
69+
- ``scenario_execution_coverage``: Provides tools to generate concrete scenarios from abstract OpenSCENARIO DSL scenario definition and execute them.
70+
- ``scenario_execution_gazebo``: Provides a `Gazebo <https://gazebosim.org/>`_-specific OpenSCENARIO DSL library with actions.
7171
- ``scenario_execution_interfaces``: Provides ROS2 `interfaces <https://docs.ros.org/en/rolling/Concepts/Basic/About-Interfaces.html>`__, more specifically, messages and services, which are used to interface ROS2 with the ``scenario_execution_control`` package.
7272
- ``scenario_execution_rviz``: Contains several `rviz <https://github.com/ros2/rviz>`__ plugins for visualizing and controlling scenarios when working with ROS2.
7373
- ``simulation/gazebo_tf_publisher``: Publish ground truth transforms from simulation within TF.

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Scenario Execution
33
==================
44

55
Scenario Execution for Robotics is a backend- and middleware-agnostic library, that enables the robotics community to perform reproducible experiments at scale and allows a seamless transition from simulation to real-world experiments.
6-
Scenario Execution is written in Python and builds upon the generic scenario description language `OpenScenario2 <https://www.asam.net/static_downloads/public/asam-openscenario/2.0.0/welcome.html>`__ and `pytrees <https://py-trees.readthedocs.io/en/devel/>`__.
6+
Scenario Execution is written in Python and builds upon the generic scenario description language `OpenSCENARIO DSL <https://www.asam.net/standards/detail/openscenario-dsl/>`__ and `pytrees <https://py-trees.readthedocs.io/en/devel/>`__.
77

88
Scenario Execution reads a scenario definition from a file, translates it to a py-trees behavior tree and then executes it. This separation of the scenario definition from the implementation massively reduces the manual efforts of (robotics) scenario creation.
99
Although Scenario Execution can be used as a pure Python library, it is mainly targeted to be used with the `Robot Operating System (ROS2) <https://www.ros.org/>`__. The backend-agnostic implementation allows Scenario Execution to be used with both, robotics simulators such as `Gazebo <https://gazebosim.org/>`__ and physical robots, with minimal adaptations necessary in the scenario description file. 
@@ -37,5 +37,5 @@ If you use Scenario Execution for Robotics in your scientific work, please cite
3737
architecture
3838
libraries
3939
development
40-
openscenario2
40+
openscenarioDSL
4141
how_to_cite

docs/libraries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Libraries
22
=========
33

4-
Beside ``osc.standard`` provided by OpenSCENARIO 2 (which we divide into ``osc.standard`` and ``osc.standard_base``), multiple libraries are provided with scenario execution.
4+
Beside ``osc.standard`` and ``osc.types`` provided by OpenSCENARIO DSL, multiple libraries are provided with scenario execution.
55

66
.. list-table::
77
:widths: 40 60

docs/openscenario2.rst renamed to docs/openscenarioDSL.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
OpenSCENARIO 2
2-
==============
1+
OpenSCENARIO DSL
2+
================
33

44
General
55
-------
66

7-
This tool supports a subset of the `OpenSCENARIO
8-
2 <https://www.asam.net/project-detail/asam-openscenario-v20-1/>`__ standard.
7+
This tool supports a subset of the `OpenSCENARIO DSL <https://www.asam.net/standards/detail/openscenario-dsl/>`__ standard.
98

109
The official documentation is available
11-
`here <https://www.asam.net/static_downloads/public/asam-openscenario/2.0.0/welcome.html>`__.
10+
`here <https://publications.pages.asam.net/standards/ASAM_OpenSCENARIO/ASAM_OpenSCENARIO_DSL/latest/index.html>`__.
1211

1312
The `standard library of
14-
OSC2 <https://www.asam.net/static_downloads/public/asam-openscenario/2.0.0/domain-model/standard_library.html>`__
13+
OSC2 <https://publications.pages.asam.net/standards/ASAM_OpenSCENARIO/ASAM_OpenSCENARIO_DSL/latest/domain-model/_attachments/ASAM_OpenSCENARIO_DSL_v2.1.0_Domain_model_library.zip>`__
1514
was adapted to be usable by the current parsing support of scenario execution.
1615

1716

@@ -46,7 +45,7 @@ Mapping to py-trees
4645
Supported features
4746
------------------
4847

49-
In the following the OpenSCENARIO 2 keywords are listed with their current support status.
48+
In the following the OpenSCENARIO DSL keywords are listed with their current support status.
5049

5150

5251
======================= ==================== =============================

docs/tutorials.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Code for all tutorials is available in :repo_link:`examples`.
88
Define and Execute Scenario
99
---------------------------
1010

11-
To create a scenario in OpenSCENARIO 2 syntax, first create a file
11+
To create a scenario in OpenSCENARIO DSL syntax, first create a file
1212
with the extension ``.osc``. Input the following code in the file.
1313

1414
.. code-block::
1515
1616
# import the libraries with import expression
17-
import osc.standard.base
17+
import osc.types
1818
import osc.helpers
1919
2020
# declare the scenario by the syntax: "scenario scenario_name:"
@@ -25,17 +25,17 @@ with the extension ``.osc``. Input the following code in the file.
2525
wait elapsed(3s) # wait three seconds
2626
log("Good Bye!") # log another message
2727
28-
The first two lines ``import osc.standard.base`` and ``import osc.helpers`` will import the named libraries that provide required definitions. In this example ``helpers`` library provides the ``log`` action and ``standard.base`` provides the definition of the `s` unit to specify seconds.
28+
The first two lines ``import osc.types`` and ``import osc.helpers`` will import the named libraries that provide required definitions. In this example ``helpers`` library provides the ``log`` action and ``types`` provides the definition of the `s` unit to specify seconds.
2929

3030
.. note::
31-
Comments in OpenSCENARIO 2 always start with ``#``.
31+
Comments in OpenSCENARIO DSL always start with ``#``.
3232

3333
Then, a scenario with the name ``hello_world`` get declared. The following colon states that all following and indented lines
3434
are part of it. The single top-level action of the scenario is defined in the ``do`` directive.
3535
The term ``serial`` states that the included actions will be executed in sequence.
3636

3737
.. note::
38-
OpenSCENARIO 2 supports the following compositions:
38+
OpenSCENARIO DSL supports the following compositions:
3939

4040
* ``parallel``: execute actions in parallel, continue afterwards
4141
* ``serial``: execute actions, one after the other
@@ -70,11 +70,11 @@ Create Scenario Library
7070
-----------------------
7171

7272
To add new features to scenario execution, extensions libraries can be created. An extension library typically provides one or more
73-
OpenSCENARIO 2 definition files and might additionally provide action implementations.
73+
OpenSCENARIO DSL definition files and might additionally provide action implementations.
7474

7575
To show how to create such a library for scenario execution, we will add a ``custom_action`` action as an example.
7676

77-
First, we need to define the ``custom_action`` in a OpenSCENARIO 2 file.
77+
First, we need to define the ``custom_action`` in a OpenSCENARIO DSL file.
7878

7979
.. code-block::
8080
@@ -417,7 +417,7 @@ It is possible to call external python methods and use their return value within
417417

418418
.. code-block::
419419
420-
import osc.standard.base
420+
import osc.types
421421
import osc.helpers
422422
423423
struct lib:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import osc.standard.base
1+
import osc.types
22
import osc.helpers
33

44
struct lib:
@@ -7,4 +7,4 @@ struct lib:
77
scenario example_external_method:
88

99
do serial:
10-
log(lib.factorial(4))
10+
log(lib.factorial(4))

examples/example_scenario/hello_world.osc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import osc.standard.base
1+
import osc.types
22
import osc.helpers
33

44
scenario hello_world:

libs/scenario_execution_floorplan_dsl/scenario_execution_floorplan_dsl/lib_osc/floorplan_dsl.osc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import osc.standard.base
1+
import osc.types
22

33
actor floorplan_generator:
44
result: string

libs/scenario_execution_gazebo/scenario_execution_gazebo/lib_osc/gazebo.osc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import osc.standard.base
1+
import osc.types
22
import osc.robotics
33

44
action actor_exists:

0 commit comments

Comments
 (0)