Skip to content

Commit

Permalink
update wording to OpenSCENARIO DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
fmirus committed Oct 28, 2024
1 parent a809ed4 commit df87ae3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Super-Linter](https://github.com/IntelLabs/Scenario_Execution/actions/workflows/scan.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/IntelLabs/scenario_execution/badge)](https://scorecard.dev/viewer/?uri=github.com/IntelLabs/scenario_execution)

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/).
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/).
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.
This separation of the scenario definition from implementation massively reduces the manual efforts of scenario creation.

Expand Down
14 changes: 7 additions & 7 deletions docs/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Architecture

Overview of Scenario Execution

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>`_.
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.
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>`_.
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.


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

Our implementation is highly modular separating the core components from simulation- and/or middleware-specific modules realized through a plugin-based approach.
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.
A library typically provides an OpenSCENARIO 2 file with additional definitions and may provide code implementing additional functionality such as conditions or actions.
A library typically provides an OpenSCENARIO DSL file with additional definitions and may provide code implementing additional functionality such as conditions or actions.

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

Expand Down Expand Up @@ -63,11 +63,11 @@ The Internal Model Builder, implemented as a Model Listener does an initial chec
Modules
-------

- ``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.
- ``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.
- ``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.
- ``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.
- ``scenario_execution_control``: Provides code to control scenario execution (in ROS2) from another application such as RViz.
- ``scenario_execution_coverage``: Provides tools to generate concrete scenarios from abstract OpenSCENARIO 2 scenario definition and execute them.
- ``scenario_execution_gazebo``: Provides a `Gazebo <https://gazebosim.org/>`_-specific OpenSCENARIO 2 library with actions.
- ``scenario_execution_coverage``: Provides tools to generate concrete scenarios from abstract OpenSCENARIO DSL scenario definition and execute them.
- ``scenario_execution_gazebo``: Provides a `Gazebo <https://gazebosim.org/>`_-specific OpenSCENARIO DSL library with actions.
- ``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.
- ``scenario_execution_rviz``: Contains several `rviz <https://github.com/ros2/rviz>`__ plugins for visualizing and controlling scenarios when working with ROS2.
- ``simulation/gazebo_tf_publisher``: Publish ground truth transforms from simulation within TF.
Expand Down
2 changes: 1 addition & 1 deletion docs/libraries.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Libraries
=========

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

.. list-table::
:widths: 40 60
Expand Down
13 changes: 6 additions & 7 deletions docs/openscenario2.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
OpenSCENARIO 2
==============
OpenSCENARIO DSL
================

General
-------

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

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

The `standard library of
OSC2 <https://www.asam.net/static_downloads/public/asam-openscenario/2.0.0/domain-model/standard_library.html>`__
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>`__
was adapted to be usable by the current parsing support of scenario execution.


Expand Down Expand Up @@ -46,7 +45,7 @@ Mapping to py-trees
Supported features
------------------

In the following the OpenSCENARIO 2 keywords are listed with their current support status.
In the following the OpenSCENARIO DSL keywords are listed with their current support status.


======================= ==================== =============================
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Code for all tutorials is available in :repo_link:`examples`.
Define and Execute Scenario
---------------------------

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

.. code-block::
Expand All @@ -28,14 +28,14 @@ with the extension ``.osc``. Input the following code in the file.
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.

.. note::
Comments in OpenSCENARIO 2 always start with ``#``.
Comments in OpenSCENARIO DSL always start with ``#``.

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

.. note::
OpenSCENARIO 2 supports the following compositions:
OpenSCENARIO DSL supports the following compositions:

* ``parallel``: execute actions in parallel, continue afterwards
* ``serial``: execute actions, one after the other
Expand Down Expand Up @@ -70,11 +70,11 @@ Create Scenario Library
-----------------------

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

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

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

.. code-block::
Expand Down
4 changes: 2 additions & 2 deletions scenario_execution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ The `scenario_execution` package is the core package of Scenario Execution for R

Furthermore, it provides the following scenario execution libraries:

- `standard.osc`: The OpenSCENARIO 2 standard library. It is slightly modified to be in sync with the feature set of scenario execution and imports `standard_base.osc`.
- `standard_base.osc`: The base parts of the OpenSCENARIO 2 standard library such as units and basic structs. For convenience, numerical struct members are initialized with 0.
- `standard.osc`: The OpenSCENARIO DSL standard library. It is slightly modified to be in sync with the feature set of scenario execution and imports `standard_base.osc`.
- `standard_base.osc`: The base parts of the OpenSCENARIO DSL standard library such as units and basic structs. For convenience, numerical struct members are initialized with 0.
- `robotics.osc`: robotic-specific specifications.
- `helper.osc`: helper actions such as logging or running external processes.

0 comments on commit df87ae3

Please sign in to comment.