blob: a5c5ecb222e80dbce4fca28b5af8ef56053de436 [file] [log] [blame]
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scenario-based simulation &mdash; OpenPASS Documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/tabs.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/openPASS.ico"/>
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="PCM Simulation" href="20_pcm_simulation.html" />
<link rel="prev" title="Tutorials" href="../20_tutorials.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> openPASS
<img src="../../_static/openPASS.png" class="logo" alt="Logo"/>
</a>
<div class="version">
0.8.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Installation Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/10_getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/20_install_prerequisites.html">Installing Prerequisites</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/30_install_openpass.html">Installing OpenPASS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/50_further_guidance.html">Further Guidance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/60_conan.html">Building with Conan</a></li>
</ul>
<p class="caption"><span class="caption-text">User Guides</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../10_overview.html">Overview</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../20_tutorials.html">Tutorials</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Scenario-based simulation</a></li>
<li class="toctree-l2"><a class="reference internal" href="20_pcm_simulation.html">PCM Simulation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../30_gui_plugins.html">GUI Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="../40_configs_in_depth.html">Configs in Depth</a></li>
<li class="toctree-l1"><a class="reference internal" href="../50_outputs_in_depth.html">Outputs in Depth</a></li>
<li class="toctree-l1"><a class="reference internal" href="../60_scenario_simulation.html">Simulator</a></li>
</ul>
<p class="caption"><span class="caption-text">Advanced topics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../advanced_topics/20_simulator_advanced.html">Simulator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../advanced_topics/30_testing.html">EndToEnd Test Framework</a></li>
</ul>
<p class="caption"><span class="caption-text">Developer Information</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../developer_information/10_ide_support.html">IDE Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developer_information/20_documentation.html">Documentation Concept</a></li>
</ul>
<p class="caption"><span class="caption-text">Other Information</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../other_information/10_external_dependencies.html">External Dependencies</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other_information/20_glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other_information/30_license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">openPASS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../20_tutorials.html">Tutorials</a> &raquo;</li>
<li>Scenario-based simulation</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/user_guide/tutorials/10_scenario_simulation.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="scenario-based-simulation">
<h1>Scenario-based simulation<a class="headerlink" href="#scenario-based-simulation" title="Permalink to this headline"></a></h1>
<p>This guide describes how to execute an exemplary simulation with openPASS.</p>
<p>The simulation runs a scenario which is set up for triggering an AEB system.
The scenario contains two agents: The ego agent and a scenario agent.
The ego vehicle is equipped with an AEB system (the system under test).
The scenario agent performs a cut-in and triggers as a result the AEB system of the ego agent.
To force this exact maneuver, the scenario agent is set up to follow a predefined trajectory.</p>
<p>The GUI is not yet capable of configuring and executing a scenario based simulation as this is currently work in progress.
Thus, an existing simulation configuration is used and the simulation is started manually.</p>
<p><strong>Step-by-step instructions</strong></p>
<ol class="arabic">
<li><p>Navigate into <strong>openPASS</strong> install directory (e.g. <code class="docutils literal notranslate"><span class="pre">C:\OpenPASS</span></code>)</p></li>
<li><p>Install directory should look like the following</p>
<blockquote>
<div><div class="highlight-default notranslate"><div class="highlight"><pre><span></span>OpenPASS-Install-Dir
├── bin
└── configs &lt;-- this directory will be created in the next step
└── examples
│ ├── Configurations
│ └── DefaultConfigurations
└── doc
└── examples
└── lib
│ ...
└── opSimulation.exe
</pre></div>
</div>
</div></blockquote>
</li>
<li><p>Create a new folder named “configs” for the configuration files within the <strong>openPASS</strong> install directory</p></li>
<li><p>Copy configuration files</p>
<blockquote>
<div><p>Simulations for <strong>openPASS</strong> are fully configured through configuration files.
Examples for <strong>openPASS</strong> configuration files are located in the directory <code class="docutils literal notranslate"><span class="pre">examples</span></code> and are divided into two groups: <em>Default configurations</em> and <em>specific configurations</em>.</p>
<ol class="loweralpha">
<li><p>The <em>default configuration</em> files located under <code class="docutils literal notranslate"><span class="pre">examples/DefaultConfigurations</span></code> contain the basis for any simulation.</p>
<blockquote>
<div><ol class="lowerroman simple">
<li><p>Copy all files from the directory <code class="docutils literal notranslate"><span class="pre">examples/DefaultConfigurations</span></code> to the previously created folder <code class="docutils literal notranslate"><span class="pre">configs</span></code>.</p></li>
</ol>
</div></blockquote>
</li>
<li><p>The <em>specific configuration</em> files located under <code class="docutils literal notranslate"><span class="pre">examples/Configurations</span></code> complement the default configuration files. Examples are provided for different simulations.</p>
<blockquote>
<div><ol class="lowerroman simple">
<li><p>Ensure all files from directory <code class="docutils literal notranslate"><span class="pre">examples/DefaultConfigurations</span></code> have been copied to <code class="docutils literal notranslate"><span class="pre">configs</span></code> (this has been done in the previous step). Repeat this step every time another simulation is chosen.</p></li>
<li><p>Navigate to the directory <code class="docutils literal notranslate"><span class="pre">examples/Configurations</span></code>. Here, all folders contain special pre-configured simulations (which either can be used as demo cases or as end-to-end test cases primarily used for development).</p></li>
<li><p>Copy all files from the directory specifying the specific scenario you want to simulate (in our case all files from directory <code class="docutils literal notranslate"><span class="pre">examples/Configurations/AEB</span></code>) to the directory <code class="docutils literal notranslate"><span class="pre">configs</span></code>. Overwrite existing files when prompted.</p></li>
</ol>
</div></blockquote>
</li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>A detailed description of the various configuration files can be found under see <a class="reference internal" href="../40_configs_in_depth.html#configs-in-depth"><span class="std std-ref">Configs in Depth</span></a>.</p>
</div>
</div></blockquote>
</li>
<li><p>Learn how to modify configuration files</p>
<blockquote>
<div><p>If one wants to edit the configurations (e.g. experiment set-up or parameters of specific scenario) placed under <code class="docutils literal notranslate"><span class="pre">configs</span></code>, one can do so by changing any of the following files:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>configs
├── PedestrianModelsCatalog.xosc
├── ProfilesCatalog.xml
├── Scenario.xosc
├── SceneryConfiguration.xodr
├── simulationConfig.xml
├── systemConfigBlueprint.xml
└── VehicleModelsCatalog.xosc
</pre></div>
</div>
</div></blockquote>
<p>As an example, modifications of the configuration files that describe the AEB scenario are given.
The following list describes some relevant adjustments that may be useful.</p>
<blockquote>
<div><ol class="loweralpha">
<li><p><code class="docutils literal notranslate"><span class="pre">ProfilesCatalog.xml</span></code>:</p>
<blockquote>
<div><ul class="simple">
<li><p>The AEB system and sensor parameters, e.g. „TTC“, „DetectionRange“, can be adjusted.</p></li>
<li><p>The spawner parameters, such as the traffic volume or the velocity of the surrounding traffic, can be modified in the existing spawner profiles.</p></li>
</ul>
</div></blockquote>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">Scenario.xosc</span></code>:</p>
<blockquote>
<div><ul class="simple">
<li><p>The scenario set-up contains the initial positions und velocities of the ego and scenario agent.</p></li>
<li><p>The trajectory that defines the cut-in maneuver of the scenario agent is defined and editable here.</p></li>
<li><p>The overall simulation time, which determines the end condition of the simulation in seconds, can be adjusted.</p></li>
</ul>
</div></blockquote>
</li>
<li><p><code class="docutils literal notranslate"><span class="pre">simulationConfig.xml</span></code>:</p>
<blockquote>
<div><ul class="simple">
<li><p>The number of invocations can be changed in case more than one run is desired to be simulated. This will incorporate stochastic variation (i.e. initial constellation of surrounding traffic)</p></li>
<li><p>If surrounding traffic is not desired in the experiment, the spawner libraries “SpawnPointPreRunCommon” and “SpawnPointRuntimeCommon” can be deactivated by removing the corresponding sections. Only the “SpawnPointScenario” is mandatory to spawn the ego and scenario agent. More information on the functionality of spawners can be found in <a class="reference internal" href="../sim_user_guide/components/spawner.html#components-spawner"><span class="std std-ref">Spawner</span></a>.</p></li>
<li><p>The output format can be modified by setting the parameter “LoggingCyclicsToCsv” to true.</p></li>
</ul>
</div></blockquote>
</li>
</ol>
</div></blockquote>
</li>
<li><p>Start the simulation by double-clicking <code class="docutils literal notranslate"><span class="pre">opSimulation.exe</span></code> or from the console by calling the executable.</p></li>
<li><p>Once the simulation is successfully completed, the following results can be found in the directory <code class="docutils literal notranslate"><span class="pre">results</span></code>:</p>
<blockquote>
<div><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">simulationOutput.xml</span></code>: Contains general information about the experiment and an overview on all agents from the simulation. Further, an event log is contained. If the csv-output is set to false in the <code class="docutils literal notranslate"><span class="pre">simulationConfig.xml</span></code>, the <code class="docutils literal notranslate"><span class="pre">simulationOutput.xml</span></code> will also include the „cyclics” (state in each time step) of the simulation.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Cyclics_Run_xxx.csv</span></code>: In case the csv-output is activated, the „cyclics” of each run in the simulation are logged to a separated csv-file. This file is missing, if “cyclics” are written directly to the <code class="docutils literal notranslate"><span class="pre">simulationOutput.xml</span></code> (i.e. when “LoggingCyclicsToCsv” is set to false).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Repository_Run_xxx.csv</span></code>: Overview of the agents and objects from the simulation as well as some details on scenery components like lane markings, guard rails, etc.</p></li>
</ul>
</div></blockquote>
</li>
</ol>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="20_pcm_simulation.html" class="btn btn-neutral float-right" title="PCM Simulation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../20_tutorials.html" class="btn btn-neutral float-left" title="Tutorials" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021 OpenPASS Working Group.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>