blob: 1e4e89370c325d941c848a8e83124a21b5d1c250 [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>World_OSI &mdash; OpenPASS Documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="../../_static/tabs.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 data-url_root="../../" id="documentation_options" 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 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="EndToEnd Test Framework" href="../30_testing.html" />
<link rel="prev" title="Simulation" href="simulation.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">
9999.9999.9999
</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="Navigation menu">
<p class="caption" role="heading"><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" role="heading"><span class="caption-text">User Guides</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/10_overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/20_tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/30_gui_plugins.html">GUI Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/40_configs_in_depth.html">Configs in Depth</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/50_outputs_in_depth.html">Outputs in Depth</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/60_scenario_simulation.html">Simulator</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced topics</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../20_simulator_advanced.html">Simulator</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="agent_components.html">Agent Components</a></li>
<li class="toctree-l2"><a class="reference internal" href="event_detector.html">EventDetector</a></li>
<li class="toctree-l2"><a class="reference internal" href="simulation.html">Simulation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">World_OSI</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#coordinate-systems">Coordinate Systems</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#world-coordinate-system">World Coordinate System</a></li>
<li class="toctree-l4"><a class="reference internal" href="#road-coordinate-system">Road Coordinate System</a></li>
<li class="toctree-l4"><a class="reference internal" href="#agent-coordinate-system">Agent Coordinate System</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#sampling-of-world-geometries">Sampling of World Geometries</a></li>
<li class="toctree-l3"><a class="reference internal" href="#localization">Localization</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#basics">Basics</a></li>
<li class="toctree-l4"><a class="reference internal" href="#localization-sequence">Localization sequence</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#traffic-signs-and-road-markings">Traffic Signs and Road Markings</a></li>
<li class="toctree-l3"><a class="reference internal" href="#lane-markings">Lane Markings</a></li>
<li class="toctree-l3"><a class="reference internal" href="#getobstruction">GetObstruction</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../30_testing.html">EndToEnd Test Framework</a></li>
</ul>
<p class="caption" role="heading"><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" role="heading"><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="Mobile navigation menu" >
<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="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../20_simulator_advanced.html">Simulator</a> &raquo;</li>
<li>World_OSI</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/advanced_topics/simulator/world_osi.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="world-osi">
<span id="id1"></span><h1>World_OSI<a class="headerlink" href="#world-osi" title="Permalink to this headline"></a></h1>
<div class="section" id="coordinate-systems">
<span id="coordinatesystems"></span><h2>Coordinate Systems<a class="headerlink" href="#coordinate-systems" title="Permalink to this headline"></a></h2>
<p>OpenPass uses 3 different coordinate systems.
All systems rotate counterclockwise and use radian.</p>
<div class="section" id="world-coordinate-system">
<span id="world-coordinatesystem"></span><h3>World Coordinate System<a class="headerlink" href="#world-coordinate-system" title="Permalink to this headline"></a></h3>
<p>The world coordinate system is absolute. It is the parent coordinate system and all other systems are relative to the world coordinate system.
This system consists of <em>x</em>, <em>y</em> and <em>z</em> (<em>z</em> is currently unused).</p>
<div class="figure align-default" id="id2">
<img alt="../../_images/WorldCoordinateSystem.png" src="../../_images/WorldCoordinateSystem.png" />
<p class="caption"><span class="caption-text">World Coordinate System</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</div>
</div>
<div class="section" id="road-coordinate-system">
<span id="road-coordinatesystem"></span><h3>Road Coordinate System<a class="headerlink" href="#road-coordinate-system" title="Permalink to this headline"></a></h3>
<p>The road coordinate system is relative to the position of the road in the world coordinate system.
It consists of <em>s</em> and <em>t</em> coordinates, where <em>s</em> describes the longitudinal position along the road.
At the beginning of the road <em>s</em> = 0, increasing with the downstream direction of the road.
The coordinate <em>t</em> describes the lateral position relative to the center of the road, where <em>t</em> &gt; 0 indicates left side and <em>t &lt; 0</em> right side of the road with respect to the road direction.</p>
<div class="figure align-default" id="id3">
<img alt="../../_images/RoadCoordinateSystem.png" src="../../_images/RoadCoordinateSystem.png" />
<p class="caption"><span class="caption-text">Road Coordinate System</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</div>
</div>
<div class="section" id="agent-coordinate-system">
<h3>Agent Coordinate System<a class="headerlink" href="#agent-coordinate-system" title="Permalink to this headline"></a></h3>
<p>The agent coordinate system is relative to the position of the agent in the world coordinate system.
It uses longitudinal, lateral and height (height currently unused).
The system originates at the <em>reference point</em>, which is located at the center of the rear axle.
The longitudinal axis is parallel to the length of the car and the lateral axis is parallel to the width of the car.</p>
<div class="figure align-default" id="id4">
<img alt="../../_images/AgentCoordinateSystem.png" src="../../_images/AgentCoordinateSystem.png" />
<p class="caption"><span class="caption-text">Agent Coordinate System</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</div>
</div>
</div>
<div class="section" id="sampling-of-world-geometries">
<span id="world-sampling"></span><h2>Sampling of World Geometries<a class="headerlink" href="#sampling-of-world-geometries" title="Permalink to this headline"></a></h2>
<p>Roads are described following the <a class="reference external" href="https://www.asam.net/standards/detail/opendrive/">OpenDRIVE</a> specification.
There the geometry of a road is defined algebraically as lines, clothoids and by means of cubic polynomials, whereby primarily only one reference line is defined.
The lanes can be understood as a stack of parallel lanes, which are given by the width and the offset, now in relation to this reference line, which acts as the underlying coordinate system (‘s/t’ road coordinates with s along the road).
Here, too, width and offset are defined algebraically, which means that almost any boundary lines can be defined.</p>
<p>When the world is initialized, these boundary definitions (i.e. algebraic geometries) are converted into piecewise linear elements, which is called sampling.
The road is scanned at a constant interval along ‘s’, which leads to four-sided (quadrangular) sections of the lanes at common ‘s’ coordinates, so-called lane elements (see LaneElement).
The scanning is carried out at a scanning rate of 10 centimeters with the aim of achieving a total scanning error of less than 5 centimeters, as required by the representation used internally (c.f. <a class="reference external" href="https://github.com/OpenSimulationInterface">open simulation interface</a>).
Note that this error is only guaranteed if geometries do not exhibit extreme curvatures, i.e. a deviation of more than 5 cm within two sampling points (10 cm along s).
The scanned points define so-called joints, which contain all scanned points at an ‘s’ coordinate across all lane boundaries of the given road.
The number of these joints is reduced by a <a class="reference external" href="https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm">Ramer-Douglas-Peucker algorithm</a>, which ensures that the maximum lateral error of each individual point within a joint is less than 5 cm compared to the originally scanned points.
Note that (a) the boundary points of geometries are always retained and (b) additional points for lane marking transitions are also retained to ensure the maximum accuracy of these edge cases.
The lane elements are generated with two successive connections, which are ultimately used in the localization at runtime (see <a class="reference internal" href="#world-localization"><span class="std std-ref">Localization</span></a>).</p>
<p>Internally, each lane element receives a constant direction, which is defined by the direction of the vector spanned between the centers of the corresponding connections.
Each joint also holds the corresponding curvature of the road, so that the curvature can be interpolated linearly within a lane element along the ‘s’ coordinate.</p>
</div>
<div class="section" id="localization">
<span id="world-localization"></span><h2>Localization<a class="headerlink" href="#localization" title="Permalink to this headline"></a></h2>
<p>Generally, the position of an agent is stored with respect to <a class="reference internal" href="#world-coordinatesystem"><span class="std std-ref">world coordinates (x,y)</span></a>.
As queries on the world operates in <a class="reference internal" href="#road-coordinatesystem"><span class="std std-ref">road coordinates (s,t)</span></a>, the position of the agent needs to be transformed.</p>
<p>This section describes the translation of coordinates (x,y) of an agent into RoadCoordinate (s,t), whereas the notion of (s,t) comes from the <a class="reference external" href="https://www.asam.net/standards/detail/opendrive/">OpenDRIVE</a> standard.</p>
<div class="section" id="basics">
<h3>Basics<a class="headerlink" href="#basics" title="Permalink to this headline"></a></h3>
<p>The following image depics the basic principes of the localization which is rooted on the specifics of the OSI World Layer (aka OWL).</p>
<div class="figure align-default" id="id5">
<img alt="../../_images/LocalizationBasics.svg" src="../../_images/LocalizationBasics.svg" /><p class="caption"><span class="caption-text">Localization Basics</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</div>
<p>Given is a point P in cartesian coordinates (x/y).
The task is to assign the point to a lane, defined by a general road geometry and calculate the transformed Point P’ in road coordinates (s/t).</p>
<p>Road geometry (based on OpenDRIVE):</p>
<blockquote>
<div><ul class="simple">
<li><p>A road consists of several sections</p></li>
<li><p>Each section consists of several lanes</p></li>
<li><p>Within a section, the number of lanes is constant</p></li>
<li><p>Lanes can have one predecessor and one successor</p></li>
<li><p>The road follows a reference line, which is the reference for the <em>s</em>-coordinate.
The <em>t</em>-coordinate is perpendicular to this line.</p></li>
</ul>
</div></blockquote>
<p>OWL specifics:</p>
<blockquote>
<div><ul class="simple">
<li><p>All lanes are sampled, generating a stream of generic quadrilaterals (LaneGeometryElements).</p></li>
<li><p>Within a section, the number of quads per lane is equal, and all lanes have the same length in s.</p></li>
<li><p>This is realized by a variable sampling width, determined by a constant sampling width along the longest arc.</p></li>
<li><p>Consequently, points perpendicular to the reference line (<em>t</em>-axis) have the same <em>s</em>-coordinate.</p></li>
</ul>
</div></blockquote>
<p>Note, that the final <em>t</em>-coorindate is calculated with respect to a virtual reference line for each lane.
This means, that points on the center of a lane have <em>t</em>-coordinate of 0.</p>
</div>
<div class="section" id="localization-sequence">
<h3>Localization sequence<a class="headerlink" href="#localization-sequence" title="Permalink to this headline"></a></h3>
<p>An <a class="reference external" href="https://www.boost.org/doc/libs/1_65_0/libs/geometry/doc/html/geometry/reference/spatial_indexes/boost__geometry__index__rtree.html">r-tree</a> is used to store each LaneGeometryElement.
Thereby, due to the nature of the r-tree, the bounding box of the LaneGeometryElement is described by its maximum Cartesian coordinates (x_min, x_max, y_min, y_max).
Objects are located by retrieving all intersecting bounding boxes from the r-tree.
The picture below shows an example of an agent (blue) with the corresponding Cartesian bounding box, and all located LaneGeometryElements.</p>
<div class="figure align-default" id="id6">
<img alt="../../_images/Localization1.png" src="../../_images/Localization1.png" />
<p class="caption"><span class="caption-text">Example of bounding boxes of LaneGeometryElements and agent</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</div>
<p>As the true boundary polygon may be smaller, the actual intersection polygon of the object and each LaneGeometryElement is calculated.
For each point of a non-empty intersection polygon, the s and t coordinates are calculated and aggregated with respect to the underlying lane.
For each touched lane, the minimum and maximum s coordinate, and the minimum and maximum lane remainder (delta t) is stored.</p>
<div class="figure align-default" id="id7">
<img alt="../../_images/Localization2.png" src="../../_images/Localization2.png" />
<p class="caption"><span class="caption-text">Example for the calculation of s_min, s_max and delta_left</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</div>
<p>In addition, if the reference point (i.e. the middle of the rear axle) or the mainLaneLocator (i.e. the middle of the agent front) are located within a LaneGeometryElement, s/t/yaw is calculated of each point, respectively.
Further aggregation is done with respect to each road by calculating the minimum and maximum s for each road the agent intersects with.
For the current route of an agent, the following information is stored: s/t/yaw of the reference point and mainLaneLocator on the route (roads along a route are not allowed to intersect), distance from the lane boundary to the left and right for the road(s) along the route, and OpenDRIVE Ids of the lanes on the route that the agent touches.
The results also holds information wether both the reference point and the mainLaneLocator lay on the route.
In the currently implementation, these points must be located - otherwise the agent is despawened, as the agent cannot execute distance queries without a relation to its current route.</p>
</div>
</div>
<div class="section" id="traffic-signs-and-road-markings">
<span id="world-trafficsigns"></span><h2>Traffic Signs and Road Markings<a class="headerlink" href="#traffic-signs-and-road-markings" title="Permalink to this headline"></a></h2>
<p>The world currently supports a variety of traffic signs and road markings.
Both are defined in OpenDRIVE as “RoadSignal”.
At the moment it can only interpret traffic signs according to the German regulations “StVo”.
Traffic signs can contain optional supplementary traffic signs. Supplementary signs are dependent on a main traffic sign and contain additional information.
The following traffic signs are supported:</p>
<table class="tight-table docutils align-default">
<colgroup>
<col style="width: 31%" />
<col style="width: 6%" />
<col style="width: 8%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>TrafficSign</p></th>
<th class="head"><p>StVo Type</p></th>
<th class="head"><p>Subtype</p></th>
<th class="head"><p>Value and Units</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>GiveWay</p></td>
<td><p>205</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Stop</p></td>
<td><p>206</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>DoNotEnter</p></td>
<td><p>267</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>EnvironmentalZoneBegin</p></td>
<td><p>270.1</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>EnvironmentalZoneEnd</p></td>
<td><p>270.2</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>MaximumSpeedLimit</p></td>
<td><p>274</p></td>
<td><p>X</p></td>
<td><p>The subtype “X” is used to define the speedlimit in km/h.
Afterwards the world converts it to m/s.</p></td>
</tr>
<tr class="row-even"><td><p>SpeedLimitZoneBegin</p></td>
<td><p>274.1</p></td>
<td><p>-/20</p></td>
<td><p>The subtype is used to define the speedlimit in km/h.
Afterwards the world converts it to m/s.
No subtype = 30km/h, 20 = 20km/h</p></td>
</tr>
<tr class="row-odd"><td><p>SpeedLimitZoneEnd</p></td>
<td><p>274.2</p></td>
<td><p>-/20</p></td>
<td><p>The subtype is used to define the speedlimit in km/h.
Afterwards the world converts it to m/s.
No subtype = 30km/h, 20 = 20km/h</p></td>
</tr>
<tr class="row-even"><td><p>MinimumSpeedLimit</p></td>
<td><p>275</p></td>
<td><p>X</p></td>
<td><p>The subtype is used to define the speedlimit in km/h.
Afterwards the world converts it to m/s.</p></td>
</tr>
<tr class="row-odd"><td><p>OvertakingBanBegin</p></td>
<td><p>276</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>OvertakingBanTrucksBegin</p></td>
<td><p>277</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>EndOfMaximumSpeedLimit</p></td>
<td><p>278</p></td>
<td><p>X</p></td>
<td><p>The subtype “X” is used to define the speedlimit in km/h.
Afterwards the world converts it to m/s.</p></td>
</tr>
<tr class="row-even"><td><p>EndOfMinimumSpeedLimit</p></td>
<td><p>279</p></td>
<td><p>X</p></td>
<td><p>The subtype “X” is used to define the speedlimit in km/h.
Afterwards the world converts it to m/s.</p></td>
</tr>
<tr class="row-odd"><td><p>OvertakingBanEnd</p></td>
<td><p>280</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>OvertakingBanTrucksEnd</p></td>
<td><p>281</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>EndOffAllSpeedLimitsAndOvertakingRestrictions</p></td>
<td><p>282</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>RightOfWayNextIntersection</p></td>
<td><p>301</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>RightOfWayBegin</p></td>
<td><p>306</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>RightOfWayEnd</p></td>
<td><p>307</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>TownBegin</p></td>
<td><p>310</p></td>
<td></td>
<td><p>This sign contains a text describing the name of the town</p></td>
</tr>
<tr class="row-even"><td><p>TownEnd</p></td>
<td><p>311</p></td>
<td></td>
<td><p>This sign contains a text describing the name of the town</p></td>
</tr>
<tr class="row-odd"><td><p>TrafficCalmedDistrictBegin</p></td>
<td><p>325.1</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>TrafficCalmedDistrictEnd</p></td>
<td><p>325.2</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>HighWayBegin</p></td>
<td><p>330.1</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>HighWayEnd</p></td>
<td><p>330.2</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>HighWayExit</p></td>
<td><p>333</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p>AnnounceHighwayExit</p></td>
<td><p>448</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>HighwayExitPole</p></td>
<td><p>450</p></td>
<td><p>50/51/52</p></td>
<td><p>The subtype describes the distance to the highway exit in m.
50 = 100m, 51 = 200m, 52 = 300m</p></td>
</tr>
<tr class="row-even"><td><p>AnnounceRightLaneEnd</p></td>
<td><p>531</p></td>
<td><p>10/11/12/13</p></td>
<td><p>The subtype describes the number of continuing lanes after the right lane ends.
10 = 1 lane, 11 = 2 lanes, 12 = 3 lanes, 13 = 4 lanes</p></td>
</tr>
<tr class="row-odd"><td><p>AnnounceLeftLaneEnd</p></td>
<td><p>531</p></td>
<td><p>20/21/22/23</p></td>
<td><p>The subtype describes the number of continuing lanes after the left lane ends.
10 = 1 lane, 11 = 2 lanes, 12 = 3 lanes, 13 = 4 lanes</p></td>
</tr>
<tr class="row-even"><td><p>DistanceIndication</p></td>
<td><p>1004</p></td>
<td><p>30/31/32</p></td>
<td><p>For subtype 30 the value describes the distance in m.
For subtype 31 the value describes the distance in km.
Subtype 32 has a STOP in 100m.</p></td>
</tr>
</tbody>
</table>
<p>The following road markings are supported:</p>
<table class="tight-table docutils align-default">
<colgroup>
<col style="width: 42%" />
<col style="width: 16%" />
<col style="width: 13%" />
<col style="width: 29%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>RoadMarking</p></th>
<th class="head"><p>StVo Type</p></th>
<th class="head"><p>Subtype</p></th>
<th class="head"><p>Value and Units</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>PedestrianCrossing</p></td>
<td><p>293</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Stop line</p></td>
<td><p>294</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>The pedestrian crossing can also be defined in OpenDRIVE as object with type “crosswalk”.</p>
</div>
<div class="section" id="lane-markings">
<span id="world-lanemarkings"></span><h2>Lane Markings<a class="headerlink" href="#lane-markings" title="Permalink to this headline"></a></h2>
<p>The world also supports lane markings (i.e. printed lines between two lanes) according to the OpenDRIVE standard.
The following attributes of the “roadMark” tag in the scenery file are stored in the world and can be retrieved by the GetLaneMarkings query: sOffset, type, weight, color.
The weight is converted into a width in meter: 0.15 for standard and 0.3 for bold. Lane markings are also converted to OSI LaneBoundaries.
For the OpenDRIVE type “solid solid”, “solid broken”, “broken solid”, and “broken broken” two LaneBoundaries are created in OSI with a fixed lateral distance of 0.15m.</p>
</div>
<div class="section" id="getobstruction">
<span id="world-getobstruction"></span><h2>GetObstruction<a class="headerlink" href="#getobstruction" title="Permalink to this headline"></a></h2>
<p>The GetObstruction function calculates the lateral distance an agent must travel in order to align with either the left or right boundary of a target object occupying the same lane.</p>
<p>The calculation adheres to the following process:</p>
<ol class="arabic simple">
<li><p>Project the agent’s MainLaneLocator along the lane to the nearest and furthest s-coordinate of the target object, capturing the projected points</p></li>
<li><p>Create a straight line from the two captured points</p></li>
<li><p>Calculate the Euclidean distance of each of the target object’s corners to the created line</p></li>
<li><p>Return the left-most and right-most points with respect to the created line</p></li>
</ol>
<p>If the first step fails, because the ego lane does not extend to the object’s position (i. e. it ends prematurely or the objects is outside the ego’s route), then the result is invalid, which is indicated by a separate valid flag.</p>
<div class="figure align-default" id="id8">
<img alt="../../_images/GetObstruction.png" src="../../_images/GetObstruction.png" />
<p class="caption"><span class="caption-text">Example for the calculation of GetObstruction</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="simulation.html" class="btn btn-neutral float-left" title="Simulation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../30_testing.html" class="btn btn-neutral float-right" title="EndToEnd Test Framework" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></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>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>