Environment is an object that contains all the elements visible on the scene along with components that affect how they are rendered.
+It contains several objects aggregating static environment objects in terms of their type.
+Moreover, it contains elements responsible for controlling random traffic.
+
+
+
Own Environment prefab
+
If you would like to develop your own prefab Environment for AWSIM, we encourage you to read this tutorial.
+
+
+
AutowareSimulation scene
+
If you would like to see how Environment with random traffic works or run some tests, we encourage you to familiarize yourself with the AutowareSimulation scene described in this section.
+
+
Prefab Environment is also used to create a point cloud (*.pcd file) needed to locate the EgoVehicle in the simulated AWSIM scene.
+The point cloud is created using the RGL plugin and then used in Autoware.
+We encourage you to familiarize yourself with an example scene of creating a point cloud - described here.
+
+
Create PointCloud (*.pcd file)
+
If you would like to learn how to create a point cloud in AWSIM using Environment prefab, we encourage you to read this tutorial.
+
+
Architecture
+
The architecture of an Environment - with dependencies between components - is presented on the following diagram.
Due to the similarity of the above prefabs, this section focuses on prefab Nishishinjuku RandomTraffic.
+The exact differences between Nishishinjuku RandomTraffic and Nishishinjuku Traffic will be described in the future.
+
+
+
Environment name
+
In order to standardize the documentation, the name Environment will be used in this section as the equivalent of the prefab named Nishishinjuku RandomTraffic.
+
+
Nishishinjuku RandomTraffic prefab has the following content:
+
+
As you can see it contains:
+
+
SJK* objects - which are aggregators for visual models.
+
RandomTrafficSimulator, TrafficIntersections, TrafficLanes, StopLines - which are responsible for random traffic of NPCVehicles.
+
NPCPedestrians - which is an aggregator of NPCPedestrian prefabs added to the scene.
+
Volume, Directional Light - which are components that affect the appearance of objects on the scene.
+
+
All of these objects are described below in this section.
+
Visual elements
+
Nishishinjuku RandomTraffic prefab contains many visual elements which are described here.
+
Link in the default Scene
+
Nishishinjuku RandomTraffic prefab is added to the Environment object - between which there is rotation about the Oy axis by 90 degrees.
+This rotation is added because of the differences in coordinate alignments between the Nishishinjuku RandomTraffic prefab objects (which have been modeled as *.fbx files) and the specifics of the GridZone definition (more on this is described here).
+
Object Environment is added to AutowareSimulation which is added directly to the main parent of the scene - there are no transformations between these objects.
+
+
Components
+
+
Nishishinjuku RandomTraffic (Environment) prefab contains only one component:
+
+
Environment (script) - which is important for communicating with Autoware and loading elements from Lanelet2.
+Because it allows to define the location of the environment in relation to the world.
+
+
Layers
+
In order to enable the movement of vehicles around the environment, additional layers have been added to the project: Ground and Vehicle.
+
+
All objects that are acting as a ground for NPCVehicles and EgoVehicle to move on have been added to Ground layer - they cannot pass through each other and should collide for the physics engine to calculate their interactions.
+
+
For this purpose, NPCVehicles and EgoVehicle have been added to the Vehicle layer.
+
+
In the project physics settings, it is ensured that collisions between objects in the Vehicle layer are disabled (this applies to EgoVehicle and NPCVehicles - they do not collide with each other):
+
+
Traffic Components
+
Due to the specificity of the use of RandomTrafficSimulator, TrafficIntersections, TrafficLanes, StopLines objects, they have been described in a separate section Traffic Components - where all the elements necessary in simulated random traffic are presented.
+
Visual Elements (SJK)
+
The visuals elements have been loaded and organized using the *.fbx files which can be found under the path:
Environment prefab contains several objects aggregating stationary visual elements of space by their category:
+
+
+
SJK01_P01 - contains all objects constituting the ground of the environment, these are roads and green fields - each of them contains a MeshColliders and layer set as Ground to ensure collisions with NPCVehicles and EgoVehicle.
+
+
+
+
SJK01_P02 - contains all road surface markings on roads added to the environment.
+The objects of this group do not have MeshColliders and their layer is Default.
+
+
+
+
SJK01_P03 - contains all the vertical poles added to the environment, such as lamp posts, road signs and traffic light poles.
+Only TrafficLight poles and PedestrianLight poles have MeshCollider added.
+The layer for all objects is Default.
+
+
+
+
SJK01_P04 - contains all barriers added to the environment, such as barriers by sidewalks.
+The objects of this group do not have MeshColliders and their layer is Default.
+
+
+
+
SJK01_P05 - contains all greenery added to the environment, such as trees, shrubs, fragments of greenery next to buildings.
+The objects of this group do not have MeshColliders and their layer is Default.
+
+
+
+
SJK01_P06 - contains all buildings added to the environment.
+Objects of this category also have a MeshCollider added, but their layer is Default.
+
+
+
+
+
Scene Manager
+
For models (visual elements) added to the prefab to work properly with the LidarSensor sensor using RGL, make sure that the SceneManager component is added to the scene - more about it is described in this section.
+
In the scene containing Nishishinjuku RandomTrafficprefab Scene Manager (script) is added as a component to the AutowareSimulation object containing the Environment.
+
+
+
TrafficLights
+
TrafficLights are a stationary visual element belonging to the SJK01_P03 group.
+The lights are divided into two types, the classic TrafficLights used by vehicles at intersections and the PedestrianLights found at crosswalks.
+
+
Classic traffic lights are aggregated at object TrafficLightA01_Root01_ALL_GP01
+
+
while lights used by pedestrians are aggregated at object TrafficLightB01_Root01_All_GP01.
+
+
TrafficLights and PedestrianLights are developed using models available in the form of *.fbx files, which can be found under the following path:
+Assets/AWSIM/Externals/Nishishinjuku/Nishishinjuku_opimized/Models/TrafficLights/Models/*
+
Classic TrafficLights
+
+
TrafficLights lights, outside their housing, always contain 3 signaling light sources of different colors - from left to right: green, yellow, red.
+Optionally, they can have additional sources of signaling the ability to drive in a specific direction in the form of one or three signaling arrows.
+
+
In the environment there are many classic lights with different signaling configurations.
+However, each contains:
+
+
Transform - defines the position of the lights in the environment relative to the main parent of the group (SJK01_P03).
+
Mesh Filter - contains a reference to the Mesh of the object.
+
Mesh Renderer - enables the rendering of Mesh, including its geometry, textures, and materials, giving it a visual appearance in the scene.
+
Mesh Collider - allows an object to have collision detection based on Mesh.
+
Traffic Light (script) - provides an interface to control signaling by changing the emission of materials.
+This script is used for simulated traffic, so it is described.
+
+
Materials
+
An important element that is configured in the TrafficLights object are the materials in the Mesh Renderer component.
+Material with index 0 always applies to the housing of the lights.
+Subsequent elements 1-6 correspond to successive slots of light sources (round luminous objects) - starting from the upper left corner of the object in the right direction, to the bottom and back to the left corner.
+These indexes are used in script Traffic Light (script) - described here.
+
+
Materials for lighting slots that are assigned in Mesh Renderer can be found in the following path:
+Assets/AWSIM/Externals/Nishishinjuku/Nishishinjuku_opimized/Models/TrafficLights/Materials/*
+
PedestrianLights
+
+
PedestrianLights lights, outside their housing, always contain 2 signaling light sources of different colors - red on top and green on the bottom.
+
+
In the environment there are many pedestrian lights - they have the same components as classic TrafficLights, but the main difference is the configuration of their materials.
+
Materials
+
An important element that is configured in the PedestrianLights object are the materials in the Mesh Renderer component.
+Material with index 0 always applies to the housing of the lights.
+Subsequent elements 1-2 correspond to successive slots of light sources (round luminous objects) - starting from top to bottom.
+These indexes are used in script Traffic Light (script) - described here.
+
+Materials for lighting slots that are assigned in Mesh Renderer can be found in the following path:
+Assets/AWSIM/Externals/Nishishinjuku/Nishishinjuku_opimized/Models/TrafficLights/Materials/*
+
Volume
+
+
Volume is GameObject with Volume component which is used in the High Definition Render Pipeline (HDRP).
+It defines a set of scene settings and properties.
+It can be either global, affecting the entire scene, or local, influencing specific areas within the scene.
+Volumes are used to interpolate between different property values based on the Camera's position, allowing for dynamic changes to environment settings such as fog color, density, and other visual effects.
+
In case of prefab Nishishinjuku RandomTraffic volume works in global mode and has loaded Volume profile.
+This volume profile has a structure that overrides the default properties of Volume related to the following components: Fog, Shadows, Ambient Occlusion, Visual Environment, HDRI Sky.
+It can be found in the following path:
+Assets/AWSIM/Prefabs/Environments/Nishishinjuku/Volume Profile.asset
+
Directional Light
+
+
Directional Light is GameObject with Light component which is used in the High Definition Render Pipeline (HDRP).
+It controls the shape, color, and intensity of the light.
+It also controls whether or not the light casts shadows in scene, as well as more advanced settings.
+
In case of prefab Nishishinjuku RandomTraffic a Directional type light is added.
+It creates effects that are similar to sunlight in scene.
+This light illuminates all GameObjects in the scene as if the light rays are parallel and always from the same direction.
+Directional light disregards the distance between the Light itself and the target, so the light does not diminish with distance.
+The strength of the Light (Intensity) is set to 73123.09 Lux.
+In addition, a Shadow Map with a resolution of 4096 is enabled, which is updated in Every Frame of the simulation.
+The transform of the Directional Light object is set in such a way that it shines on the environment almost vertically from above.
+
+
NPCPedestrians
+
NPCPedestrians is an aggregating object for NPCPedestrian objects placed in the environment.
+Prefab Nishishinjuku RandomTraffic has 7 NPCPedestrian (humanElegant) prefabs defined in selected places.
+More about this NPCPedestrian prefab you can read in this section.
+
Environment (script)
+
+
+
Environment (script) contains the information about how a simulated Environment is positioned in real world.
+That means it describes what is the real world position of a simulated Environment.
+
AWSIM uses part of a Military Grid Reference System (MGRS).
+To understand this topic, you only need to know, that using MGRS you can specify distinct parts of the globe with different accuracy.
+For AWSIM the chosen accuracy is a 100x100 km square.
+Such a square is identified with a unique code like 54SUE (for more information on Grid Zone please see this page).
+
Inside this Grid Zone the exact location is specified with the offset calculated from the bottom-left corner of the Grid Zone.
+You can interpret the Grid Zone as a local coordinate system in which you position the Environment.
+
In the Nishishinjuku RandomTraffic prefab, the simulated Environment is positioned in the Grid Zone54SUE.
+The offset if equal to 81655.73 meters in the Ox axis, 50137.43 meters in the Oy axis and 42.49998 meters in the Oz axis.
+In addition to this shift, it is also necessary to rotate the Environment in the scene by 90 degrees about the Oy axis - this is ensured by the transform in the prefab object.
+
This means that the 3D models were created in reference to this exact point and because of that the 3D models of Environment align perfectly with the data from Lanelet2.
+
+
The essence of Environment (script)
+
The Environment (script) configuration is necessary at the moment of loading data from Lanelet2.
+
Internally it shifts the elements from Lanelet2 by the given offset so that they align with the Environment that is located at the local origin with no offset.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/AWSIMEnvironment/layers.png b/Components/Environment/AWSIMEnvironment/layers.png
new file mode 100644
index 0000000000..bcebe7eed4
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/layers.png differ
diff --git a/Components/Environment/AWSIMEnvironment/layers_physis.png b/Components/Environment/AWSIMEnvironment/layers_physis.png
new file mode 100644
index 0000000000..f0dccc9eaa
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/layers_physis.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/light.png b/Components/Environment/AWSIMEnvironment/lights/light.png
new file mode 100644
index 0000000000..e041f88f1c
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/light.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/light_prefab.png b/Components/Environment/AWSIMEnvironment/lights/light_prefab.png
new file mode 100644
index 0000000000..7f16ad753e
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/light_prefab.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/lights_arrow.png b/Components/Environment/AWSIMEnvironment/lights/lights_arrow.png
new file mode 100644
index 0000000000..767bd6b3c3
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/lights_arrow.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/lights_collider.png b/Components/Environment/AWSIMEnvironment/lights/lights_collider.png
new file mode 100644
index 0000000000..5e51801824
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/lights_collider.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/lights_link.png b/Components/Environment/AWSIMEnvironment/lights/lights_link.png
new file mode 100644
index 0000000000..ddf1dbc8a5
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/lights_link.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/lights_materials.png b/Components/Environment/AWSIMEnvironment/lights/lights_materials.png
new file mode 100644
index 0000000000..52af405829
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/lights_materials.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/pedestian_lights_link.png b/Components/Environment/AWSIMEnvironment/lights/pedestian_lights_link.png
new file mode 100644
index 0000000000..70e05ce6f1
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/pedestian_lights_link.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/pedestrian_light.png b/Components/Environment/AWSIMEnvironment/lights/pedestrian_light.png
new file mode 100644
index 0000000000..4b84fd26b8
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/pedestrian_light.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/pedestrian_lights_materials.png b/Components/Environment/AWSIMEnvironment/lights/pedestrian_lights_materials.png
new file mode 100644
index 0000000000..d5bf5a3a2b
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/pedestrian_lights_materials.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/pedestrian_lights_prefab.png b/Components/Environment/AWSIMEnvironment/lights/pedestrian_lights_prefab.png
new file mode 100644
index 0000000000..82729e4c85
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/pedestrian_lights_prefab.png differ
diff --git a/Components/Environment/AWSIMEnvironment/lights/sjk_lights_link.png b/Components/Environment/AWSIMEnvironment/lights/sjk_lights_link.png
new file mode 100644
index 0000000000..6745087692
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/lights/sjk_lights_link.png differ
diff --git a/Components/Environment/AWSIMEnvironment/link.png b/Components/Environment/AWSIMEnvironment/link.png
new file mode 100644
index 0000000000..04aa35e169
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/link.png differ
diff --git a/Components/Environment/AWSIMEnvironment/model_layer.png b/Components/Environment/AWSIMEnvironment/model_layer.png
new file mode 100644
index 0000000000..eb20fd4c17
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/model_layer.png differ
diff --git a/Components/Environment/AWSIMEnvironment/scene_manager.png b/Components/Environment/AWSIMEnvironment/scene_manager.png
new file mode 100644
index 0000000000..cb94c3486b
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/scene_manager.png differ
diff --git a/Components/Environment/AWSIMEnvironment/sjk1.png b/Components/Environment/AWSIMEnvironment/sjk1.png
new file mode 100644
index 0000000000..0de8344f58
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/sjk1.png differ
diff --git a/Components/Environment/AWSIMEnvironment/sjk2.png b/Components/Environment/AWSIMEnvironment/sjk2.png
new file mode 100644
index 0000000000..0fb33cef59
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/sjk2.png differ
diff --git a/Components/Environment/AWSIMEnvironment/sjk3.png b/Components/Environment/AWSIMEnvironment/sjk3.png
new file mode 100644
index 0000000000..7ec5e9b837
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/sjk3.png differ
diff --git a/Components/Environment/AWSIMEnvironment/sjk4.png b/Components/Environment/AWSIMEnvironment/sjk4.png
new file mode 100644
index 0000000000..432eed37e8
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/sjk4.png differ
diff --git a/Components/Environment/AWSIMEnvironment/sjk5.png b/Components/Environment/AWSIMEnvironment/sjk5.png
new file mode 100644
index 0000000000..346f9c039d
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/sjk5.png differ
diff --git a/Components/Environment/AWSIMEnvironment/sjk6.png b/Components/Environment/AWSIMEnvironment/sjk6.png
new file mode 100644
index 0000000000..2158853f8b
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/sjk6.png differ
diff --git a/Components/Environment/AWSIMEnvironment/vehicle_layer.png b/Components/Environment/AWSIMEnvironment/vehicle_layer.png
new file mode 100644
index 0000000000..d7849e0245
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/vehicle_layer.png differ
diff --git a/Components/Environment/AWSIMEnvironment/volume.png b/Components/Environment/AWSIMEnvironment/volume.png
new file mode 100644
index 0000000000..1eda92ff07
Binary files /dev/null and b/Components/Environment/AWSIMEnvironment/volume.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/add_environment_script.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/add_environment_script.gif
new file mode 100644
index 0000000000..dd53523524
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/add_environment_script.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_add_object.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_add_object.gif
new file mode 100644
index 0000000000..b04c58528a
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_add_object.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_config.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_config.gif
new file mode 100644
index 0000000000..9930cdfbac
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_config.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_search.png b/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_search.png
new file mode 100644
index 0000000000..f0206c4bfd
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/directional_light_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_3d_models.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_3d_models.png
new file mode 100644
index 0000000000..009248e1a0
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_3d_models.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_directional_light.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_directional_light.png
new file mode 100644
index 0000000000..b2134b38d4
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_directional_light.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_npc_pedestrianl.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_npc_pedestrianl.png
new file mode 100644
index 0000000000..5f261db022
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_npc_pedestrianl.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_volume.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_volume.png
new file mode 100644
index 0000000000..43e8aff365
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_add_volume.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_environment.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_environment.png
new file mode 100644
index 0000000000..e1c099ad70
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_environment.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_mgrs.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_mgrs.png
new file mode 100644
index 0000000000..3062ca283a
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_mgrs.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_save_prefab.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_save_prefab.gif
new file mode 100644
index 0000000000..aa49076912
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_save_prefab.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/environment_transformation.png b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_transformation.png
new file mode 100644
index 0000000000..3feea25d1d
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/environment_transformation.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/fbx_change.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/fbx_change.gif
new file mode 100644
index 0000000000..4e9b348eb5
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/fbx_change.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/fbx_drag.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/fbx_drag.gif
new file mode 100644
index 0000000000..c25e7ce6d2
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/fbx_drag.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/index.html b/Components/Environment/AddNewEnvironment/AddEnvironment/index.html
new file mode 100644
index 0000000000..2baef4becb
--- /dev/null
+++ b/Components/Environment/AddNewEnvironment/AddEnvironment/index.html
@@ -0,0 +1,2264 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Environment - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Environment is an important part of a Scene in AWSIM.
+Every aspect of the simulated surrounding world needs to be included in the Environment prefab - in this section you will learn how to develop it.
+However, first Lanelet2 needs to be developed along with 3D models of the world, which will be the main elements of this prefab.
+
+
Tip
+
If you want to learn more about the Environment at AWSIM, please visit this page.
+
+
Create a Lanelet2
+
Before you start creating Lanelet2, we encourage you to read the documentation to find out what Lanelet2 is all about. Lanelet2 can be created using VectorMapBuilder (VMP) based on the PCD obtained from real-life LiDAR sensor.
+
When working with the VMP, it is necessary to ensure the most accurate mapping of the road situation using the available elements.
+Especially important are TrafficLanes created in VMB as connected Road Nodes and StopLines created in VMB as Road Surface Stoplines.
+
+
Lanelet2 positioning
+
Lanelet2 should be created in MGRS coordinates of the real place you are recreating.
+Please position your Lanelet2 relative to the origin (bottom left corner) of the MGRS Grid Zone with the 100 km Square ID in which the location lays. More details can be read here.
+
You can think of the Grid Zone as a local coordinate system.
+Instead of making global (0,0) point (crossing of Equator and Prime Median) our coordinate system origin we take a closer one.
+The MGRS Grid Zone with 100 km Square ID code designates a 100x100 [kmxkm] square on the map and we take its bottom left corner as our local origin.
+
+
Example
+
Lets examine one node from an example Lanelet2 map:
The node with id="4" position is described as absolute coordinates given in the <node>.
+In this example the coordinates are as follows lat="35.68855194431519" lon="139.69142711058254.
+
It is also described as local transformation defined as a translation relative to the origin of the MGRS Grid Zone with 100 km Square ID (bottom left corner).
+The MGRS Grid Zone designation with 100 km Square ID in this case is equal to 54SUE.
+In this example the offset in the X axis is as follows k="local_x" v="81596.1357"
+and the offset in the Y axis is as follows k="local_y" v="50194.0803".
+
Note that elevation information is also included.
+
+
+
Create 3D models
+
You can create 3D models of an Environment as you wish.
+It is advised however, to prepare the models in form of .fbx files.
+Additionally you should include materials and textures in separate directories.
+Many models are delivered in this format.
+This file format allows you to import models into Unity with materials and replace materials while importing. You can learn more about it here.
+
You can see a .fbx model added and modified on the fly in the example of this section.
+
Guidelines
+
To improve the simulation performance of a scene containing your Environment prefab, please keep in mind some of these tips when creating 3D models:
+
+
+
Prefer more smaller models over a few big ones.
+
In general it is beneficial for performance when you make one small mesh of a object like tree and reuse it on the scene placing many prefabs instead of making one giant mesh containing all trees on the given scene.
+It is beneficial even in situations when you are not reusing the meshes.
+Lets say you have a city with many buildings - and every one of those buildings is different - it is still advised to model those building individually and make them separate GameObjects.
+
+
+
Choose texture resolution appropriately.
+
Always have in mind what is the target usage of your texture.
+Avoid making a high resolution texture for a small object or the one that will always be far away from the camera.
+This way you can save some computing power by not calculating the details that will not be seen because of the screen resolution.
+
+
Practical advice
+
You can follow these simple rules when deciding on texture quality (texel density):
+
+
For general objects choose 512px/m (so the minimum size of texture is 512/512)
+
For important objects that are close to the camera choose 1024px/m (so the minimum size of texture is 1024/1024)
+
+
+
+
+
(optional) Add animation.
+
Add animations to correct objects.
+If some element in the 3D model are interactive they should be divided into separate parts.
+
+
+
What's more, consider these tips related directly to the use of 3D models in AWSIM:
+
+
Creating a 3D model based on actual point cloud data makes it more realistic.
Occlusion culling and flutter culling cannot be used because the sensors detection target will disappear.
+
Each traffic light should have a separate GameObject. Also, each light in the traffic light should be split into separate materials.
+
+
Create an Environment prefab
+
In this part, you will learn how to create a Environment prefab - that is, develop a GameObject containing all the necessary elements and save it as a prefab.
+
1. Add 3D models
+
In this section we will add roads, buildings, greenery, signs, road markings etc. to our scene.
+
Most often your models will be saved in the .fbx format.
+If so, you can customize the materials in the imported model just before importing it.
+Sometimes it is necessary as models come with placeholder materials.
+You can either
+
+
replace materials for every added GameObject into the Scene,
+
or replace materials for one GameObject and save this object as a prefab to easily load it later.
+
+
In order to add 3D models from the .fbx file to the Scene please do the following steps:
+
+
In the Project view navigate to the directory where the model is located and click on the model file.
+
Now you can customize the materials used in the model in the Inspector view.
+
Drag the model into the Scene where you want to position it.
+
Move the Object in the Hierarchy tree appropriately.
+
(optional) Now you can save this model configuration as a prefab to easily reuse it.
+ Do this by dragging the Object from the Scene into the Project view.
+ When you get a warning make sure to select you want to create an original new prefab.
+
+
+
Example
+
An example video of the full process of importing a model, changing the materials, saving new model as a prefab and importing the new prefab.
+
+
+
When creating a complex Environment with many elements you should group them appropriately in the Hierarchy view.
+This depends on the individual style you like more, but it is a good practice to add all repeating elements into one common Object.
+E.g. all identical traffic lights grouped in TrafficLights Object.
+The same can be done with trees, buildings, signs etc.
+You can group Objects as you like.
+
+
Object hierarchy
+
When adding elements to the Environment that are part of the static world (like 3D models of buildings, traffic lights etc.) it is good practice to collect them in one parent GameObject called Map or something similar.
+
By doing this you can set a transformation of the parent GameObjectMap to adjust the world pose in reference to e.g. loaded objects from Lanelet2.
+
+
+
+
Remember to unpack
+
Please remember to unpack all Object added into the scene.
+If you don't they will change materials together with the .fbx model file as demonstrated in the example below.
+
This is unwanted behavior.
+When you import a model and change some materials, but leave the rest default and don't unpack the model, then your instances of this model on the scene may change when you change the original fbx model settings.
+
See the example below to visualize what is the problem.
+
+Example
+
In this example we will
+
+
Place the model on the Scene.
+
Then intentionally not unpack the model
+
Only then change the materials of the original fbx model, not the instance on the scene
+
+
+
Watch what happens, the instance on the Scene changes the materials together with the model.
+This only happens if you don't unpack the model.
+
+
+
+
+
Example Environment after adding 3D models
+
After completing this step you should have an EnvironmentObject that looks similar to the one presented below.
+
+
The Environment with 3D models can look similar to the one presented below.
+
+
+
2. Add an Environment Script
+
Add an Environment Script as component in the Environment object (see the last example in section before).
+It does not change the appearance of the Environment, but is necessary for the simulation to work correctly.
+
+
+
Click on the Add Component button in the Environment object.
+
+
+
+
Search for Environment and select it.
+
+
+
+
Set the MGRS to the offset of your Environment as explained in this section.
+
+
+
+
+
Info
+
Due to the differences between VectorMapBuilder and Unity, it may be necessary to set the transform of the Environment object.
+The transform in Environment should be set in such a way that the TrafficLanes match the modeled roads. Most often it is necessary to set the positive 90 degree rotation over Y axis.
+
This step should be done after importing items from lanelet2.
+Only then will you know if you have Environment misaligned with items from lanelet2.
+
+
+
3. Add a Directional Light
+
+
+
Create a new child Object of the Environment and name it Directional Light.
+
+
+
+
Click Add Component button, search for Light and select it.
+
+
+
+
Change light Type to Directional.
+
+
+
Now you can configure the directional light as you wish. E.g. change the intensity or orientation.
Open Assets/AWSIM/Prefabs/NPCs/Pedestrians in Project view and drag a humanElegant into the NPCPedestrians parent object.
+
+
+
+
+
Click Add Component in the humanElegant object and search for Simple Pedestrian Walker Controller Script and select it.
+
+
+
This is a simple Script that makes the pedestrian walk straight and turn around indefinitely.
+You can configure pedestrian behavior with 2 parameters.
+
+
Duration - how long will the pedestrian walk straight
+
Speed - how fast will the pedestrian walk straight
+
+
+
Tip
+
The Simple Pedestrian Walker Controller Script is best suited to be used on pavements.
+
+
+
+
Finally position the NPCPedestrian on the scene where you want it to start walking.
+
+
Warning
+
Remember to set correct orientation, as the NPCPedestrian will walk straight from the starting position with the starting orientation.
+
+
+
+
+
Example Environment after adding NPC Pedestrians
+
+
+
6. Save an Environment prefab
+
After doing all the previous steps and having your Environment finished you can save it to prefab format.
+
+
Find an Environments directory in the Project view (Assets/AWSIM/Prefabs/Environments).
+
Drag the EnvironmentObject into the Project view.
+
(optional) Change the prefab name to recognize it easily later.
+
+
+
+
Success
+
Once you've added the Environment, you need to add and configure TrafficLights.
+For details please visit this tutorial.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/map_example.png b/Components/Environment/AddNewEnvironment/AddEnvironment/map_example.png
new file mode 100644
index 0000000000..f3a62dbd4e
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/map_example.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/model_configure_save.mp4 b/Components/Environment/AddNewEnvironment/AddEnvironment/model_configure_save.mp4
new file mode 100644
index 0000000000..7604190a59
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/model_configure_save.mp4 differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_add_parent.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_add_parent.gif
new file mode 100644
index 0000000000..a906eab003
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_add_parent.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_add_prefab.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_add_prefab.gif
new file mode 100644
index 0000000000..7046024d91
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_add_prefab.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_config.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_config.gif
new file mode 100644
index 0000000000..fc24b9de0e
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_config.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_find_prefab.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_find_prefab.gif
new file mode 100644
index 0000000000..bb8608403b
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_find_prefab.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_find_prefab2.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_find_prefab2.gif
new file mode 100644
index 0000000000..8b1fdcf6e8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_find_prefab2.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_search.png b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_search.png
new file mode 100644
index 0000000000..284b6893f8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/npcpedestrian_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/search_environment_script.png b/Components/Environment/AddNewEnvironment/AddEnvironment/search_environment_script.png
new file mode 100644
index 0000000000..15856d0c55
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/search_environment_script.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/volume_add_object.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/volume_add_object.gif
new file mode 100644
index 0000000000..6d83da2ef2
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/volume_add_object.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/volume_config.gif b/Components/Environment/AddNewEnvironment/AddEnvironment/volume_config.gif
new file mode 100644
index 0000000000..f5e7d59235
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/volume_config.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddEnvironment/volume_search.png b/Components/Environment/AddNewEnvironment/AddEnvironment/volume_search.png
new file mode 100644
index 0000000000..3d2a8c914e
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddEnvironment/volume_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_component_random_traffic_simulator.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_component_random_traffic_simulator.gif
new file mode 100644
index 0000000000..9e9b8c327c
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_component_random_traffic_simulator.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_component_random_traffic_simulator.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_component_random_traffic_simulator.png
new file mode 100644
index 0000000000..da0aad2873
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_component_random_traffic_simulator.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab.gif
new file mode 100644
index 0000000000..d09de8f462
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab1.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab1.gif
new file mode 100644
index 0000000000..2dd0916121
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab1.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab2.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab2.gif
new file mode 100644
index 0000000000..a3490268fc
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab2.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab3.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab3.gif
new file mode 100644
index 0000000000..ecc9b63077
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_npc_prefab3.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_random_traffic_simulator.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_random_traffic_simulator.gif
new file mode 100644
index 0000000000..f9f2b4e8cc
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_random_traffic_simulator.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane1.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane1.gif
new file mode 100644
index 0000000000..56cc231570
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane1.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane2.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane2.gif
new file mode 100644
index 0000000000..31ee21a828
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane2.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane3.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane3.gif
new file mode 100644
index 0000000000..f94b4da6fd
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane3.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane4.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane4.gif
new file mode 100644
index 0000000000..df22e9e8dd
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/add_traffic_lane4.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/index.html b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/index.html
new file mode 100644
index 0000000000..ddec0f9351
--- /dev/null
+++ b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddRandomTraffic/index.html
@@ -0,0 +1,1999 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Random Traffic - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add a Random Traffic to your scene you need the Random Traffic Simulator Script.
+
+
+
Create a new Game Object as a child of Environment and call it RandomTrafficSimulator.
+
+
+
+
Click a button Add Component in the Inspector to add a script.
+
+
+
+
A small window should pop-up.
+Search for RandomTrafficSimulator script and add it by double clicking it or by pressing enter.
+
+
+
+
Basic Configuration
+
After clicking on the newly created RandomTrafficSimulator object in the Scene tree you should see something like this in the Inspector view.
+
+
Random Traffic Simulator, as the name suggests, generates traffic based on random numbers.
+To replicate situations you can set a specific seed.
+
You can also set Vehicle Layer Mask and Ground Layer Mask.
+It is important to set these layers correctly, as they are a base for vehicle physics.
+If set incorrectly the vehicles may fall through the ground into the infinity.
+
+
Add NPCVehicles
+
Random Traffic Simulator Script moves, spawns and despawns vehicles based on the configuration.
+These settings can to be adjusted to your preference.
+
+
+
Setting Max Vehicle Count.
+
This parameter sets a limit on how many vehicles can be added to the scene at one time.
+
+
+
NPC Prefabs
+
These are models of vehicles that should be spawned on the scene, to add NPC Prefabs please follow these steps:
+
+
+
To do this click on the "+" sign and in the new list element at the bottom and click on the small icon on the right to select a prefab.
+
+
+
+
Change to the Assets tab in the small windows that popped-up.
+
+
+
+
Search for the Vehicle prefab you want to add, e.g. Hatchback.
Random Traffic Simulator Script will on random select one prefab from Npc Prefabs list every time when there are not enough vehicles on the scene (the number of vehicles on the scene is smaller than the number specified in the Max Vehicle Count field).
+
You can control the odds of selecting one vehicle prefab over another by adding more than one instance of the same prefab to this list.
+
+
+
+
Add spawnable lanes
+
Spawnable lanes are the lanes on which new vehicles can be spawned by the Random Traffic Simulator Script.
+Best practice is to use beginnings of the lanes on the edges of the map as spawnable lanes.
+
+
Warning
+
Make sure you have a lanelet added into your scene.
+The full tutorial on this topic can be found here.
Add an element to the Spawnable Lanes list by clicking on the "+" symbol or by selecting number of lanes directly.
+
+
+
+
Now you can click on the small icon on the right of the list element and select a Traffic Lane you are interested in.
+
+
Unfortunately all Traffic Lanes have the same names so it can be difficult to know which one to use.
+Alternatively you can do the following to add a traffic lane by visually selecting it in the editor:
+
+
+
Lock RandomTrafficSimulator in the Inspector view.
+
+
+
+
Select the Traffic Lane you are interested in on the Scene and as it gets highlighted in the Hierarchy view you can now drag and drop this Traffic Lane into the appropriate list element.
+
+
+
+
+
+
Vehicles configuration
+
The last thing to configure is the behavior of NPCVehicles.
+You can specify acceleration rate of vehicles and three values of deceleration.
+
+
+
+
Acceleration
+
This value is used for every acceleration the vehicle performs (after stop line or traffic lights).
+
+
+
Deceleration
+
This deceleration value is used for most casual traffic situations like slowing down before stop line.
+
+
+
Sudden Deceleration
+
This deceleration rate is used for emergency situations - when using standard deceleration rate is not enough to prevent some accident from happening (e.g. vehicle on the intersection didn't give way when it was supposed to).
+
+
+
Absolute Deceleration
+
This deceleration rate is a last resort for preventing a crash from happening.
+When no other deceleration is enough to prevent an accident this value is used.
+This should be set to the highest value achievable by a vehicle.
+
+
+
+
Question
+
This configuration is common for all vehicles managed by the Random Traffic Simulator Script.
+
+
+
Success
+
The last thing that needs to be done for RandomTraffic to work properly is to add intersections with traffic lights and configure their sequences. Details here.
Every TrafficIntersection on the scene needs to be added as a GameObject.
+Best practice is to create a parent object TrafficIntersections and add all instances of TrafficIntersection as its children.
+You can do this the same as with Random Traffic Simulator.
+
+
Traffic Lights configuration
+
Before performing this step, check all TrafficLights for correct configuration and make sure that TrafficLights have added scripts. If you want to learn how to add and configure it check out this tutorial.
+
+
Add a Box Collider
+
+
+
TrafficIntersection needs to be marked with a box collider.
+First click on the Add Component button.
+
+
+
+
In the window that popped up search for Box Collider and select it.
+
+
+
+
Then set the position and orientation and size of the Box Collider.
+You can do this by manipulating Box Collider properties Center and Size in the Inspector view.
+
+
+
Traffic Intersection Box Collider guidelines
+
When adding a Box Collider marking your Traffic Intersection please make sure that
+
+
It is not floating over the ground - there is no gap between the Box Collider and The Traffic Intersection
+
It is high enough to cover all Vehicles that will be passing through the Intersection
+
It accurately represents the shape, position and orientation of the Traffic Intersection
+
+
+
+
+
Add a Traffic Intersection Script
+
+
+
Click on the Add Component button.
+
+
+
+
In the window that popped up search for Traffic Intersection and select it.
+
+
+
+
You need to set a proper Collider Mask in order for the script to work.
+
+
+
+
Create traffic light groups
+
Traffic Light Groups are groups of traffic lights that are synchronized, meaning they light up with the same color and pattern at all times.
+
Traffic lights are divided into groups to simplify the process of creating a lighting sequence.
+By default you will see 4 Traffic Light Groups, you can add and remove them to suit your needs.
+
+
+
First choose from the drop-down menu called Group the Traffic Light Group name you want to assign to your Traffic Light Group.
+
+
+
+
+
Then add as many Traffic Lights as you want your group to have.
+From the drop-down menu select the Traffic Lights you want to add.
+
+
+
+
Select Traffic Lights visually
+
If you have a lot of Traffic Lights it can be challenging to add them from the list.
+You can select them visually from the Scene the same as you had selected Traffic Lanes in the Random Traffic Simulator.
+
+
+
+
Create lighting sequences
+
Lighting Sequences is a list of commands based on which the Traffic Lights will operate on an intersection.
+The elements in the Lighting Sequences list are changes (commands) that will be executed on the Traffic Light Groups.
+
Group Lighting Order should be interpreted as a command (or order) given to all Traffic Lights in selected Traffic Light Group.
+In Group Lighting Orders you can set different traffic light status for every Traffic Light Group (in separate elements).
+Lighting sequences list is processed in an infinite loop.
+
It should be noted that changes applied to one Traffic Light Group will remain the same until the next Group Lighting Order is given to this Traffic Light Group.
+This means that if in one Group Lighting Order no command is sent to a Traffic Light Group then this Group will remain its current lighting pattern (color, bulb and status).
+
For every Lighting Sequences Element you have to specify the following
+
+
+
Interval Sec
+
This is the time for which the sequence should wait until executing next order, so how long this state will be active.
+
+
+
For every element in Group Lighting Orders there needs to be specified
+
+
Group to which this order will be applied
+
+
List of orders (Bulb Data)
+
In other words - what bulbs should be turned on, their color and pattern.
+
+
Type - What type of bulb should be turned on
+
Color - What color this bulb should have (in most cases this will be the same as color of the bulb if specified)
+
Status - How the bulb should light up (selecting SOLID_OFF is necessary only when you want to turn the Traffic Light completely off, meaning no bulb will light up)
+
+
+
Note
+
When applying the change to a Traffic Light
+
+
First all bulbs are turned off
+
Only after that changes made in the order are applied
+
+
This means it is only necessary to supply the data about what bulbs should be turned on.
+E.g. you don't have to turn off a red bulb when turning on the green one.
+
+
+
+
+
+
+
Warning
+
The first Element in the Lighting Sequences (in most cases) should contain bulb data for every Traffic Light Group.
+Traffic Light Groups not specified in the first Element will not light up at the beginning of the scene.
+
+
Example
+
Lets consider the following lighting sequence element.
+
+
In the Lighting Sequence Element 5 we tell all Traffic Lights in the Vehicle Traffic Light Group 2 to light up their Green Bulb with the color Green and status Solid On which means that they will be turned on all the time.
+We also implicitly tell them to turn all other Bulbs off.
+
In the same time we tell all Traffic Lights in the Pedestrian Traffic Light Group 2 to do the very same thing.
+
This state will be active for the next 15 seconds, and after that Traffic Intersection will move to the next Element in the Sequence.
+
Now lets consider the following Lighting Sequences Element 6.
+
+
Here we order the Traffic Lights in the Pedestrian Traffic Light Group 2 to light up their Green Bulb with the color Green and status Flashing.
+We also implicitly tell them to turn all other bulbs off, which were already off from the implicit change in Element 5, so this effectively does nothing.
+
Note that Lighting Sequences Element 6 has no orders for Vehicle Traffic Light Group 2.
+This means that Traffic Lights in the Vehicle Traffic Light Group 2 will hold on to their earlier orders.
+
This state will be active for 5 seconds, which means that Traffic Lights in the Vehicle Traffic Light Group 2 will be lighting solid green for the total of 20 seconds.
+
How to test
+
To test how your Traffic Intersection behaves simply run the Scene as shown here (but don't launch Autoware).
+To take a better look at the Traffic Lights you can change to the Scene view by pressing ctrl + 1 - now you can move the camera freely (to go back to the Game view simply press ctrl + 2).
+
As the time passes you can examine whether your Traffic Intersection is configured correctly.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_box.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_box.gif
new file mode 100644
index 0000000000..e5c75f13e6
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_box.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_script.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_script.gif
new file mode 100644
index 0000000000..5c4ec86f72
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_script.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_traffic_light.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_traffic_light.gif
new file mode 100644
index 0000000000..543cc6dfc7
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_traffic_light.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_traffic_light2.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_traffic_light2.gif
new file mode 100644
index 0000000000..d59c4de8c0
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_add_traffic_light2.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_collider_mask.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_collider_mask.png
new file mode 100644
index 0000000000..9dae4f30f3
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_collider_mask.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_search.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_search.png
new file mode 100644
index 0000000000..c4c6995b2c
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_size.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_size.png
new file mode 100644
index 0000000000..d8f9cdc06a
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersection_size.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersecton_example_sequence_element.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersecton_example_sequence_element.png
new file mode 100644
index 0000000000..2c1205e93d
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersecton_example_sequence_element.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersecton_example_sequence_element2.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersecton_example_sequence_element2.png
new file mode 100644
index 0000000000..a1d12ef34e
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/AddTrafficIntersection/traffic_intersecton_example_sequence_element2.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/add_stop_line.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/add_stop_line.gif
new file mode 100644
index 0000000000..67373321e1
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/add_stop_line.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/add_stop_line_add_script.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/add_stop_line_add_script.gif
new file mode 100644
index 0000000000..07be07de3f
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/add_stop_line_add_script.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/index.html b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/index.html
new file mode 100644
index 0000000000..b678bacac7
--- /dev/null
+++ b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/index.html
@@ -0,0 +1,2330 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Load Items From Lanelet - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add RandomTraffic to the Environment, it is necessary to load elements from the lanelet2.
+As a result of loading, TrafficLanes and StopLines will be added to the scene. Details of these components can be found here.
+
+
Warning
+
Before following this tutorial make sure you have added an Environment Script and set a proper MGRS offset position. This position is used when loading elements from the lanelet2!
+
+
+
+
Click on the AWSIM button in the top menu of the Unity editor and navigate to AWSIM -> Random Traffic -> Load Lanelet.
+
+
+
+
In the window that pops-up select your osm file, change some Waypoint Settings to suit your needs and click Load.
+
+
+
Waypoint Settings explanation
+
+
Resolution - resolution of resampling. Lower values provide better accuracy at the cost of processing time
+
Min Delta Length - minimum length(m) between adjacent points
+
Min Delta Angle - minimum angle(deg) between adjacent edges. Lowering this value produces a smoother curve
+
+
+
+
+
Traffic Lanes and Stop Lanes should occur in the Hierarchy view.
+If they appear somewhere else in your Hierarchy tree, then move them into the Environment object.
+
+
+
Complete loaded TrafficLanes
+
The Traffic Lanes that were loaded should be configures accordingly to the road situation.
+The aspects you can configure
+
+
+
Right of way
+
The right of way has to be configured so that Vehicles know how ot behave in the traffic.
+To configure this please visit a dedicated section in Add a Traffic Lane.
+After you have set right of way to all traffic lanes please follow this final step.
+
+
+
Stop Line
+
Assuming you have all Stop Lines loaded from the lanelet you have to add them to the Traffic Lanes.
+For detailed instruction please visit a dedicated section in Add a Traffic Lane.
+
If - for any reason - you don't have all the Stop Lines added, please follow this dedicated section.
+
+
+
How to test
+
If you want to test your Traffic Lanes you have to try running a Random Traffic.
+To verify one particular Traffic Lane or Traffic Lane connection you can make a new spawnable lane next to the Traffic Lane you want to test.
+This way you can be sure NPCVehicles will start driving on the Traffic Lane you are interested in at the beginning.
+
Add a StopLine manually
+
When something goes wrong when loading data from lanelet2 or you just want to add another StopLine manually please do the following
+
1. Add a GameObject
+
Add a new GameObject StopLine in the StopLines parent object.
+
+
2. Add a StopLine Script
+
Add a StopLine Script by clicking 'Add Component' and searching for Stop Line.
+
+
+
+
Example
+
So far your Stop Line should look like the following
+
+
+
3. Set points
+
Set the position of points Element 0 and Element 1.
+These Elements are the two end points of a Stop Line.
+The Stop Line will span between these points.
+
You don't need to set any data in the 'Transform' section as it is not used anyway.
+
+
StopLine coordinate system
+
Please note that the Stop Line Script operates in the global coordinate system.
+The transformations of StopLine Object and its parent Objects won't affect the Stop Line.
+
+Example
+
In this example you can see that the Position of the Game Object does not affect the position and orientation of the Stop Line.
+
For a Game Object in the center of the coordinate system.
+
+
The stop Line is in the specified position.
+
+
However with the Game Object shifted in X axis.
+
+
The Stop Line stays in the same position as before, not affected by any transformations happening to the Game Object.
+
+
+
+
4. Has Stop Sign
+
Select whether there is a Stop Sign.
+
Select the Has Stop Sign tick-box confirming that this Stop Line has a Stop Sign.
+The Stop Sign can be either vertical or horizontal.
+
+
5. Select a Traffic Light
+
Select from the drop-down menu the Traffic Light that is on the Traffic Intersection and is facing the vehicle that would be driving on the Traffic Lane connected with the Stop Line you are configuring.
+
In other words select the right Traffic Light for the Lane on which your Stop Line is placed.
+
+
+
Select Traffic Lights visually
+
If you have a lot of Traffic Lights it can be challenging to add them from the list.
+You can select them visually from the Scene the same as you had selected Traffic Lanes in the Random Traffic Simulator.
+
+
6. Configure the Traffic Lane
+
Every Stop Line has to be connected to a Traffic Lane.
+This is done in the Traffic Lane configuration.
+For this reason please check the Traffic Lane section for more details.
+
Add a TrafficLane manually
+
It is possible that something may go wring when reading a lanelet2 and you need to add an additional Traffic Lane or you just want to add it.
+To add a Traffic Lane manually please follow the steps below.
+
1. Add a GameObject
+
Add a new Game Object called TrafficLane into the TrafficLanes parent Object.
+
+
2. Add a Traffic Lane Script
+
Click the 'Add Component' button and search for the Traffic lane script and select it.
+
+
+
+
Example
+
So far your Traffic Lane should look like the following.
+
+
+
3. Configure Waypoints
+
Now we will configure the 'Waypoints' list.
+This list is an ordered list of nest points defining the Traffic Lane.
+When you want to add a waypoint to a Traffic Lane just click on the + button or specify the number of waypoints on the list in the field with number to the right from 'Waypoints' identifier.
+
The order of elements on this list determines how waypoints are connected.
+
+
+
Traffic Lane coordinate system
+
Please note that the Traffic Lane waypoints are located in the global coordinate system, any transformations set to a Game Object or paren Objects will be ignored.
+
This behavior is the same as with the Stop Line.
+You can see the example provided in the Stop Line tutorial.
+
+
+
General advice
+
+
Two waypoints should not be too far away from each other.
+
When creating a turn that is a curvature please keep in mind the angle that is created between two next waypoints connected.
+ The angles should be fairly small - this will translate to a smooth motion of vehicles.
+
+
+
4. Select the Turn Direction
+
You also need to select the Turn Direction.
+This field describes what are the vehicles traveling on ths Traffic Lane doing in reference to other Traffic Lanes.
+You need to select whether the vehicles are
+
+
Driving straight (STRAIGHT)
+
Turning right (RIGHT)
+
Turning left (LEFT)
+
+
+
5. Configure Next Lanes
+
You need to add all Traffic Lanes that have their beginning in the end of this Traffic Lane into the Next Lanes list.
+In other words if the vehicle can choose where he wants to drive (e.g. drive straight or drive left with choice of two different Traffic Lines).
+
To do this click the + sign in the Next Lanes list and in the element that appeared select the correct Traffic Lane.
+
+
+Next Lane example
+
Lets consider the following Traffic Intersection.
+
+
In this example we will consider the Traffic Lane driving from the bottom of the screen and turning right.
+After finishing driving in this Traffic Lane the vehicle has a choice of 4 different Traffic Lanes each turning into different lane on the parallel road.
+
All 4 Traffic Lanes are connected to the considered Traffic Lane.
+This situation is reflected in the Traffic Lane configuration shown below.
+
+
+
+
Select Traffic Lanes visually
+
If you have a lot of Traffic Lanes it can be challenging to add them from the list.
+You can select them visually from the Scene the same as you had selected Traffic Lanes in the Random Traffic Simulator.
+
+
6. Configure Previous Lanes
+
Traffic Lane has to have previous Traffic Lanes configured.
+This is done in the exact same way as configuring next lanes which was shown in the previous step.
+Please do the same, but add Traffic Lanes that are before the configured one instead of the ones after into the Prev Lanes list.
+
7. Configure Right Of Way
+
Now we will configure the Right Of Way Lanes.
+The Right Of Way Lanes is a list of Traffic Lanes that have a priority over the configured one.
+The process of adding the Right Of Way Lanes is the same as with adding Next Lanes.
+For this reason we ask you to see the aforementioned step for detailed description on how to do this (the only difference is that you add Traffic Lanes to the Right Of Way Lanes list).
+
+Right of way example
+
In this example lets consider the Traffic Lane highlighted in blue from the Traffic Intersection below.
+
+
This Traffic Lane has to give way to all Traffic Lanes highlighted on yellow.
+This means all of the yellow Traffic Lanes have to be added to the 'Right Of Way Lanes' list which is reflected on the configuration shown below.
+
+
+
8. Add Stop Line
+
Adding a Stop Line is necessary only when at the end of the configured Traffic Lane the Stop Line is present.
+If so, please select the correct Stop Line from the drop-down list.
+
+
+
Select Stop Line visually
+
If you have a lot of Stop Lines it can be challenging to add them from the list.
+You can select them visually from the Scene the same as you had selected Traffic Lanes in the Random Traffic Simulator.
+
+
9. Add Speed Limit.
+
In the field called Speed Limit simply write the speed limit that is in effect on the configured Traffic Lane.
+
+
10. Set the Right of Ways
+
To make the Right Of Ways list you configured earlier take effect simply click the 'Set RightOfWays' button.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/load_lanelet.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/load_lanelet.gif
new file mode 100644
index 0000000000..8e4ce0dbae
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/load_lanelet.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/load_lanelet2.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/load_lanelet2.gif
new file mode 100644
index 0000000000..f7a2f1f00b
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/load_lanelet2.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_add_traffic_light.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_add_traffic_light.gif
new file mode 100644
index 0000000000..93d3990e8d
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_add_traffic_light.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_has_stop_sign.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_has_stop_sign.gif
new file mode 100644
index 0000000000..79ae0652f6
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_has_stop_sign.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_inspector.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_inspector.png
new file mode 100644
index 0000000000..f95247d50c
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_inspector.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position11.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position11.png
new file mode 100644
index 0000000000..d86fe74dce
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position11.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position12.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position12.png
new file mode 100644
index 0000000000..91c137da03
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position12.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position21.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position21.png
new file mode 100644
index 0000000000..d00f1959fa
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position21.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position22.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position22.png
new file mode 100644
index 0000000000..5f7cdf46e5
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_position22.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_search.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_search.png
new file mode 100644
index 0000000000..b450d1e298
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/stop_line_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_component.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_component.gif
new file mode 100644
index 0000000000..93a5730c11
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_component.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_next_lane.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_next_lane.gif
new file mode 100644
index 0000000000..c0157d54d1
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_next_lane.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_object.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_object.gif
new file mode 100644
index 0000000000..9e359faf87
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_object.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_stop_line.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_stop_line.gif
new file mode 100644
index 0000000000..0664b1b578
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_stop_line.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_waypoints.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_waypoints.gif
new file mode 100644
index 0000000000..0c8f417a86
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_add_waypoints.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_configuration.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_configuration.png
new file mode 100644
index 0000000000..b9da759da8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_configuration.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_description.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_description.png
new file mode 100644
index 0000000000..69c3918bc6
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_description.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_right_of_way_configuration.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_right_of_way_configuration.png
new file mode 100644
index 0000000000..9921a0aee0
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_right_of_way_configuration.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_right_of_way_situation.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_right_of_way_situation.png
new file mode 100644
index 0000000000..2b7f6f6ef8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_right_of_way_situation.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_search.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_search.png
new file mode 100644
index 0000000000..5be32b0adf
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_select_turn_direction.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_select_turn_direction.gif
new file mode 100644
index 0000000000..93f28d37e0
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_select_turn_direction.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_set_right_of_ways.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_set_right_of_ways.gif
new file mode 100644
index 0000000000..ac9f8b06d8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_set_right_of_ways.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_set_speed_limit.gif b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_set_speed_limit.gif
new file mode 100644
index 0000000000..c8248f73ad
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_set_speed_limit.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_situation.png b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_situation.png
new file mode 100644
index 0000000000..930005942f
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddRandomTraffic/LoadItemsFromLanelet/traffic_lane_situation.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/index.html b/Components/Environment/AddNewEnvironment/AddTrafficLights/index.html
new file mode 100644
index 0000000000..c2ea4842b8
--- /dev/null
+++ b/Components/Environment/AddNewEnvironment/AddTrafficLights/index.html
@@ -0,0 +1,2011 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add TrafficLights - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To add TrafficLights into your Environment follow steps below.
+
+
Tip
+
In the Environment you are creating there will most likely be many TrafficLights that should look and work the same way.
+To simplify the process of creating an environment it is advised to create one TrafficLight of each type with this tutorial and then save them as prefabs that you will be able to reuse.
+
+
1. Add TrafficLight Object
+
Into your Map object in the Hierarchy view add a new Child Object and name it appropriately.
+
+
2. Add a Mesh Filter and select meshes
+
+
+
Click on the Add Component button.
+
+
+
+
Search for Mesh filter and select it by clicking on it.
+
+
+
+
For each TrafficLight specify the mesh you want to use.
+
+
+
+
3.Add a Mesh Renderer and specify materials
+
+
+
The same way as above search for Mesh Renderer and select it.
+
+
+
+
Now you need to specify individual component materials.
+
For example in the Traffic.Lights.001 mesh there are four sub-meshes that need their individual materials.
+
To specify a material click on the selection button on Materials element and search for the material you want to use and select it.
+
+
Repeat this process until you specify all materials.
+When you add one material more than there are sub-meshes you will see this warning.
+Then just remove the last material and the TrafficLight is prepared.
+
+
+
Info
+
Different material for every bulb is necessary for the color changing behavior that we expect from traffic lights.
+Even though in most cases you will use the same material for every Bulb, having them as different elements is necessary.
+Please only use models of TrafficLights that have different Materials Elements for every Bulb.
+
+
+
Materials order
+
When specifying materials remember the order in which they are used in the mesh.
+Especially remember what Materials Elements are associated with every Bulb in the TrafficLight.
+This information will be needed later.
+
+
Example
+
In the case of Traffic.Lights.001 the bulb materials are ordered starting from the left side with index 1 and increasing to the right.
+
+
+
+
+
+
+
+
4. Add a Mesh Collider
+
The same way as above search for Mesh Collider and select it.
+Collider may not seem useful, as the TrafficLight in many cases will be out of reach of vehicles.
+It is however used for LiDAR simulation, so it is advised to always add colliders to Objects that should be detected by LiDARs.
+
+
5. Position TrafficLight in the Environment
+
Finally after configuring all visual aspects of the TrafficLight you can position it in the environment.
+Do this by dragging a TrafficLight with a square representing a plane or with an arrow representing one axis.
+
+
6. Add TrafficLight Script
+
The Traffic Light Script will enable you to control how the TrafficLight lights up and create sequences.
+
+
+
Click on Add Component, search for the Traffic Light script and select it.
+
+
+
+
You should see the Bulb Emission config already configured. These are the colors that will be used to light up the Bulbs in TrafficLight. You may adjust them to suit your needs.
+
+
+
+
You will have to specify Bulb material config, in which you should add elements with fields:
+
+
+
Bulb Type - One of the predefined Bulb types that describes the Bulb (its color and pattern).
+
+
+
Material Index - Index of the material that you want to be associated with the Bulb Type. This is where you need to use the knowledge from earlier where we said you have to remember what Materials Element corresponds to which bulb sub-mesh.
+
+
+
+
Bulb configuration example
+
Here we specify an element Type as RED_BULB and associate it with Material that has an index 3.
+This will result in associating the right most bulb with the name RED_BULB.
+This information will be of use to us when specifying TrafficLights sequences.
+
+
+
+
+
+
Success
+
Once you have added TrafficLights to your Environment, you can start configuring RandomTraffic which will add moving vehicles to it! Details here.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_collider_search.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_collider_search.png
new file mode 100644
index 0000000000..cada37533f
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_collider_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_filter_search.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_filter_search.png
new file mode 100644
index 0000000000..e48797a8de
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_filter_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_renderer_search.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_renderer_search.png
new file mode 100644
index 0000000000..cbc3562bd0
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/mesh_renderer_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_001.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_001.png
new file mode 100644
index 0000000000..801d8968d8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_001.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_1_bulb.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_1_bulb.png
new file mode 100644
index 0000000000..6311ab9fd0
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_1_bulb.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_2_bulb.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_2_bulb.png
new file mode 100644
index 0000000000..602b3ba059
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_2_bulb.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_3_bulb.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_3_bulb.png
new file mode 100644
index 0000000000..84d9eb7176
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_3_bulb.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_add_component.gif b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_add_component.gif
new file mode 100644
index 0000000000..16bdbe93aa
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_add_component.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_add_object.gif b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_add_object.gif
new file mode 100644
index 0000000000..aae34ccda6
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_add_object.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_bulb_config.gif b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_bulb_config.gif
new file mode 100644
index 0000000000..eaaad9f713
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_bulb_config.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_bulb_emissions_config.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_bulb_emissions_config.png
new file mode 100644
index 0000000000..88acab8a63
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_bulb_emissions_config.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_position.gif b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_position.gif
new file mode 100644
index 0000000000..7c75e9bd27
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_position.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_script_search.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_script_search.png
new file mode 100644
index 0000000000..98320f18aa
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_script_search.png differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_select_material.gif b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_select_material.gif
new file mode 100644
index 0000000000..9b687bbcd3
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_select_material.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_select_mesh.gif b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_select_mesh.gif
new file mode 100644
index 0000000000..e2d44bebd8
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_select_mesh.gif differ
diff --git a/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_too_many_materials.png b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_too_many_materials.png
new file mode 100644
index 0000000000..da26c55d80
Binary files /dev/null and b/Components/Environment/AddNewEnvironment/AddTrafficLights/traffic_light_too_many_materials.png differ
diff --git a/Components/Environment/CreatePCD/add_vehicle_object.gif b/Components/Environment/CreatePCD/add_vehicle_object.gif
new file mode 100644
index 0000000000..8d3fef1101
Binary files /dev/null and b/Components/Environment/CreatePCD/add_vehicle_object.gif differ
diff --git a/Components/Environment/CreatePCD/image_0.png b/Components/Environment/CreatePCD/image_0.png
new file mode 100644
index 0000000000..efa77941be
Binary files /dev/null and b/Components/Environment/CreatePCD/image_0.png differ
diff --git a/Components/Environment/CreatePCD/image_1.png b/Components/Environment/CreatePCD/image_1.png
new file mode 100644
index 0000000000..b21ca149c0
Binary files /dev/null and b/Components/Environment/CreatePCD/image_1.png differ
diff --git a/Components/Environment/CreatePCD/image_2.png b/Components/Environment/CreatePCD/image_2.png
new file mode 100644
index 0000000000..900594ab98
Binary files /dev/null and b/Components/Environment/CreatePCD/image_2.png differ
diff --git a/Components/Environment/CreatePCD/image_3.png b/Components/Environment/CreatePCD/image_3.png
new file mode 100644
index 0000000000..bbfffba40a
Binary files /dev/null and b/Components/Environment/CreatePCD/image_3.png differ
diff --git a/Components/Environment/CreatePCD/image_4.png b/Components/Environment/CreatePCD/image_4.png
new file mode 100644
index 0000000000..b4ec491030
Binary files /dev/null and b/Components/Environment/CreatePCD/image_4.png differ
diff --git a/Components/Environment/CreatePCD/image_5.png b/Components/Environment/CreatePCD/image_5.png
new file mode 100644
index 0000000000..615c5c9b12
Binary files /dev/null and b/Components/Environment/CreatePCD/image_5.png differ
diff --git a/Components/Environment/CreatePCD/image_6.png b/Components/Environment/CreatePCD/image_6.png
new file mode 100644
index 0000000000..958c6cb2f6
Binary files /dev/null and b/Components/Environment/CreatePCD/image_6.png differ
diff --git a/Components/Environment/CreatePCD/index.html b/Components/Environment/CreatePCD/index.html
new file mode 100644
index 0000000000..48d05e38e2
--- /dev/null
+++ b/Components/Environment/CreatePCD/index.html
@@ -0,0 +1,2402 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create PCD - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
PointCloudMapper is a tool for a vehicle based point cloud mapping in a simulation environment.
+It is very useful when you need a point cloud based on some location, but don't have the possibility to physically map the real place.
+Instead you can map the simulated environment.
+
Required Data
+
To properly perform the mapping, make sure you have the following files downloaded and configured:
+
+
Lanelet2 format OSM data (*.osm file)
+
+
3D model map of the area
+
+
How to obtain a map
+
You can obtain the 3D model of the area by using a Environmentprefab prepared for AWSIM or by creating your own.
+You can learn how to create you own Environmentprefab in this tutorial.
+
+
+
+
Configured in-simulation vehicle object with sensors attached (only the LiDAR is necessary)
+
+
+
Vehicle model
+
For the sake of creating a PCD the vehicle model doesn't have to be accurate.
+It will be just a carrier for LiDAR.
+The model can even be a simple box as shown earlier in this tutorial.
+Make sure it is not visible to the LiDAR, so it does not break the sensor readings.
+
+
+
+
Import OSM
+
+
+
Drag and drop an OSM file into Unity project.
+
+
+
+
OSM file will be imported as OsmDataContainer.
+
+
+
Setup an Environment
+
For mapping an Environment prefab is needed.
+The easiest way is to create a new Scene and import the Environmentprefab into it.
+Details on how to do this can be found on this tutorial page.
+
Setup a Vehicle
+
Create a VehicleGameObject in the Hierarchy view.
+
+
Add visual elements (optional)
+
Add vehicle model by adding a GeometryObject as a child of Vehicle and adding all visual elements as children.
+
+
+
Visual elements
+
You can learn how to add visual elements and required components like Mesh Filter or Mesh Renderer in this tutorial.
+
+
Add a Camera (optional)
+
Add a Camera component for enhanced visuals by adding a Main CameraObject as a child of Vehicle Object and attaching a Camera Component to it.
+
+
+
Add a Main CameraObject.
+
+
+
+
Add a Camera Component by clicking 'Add Component' button, searching for it and selecting it.
+
+
+
+
Change the Transform for an even better visual experience.
+
+
Camera preview
+
Observe how the Camera preview changes when adjusting the transformation.
+
+
+
+
+
Setup Vehicle Sensors (RGL)
+
This part of the tutorial shows how to add a LiDAR sensor using RGL.
+
+
RGL Scene Manager
+
Please make sure that RGLSceneManager is added to the scene.
+For more details and instruction how to do it please visit this tutorial page.
+
+
+
+
Create an empty SensorsGameObject as a child of the VehicleObject.
+
+
+
+
Create a LidarGameObject as a child of the SensorsObject.
+
+
+
+
Attach Lidar Sensor (script) to previously created LidarObject by clicking on the 'Add Component' button, searching for the script and selecting it.
+
+
Point Cloud Visualization
+
Please note that Point Cloud Visualization (script) will be added automatically with the Lidar Sensor (script).
+
+
+
+
+
+
Configure LiDAR pattern, e.g. by selecting one of the available presets.
+
+
Example Lidar Sensor configuration
+
+
+
+
+
Attach RGL Mapping Adapter (script) to previously created LidarObject by clicking on the 'Add Component' button, searching for the script and selecting it.
+
+
+
+
+
Configure RGL Mapping Adapter - e.g. set Leaf Size for filtering.
+
+
Example RGL Mapping Adapter configuration
+
+
+
+
+
Effect of Leaf Size to Point Cloud Data (PCD) generation
+
A small Leaf Size could result in a noisy PCD, while a large Leaf Size could result in excessive filtering such that objects like buildings are not recorded in the PCD.
+
In the following examples, it can be observed that when a Leaf Size is 1.0, point clouds exist on roads in which they shouldn't appear.
+When a Leaf Size is 100.0, buildings are filtered out and results in an empty PCD.
+A Leaf Size of 10.0 results in a reasonable PCD in the given example.
+
+
+
+
Leaf Size = 1.0
+
Leaf Size = 10.0
+
Leaf Size = 100.0
+
+
+
+
+
+
+
+
+
+
+
Setup PointCloudMapper
+
+
+
Create a PointCloudMapperGameObject in the Hierarchy view.
+
+
+
+
Attach Point Cloud Mapper script to previously created Point Cloud MapperObject by clicking on the 'Add Component' button, searching for the script and selecting it.
Target Vehicle - The vehicle you want to use for point cloud capturing that you created earlier
+
+
+
Example Point Cloud Mapper configuration
+
+
+
+
+
Effect of Capture Location Interval to PCD generation
+
If the Capture Location Interval is too small, it could result in a sparse PCD where some region of the map is captured well but the other regions aren't captured at all.
+
In the below example, Leaf Size of 0.2 was used. Please note that using a different combination of leaf size and Capture Location Interval may result in a different PCD.
+
+
+
+
Capture Location Interval = 6
+
Capture Location Interval = 20
+
Capture Location Interval = 100
+
+
+
+
+
+
+
+
+
+
+
Capture and Generate PCD
+
If you play simulation with a scene prepared with the steps above, PointCloudMapper will automatically start mapping.
+The vehicle will warp along centerlines by intervals of CaptureLocationInterval and capture point cloud data.
+PCD file will be written when you stop your scene or all locations in the route are captured.
+
If the Vehicle stops moving for longer and you see the following message in the bottom left corner - you can safely stop the scene.
+
+
The Point cloud *.pcd file is saved to the location you specified in the Point Cloud Mapper.
+
Convert the PCD
+
+
Install required tools
+
The tools required for PCD conversion can be installed on Ubuntu with the following command
+
sudoaptinstallpcl-tools
+
+
+
The generated PCD file is typically too large.
+Therefore you need to down-sample it.
+
+
+
Change directory to the one you specified earlier.
+
cd <PATH_TO_PCD_FILE>
+
+
+
+
Down-sample the PCD output.pcd generated in simulation.
PointCloudMapping.unity is a sample scene for PointCloudMapper showcase. It requires setup of OSM data and 3D model map of the area according to the steps above.
+
+
Sample Mapping Scene
+
In this example you can see a correctly configured Point Cloud Mapping Scene.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/CreatePCD/lidar_sensor_configuration.png b/Components/Environment/CreatePCD/lidar_sensor_configuration.png
new file mode 100644
index 0000000000..19cd639318
Binary files /dev/null and b/Components/Environment/CreatePCD/lidar_sensor_configuration.png differ
diff --git a/Components/Environment/CreatePCD/lidar_sensor_search.png b/Components/Environment/CreatePCD/lidar_sensor_search.png
new file mode 100644
index 0000000000..22b63dd32c
Binary files /dev/null and b/Components/Environment/CreatePCD/lidar_sensor_search.png differ
diff --git a/Components/Environment/CreatePCD/move_osm.gif b/Components/Environment/CreatePCD/move_osm.gif
new file mode 100644
index 0000000000..7b3ae7b9a2
Binary files /dev/null and b/Components/Environment/CreatePCD/move_osm.gif differ
diff --git a/Components/Environment/CreatePCD/move_osm2.gif b/Components/Environment/CreatePCD/move_osm2.gif
new file mode 100644
index 0000000000..a358fa83cc
Binary files /dev/null and b/Components/Environment/CreatePCD/move_osm2.gif differ
diff --git a/Components/Environment/CreatePCD/pcd_save_success.png b/Components/Environment/CreatePCD/pcd_save_success.png
new file mode 100644
index 0000000000..715a9e2214
Binary files /dev/null and b/Components/Environment/CreatePCD/pcd_save_success.png differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapper_add_object2.gif b/Components/Environment/CreatePCD/point_cloud_mapper_add_object2.gif
new file mode 100644
index 0000000000..d4e3d0f084
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapper_add_object2.gif differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapper_add_script.gif b/Components/Environment/CreatePCD/point_cloud_mapper_add_script.gif
new file mode 100644
index 0000000000..0d5b696b68
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapper_add_script.gif differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapper_configuration2.png b/Components/Environment/CreatePCD/point_cloud_mapper_configuration2.png
new file mode 100644
index 0000000000..93f6b6d6b5
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapper_configuration2.png differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapper_search.png b/Components/Environment/CreatePCD/point_cloud_mapper_search.png
new file mode 100644
index 0000000000..c46919c65b
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapper_search.png differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar.gif b/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar.gif
new file mode 100644
index 0000000000..4ea21ad1ed
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar.gif differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar_adapter_script.gif b/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar_adapter_script.gif
new file mode 100644
index 0000000000..a76b625e8a
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar_adapter_script.gif differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar_sensor_script.gif b/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar_sensor_script.gif
new file mode 100644
index 0000000000..fdd76dd9e1
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapping_add_lidar_sensor_script.gif differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapping_add_sensors.gif b/Components/Environment/CreatePCD/point_cloud_mapping_add_sensors.gif
new file mode 100644
index 0000000000..111da39a8a
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapping_add_sensors.gif differ
diff --git a/Components/Environment/CreatePCD/point_cloud_mapping_scene.mp4 b/Components/Environment/CreatePCD/point_cloud_mapping_scene.mp4
new file mode 100644
index 0000000000..8c8e8a3036
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_mapping_scene.mp4 differ
diff --git a/Components/Environment/CreatePCD/point_cloud_matter_add_container.gif b/Components/Environment/CreatePCD/point_cloud_matter_add_container.gif
new file mode 100644
index 0000000000..7f2c1b3b6a
Binary files /dev/null and b/Components/Environment/CreatePCD/point_cloud_matter_add_container.gif differ
diff --git a/Components/Environment/CreatePCD/rgl_mapping_adapter_configuration.png b/Components/Environment/CreatePCD/rgl_mapping_adapter_configuration.png
new file mode 100644
index 0000000000..1b605dba21
Binary files /dev/null and b/Components/Environment/CreatePCD/rgl_mapping_adapter_configuration.png differ
diff --git a/Components/Environment/CreatePCD/rgl_mapping_adapter_search.png b/Components/Environment/CreatePCD/rgl_mapping_adapter_search.png
new file mode 100644
index 0000000000..dad4d9bfeb
Binary files /dev/null and b/Components/Environment/CreatePCD/rgl_mapping_adapter_search.png differ
diff --git a/Components/Environment/CreatePCD/vehicle_camera_add_component.gif b/Components/Environment/CreatePCD/vehicle_camera_add_component.gif
new file mode 100644
index 0000000000..df589ad7e0
Binary files /dev/null and b/Components/Environment/CreatePCD/vehicle_camera_add_component.gif differ
diff --git a/Components/Environment/CreatePCD/vehicle_camera_add_object.gif b/Components/Environment/CreatePCD/vehicle_camera_add_object.gif
new file mode 100644
index 0000000000..4980816f88
Binary files /dev/null and b/Components/Environment/CreatePCD/vehicle_camera_add_object.gif differ
diff --git a/Components/Environment/CreatePCD/vehicle_camera_transform.gif b/Components/Environment/CreatePCD/vehicle_camera_transform.gif
new file mode 100644
index 0000000000..8697f174d1
Binary files /dev/null and b/Components/Environment/CreatePCD/vehicle_camera_transform.gif differ
diff --git a/Components/Environment/CreatePCD/vehicle_geometry_add_object.gif b/Components/Environment/CreatePCD/vehicle_geometry_add_object.gif
new file mode 100644
index 0000000000..731c9f5186
Binary files /dev/null and b/Components/Environment/CreatePCD/vehicle_geometry_add_object.gif differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/image_0.png b/Components/Environment/LaneletBoundsVisualizer/image_0.png
new file mode 100644
index 0000000000..1db9ab6ed8
Binary files /dev/null and b/Components/Environment/LaneletBoundsVisualizer/image_0.png differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/image_1.png b/Components/Environment/LaneletBoundsVisualizer/image_1.png
new file mode 100644
index 0000000000..3c1715e526
Binary files /dev/null and b/Components/Environment/LaneletBoundsVisualizer/image_1.png differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/image_2.png b/Components/Environment/LaneletBoundsVisualizer/image_2.png
new file mode 100644
index 0000000000..77f02c3a44
Binary files /dev/null and b/Components/Environment/LaneletBoundsVisualizer/image_2.png differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/image_3.png b/Components/Environment/LaneletBoundsVisualizer/image_3.png
new file mode 100644
index 0000000000..2cd0bc95aa
Binary files /dev/null and b/Components/Environment/LaneletBoundsVisualizer/image_3.png differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/image_4.png b/Components/Environment/LaneletBoundsVisualizer/image_4.png
new file mode 100644
index 0000000000..8ac246abb4
Binary files /dev/null and b/Components/Environment/LaneletBoundsVisualizer/image_4.png differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/image_5.png b/Components/Environment/LaneletBoundsVisualizer/image_5.png
new file mode 100644
index 0000000000..765478103b
Binary files /dev/null and b/Components/Environment/LaneletBoundsVisualizer/image_5.png differ
diff --git a/Components/Environment/LaneletBoundsVisualizer/index.html b/Components/Environment/LaneletBoundsVisualizer/index.html
new file mode 100644
index 0000000000..152a5721b9
--- /dev/null
+++ b/Components/Environment/LaneletBoundsVisualizer/index.html
@@ -0,0 +1,1887 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LaneletBoundsVisualizer - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lanelet Bounds Visualizer is an Unity Editor extension allowing the user to load the left and right bounds of Lanelet to the Unity scene.
+
Usage
+
The lanelet bounds load process can be performed by opening AWSIM -> Visualize -> Load Lanelet Bounds at the top toolbar of Unity Editor.
+
+
A window shown below will pop up. Select your Osm Data Container to specify which OSM data to load the Lanelet from.
+
+
The user can select whether to load the raw Lanelet or to adjust the resolution of the Lanelet by specifying the waypoint settings.
+
To load the raw Lanelet, simply click the Load Raw Lanelet button.
+
If the user wishes to change the resolution of the Lanelet, adjust the parameters of the Waypoint Settings as described below, and click the Load with Waypoint Settings button.
+
+
Resolution : resolution of resampling. Lower values provide better accuracy at the cost of processing time.
+
Min Delta Length : minimum length(m) between adjacent points.
+
Min Delta Angle : minimum angle(deg) between adjacent edges. Lowering this value produces a smoother curve.
+
+
Once the Lanelet is successfully loaded, Lanelet bounds will be generated as a new GameObject named LaneletBounds.
+
To visualize the LaneletBounds, make sure Gizmos is turned on and select the LaneletBounds GameObject.
+
+
Important Notes
+
Generally speaking, visualizing Lanelet Bounds will result in a very laggy simulation. Therefore, it is recommended to hide the LaneletBounds GameObject when not used. The lag of the simulation becomes worse as you set the resolution of the Lanelet Bounds higher, so it is also recommended to set the resolution within a reasonable range.
+
It is also important to note that no matter how high you set the resolution to be, it will not be any better than the original Lanelet (i.e. the raw data). Rather, the computational load will increase and the simulation will become more laggy. If the user wishes to get the highest quality of Lanelet Bounds, it is recommended to use the Load Raw Lanelet button.
+
In short, Waypoint Setting parameters should be thought of as parameters to decrease the resolution from the original Lanelet to decrease the computational load and thus, reducing the lag of the simulation.
+
+
+
+
Higher Resolution
+
Raw Lanelet
+
Lower Resolution
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Environment/SmokeSimulator/image_0.png b/Components/Environment/SmokeSimulator/image_0.png
new file mode 100644
index 0000000000..6500dd9bba
Binary files /dev/null and b/Components/Environment/SmokeSimulator/image_0.png differ
diff --git a/Components/Environment/SmokeSimulator/image_1.png b/Components/Environment/SmokeSimulator/image_1.png
new file mode 100644
index 0000000000..0ad5c67f85
Binary files /dev/null and b/Components/Environment/SmokeSimulator/image_1.png differ
diff --git a/Components/Environment/SmokeSimulator/image_2.png b/Components/Environment/SmokeSimulator/image_2.png
new file mode 100644
index 0000000000..d7a6a62257
Binary files /dev/null and b/Components/Environment/SmokeSimulator/image_2.png differ
diff --git a/Components/Environment/SmokeSimulator/image_3.png b/Components/Environment/SmokeSimulator/image_3.png
new file mode 100644
index 0000000000..1102ada04e
Binary files /dev/null and b/Components/Environment/SmokeSimulator/image_3.png differ
diff --git a/Components/Environment/SmokeSimulator/image_4.png b/Components/Environment/SmokeSimulator/image_4.png
new file mode 100644
index 0000000000..5061e45466
Binary files /dev/null and b/Components/Environment/SmokeSimulator/image_4.png differ
diff --git a/Components/Environment/SmokeSimulator/index.html b/Components/Environment/SmokeSimulator/index.html
new file mode 100644
index 0000000000..017aed6b06
--- /dev/null
+++ b/Components/Environment/SmokeSimulator/index.html
@@ -0,0 +1,1930 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SmokeSimulator - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Simulating smoke in AWSIM may be useful when one wants to simulate exhaust gases from vehicles, smoke from emergency flare, etc.
+
In Unity, it is common to use Particle System to simulate smokes.
+However, smoke simulated by Particle System cannot be sensed by RGL in AWSIM although in reality, smokes are detected by LiDAR.
+
Smoke Simulator was developed to simulate smokes that can be detected by RGL in Unity.
+Smoke Simulator works by instantiating many small cubic GameObjects called Smoke Particles and allows each particle to be detected by RGL.
+
This document describes how to use the Smoke Simulator.
+
Setting Smoke Simulator
+
1.Create an empty GameObject
+
2.Attach SmokeGenerator.cs to the previously created GameObject.
+
+
3.Adjust the parameters of the SmokeGenerator as described below:
+
+
Max Particle: Specifies the maximum number of particles created by the Smoke Generator
+
Particle Range Radius: Specifies the radius of a circle, centered at the GameObject, which defines the region in which Smoke Particles are generated in
+
Particle Size: Specifies the edge of a Smoke Particle
+
Average Lifetime: Specifies the average lifetime of a Smoke Particle
+
+
Variation Lifetime: Specifies the variation of lifetime of Smoke Particles.
+
The lifetime of a Smoke Particle is calculated as follows:
V2I is a component that simulates V2I communication protocol which allows to exchange data between vehicles and road infrastructure. In the current version of AWSIM, the V2I component publishes information about traffic lights.
+
How to add V2I to the environment
+
Assign Lanelet2 WayID and RelationID to TrafficLight object
If you want to use custom message in AWSIM, you need to generate the appropriate files, to do this you have to build ROS2ForUnity yourself - please follow the steps below. Remember to start with prerequisities though.
+
+
ROS2ForUnity role
+
For a better understanding of the role of ROS2ForUnity and the messages used, we encourage you to read this section.
+
+
+
custom_msgs
+
In order to simplify this tutorial, the name of the package containing the custom message is assumed to be custom_msgs - remember to replace it with the name of your package.
+
+
Prerequisites
+
ROS2ForUnity depends on a ros2cs - a C# .NET library for ROS2.
+This library is already included so you don't need to install it, but there are a few prerequisites that must be resolved first.
+
Please select your system and resolve all prerequisites:
cd C:\ros2-for-unity
+C:\ros2_humble\local_setup.ps1
+.\pull_repositories.ps1
+
+
+
+
+
+
+
2. Setup custom_msgs package
+
The method to add a custom package to build depends on where it is located. The package can be on your local machine or just be hosted on a git repository.
+Please, choose the appropriate option and follow the instructions.
+
+
+
2.1. Package contained on local machine
+
+
+
Copy the custom_msgs package with custom message to the folder to src/ros2cs/custom_messages directory
Below is an example of a file configured to pull 2 packages (custom_msgs,autoware_auto_msgs) of messages hosted on a git repository.
+
# NOTE: Use this file if you want to build with custom messages that reside in a separate remote repo.
+# NOTE: use the following format
+
+repositories:
+ src/ros2cs/custom_messages/custom_msgs:
+ type: git
+ url: https://github.com/tier4/custom_msgs.git
+ version: main
+ src/ros2cs/custom_messages/autoware_auto_msgs:
+ type: git
+ url: https://github.com/tier4/autoware_auto_msgs.git
+ version: tier4/main
+
+
+
+
+
Now pull the repositories again (also the custom_msgs package repository)
+
+
+
+
cd~/ros2-for-unity
+./pull_repositories.sh
+
+
+
+
cd C:\ros2-for-unity
+.\pull_repositories.ps1
+
+
+
+
+
+
+
3. Build ROS 2 For Unity
+
Build ROS2ForUnity with custom message packages using the following commands:
+
+
+
+
cd ~/ros2-for-unity
+./build.sh --standalone
+
+
+
+
cd C:\ros2-for-unity
+.\build.ps1 -standalone
+
+
+
+
+
4. Install custom_msgs to AWSIM
+
New ROS2ForUnity build, which you just made in step 3, contains multiple libraries that already exist in the AWSIM.
+To install custom_msgs and not copy all other unnecessary files, you should get the custom_msgs related libraries only.
+
You can find them in following directories and simply copy to the analogous directories in AWSIM/Assets/Ros2ForUnity folder, or use the script described here.
+
+
+
+
+
ros2-for-unity/install/asset/Ros2ForUnity/Plugins which names matches custom_msgs_*
+
ros2-for-unity/install/asset/Ros2ForUnity/Plugins/Linux/x86_64/ which names matches libcustom_msgs_*
+
+
+
+
+
ros2-for-unity/install/asset/Ros2ForUnity/Plugins which names matches custom_msgs_*
+
ros2-for-unity/install/asset/Ros2ForUnity/Plugins/Windows/x86_64/ which names matches custom_msgs_*
+
+
+
+
+
Automation of copying message files
+
+
+
+
To automate the process, you can use a script that copies all files related to your custom_msgs package.
+
+
Create a file named copy_custom_msgs.sh in directory ~/ros2-for-unity/ and paste the following content into it.
+
Make sure that the package files custom_msgs have been properly copied to the AWSIM/Assets/Ros2ForUnity.
+Then try to create a message object as described in this section and check in the console of Unity Editor if it compiles without errors.
Ros2ForUnity (R2FU) module is a communication solution that effectively connects Unity and the ROS2 ecosystem, maintaining a strong integration.
+Unlike other solutions, it doesn't rely on bridging communication but rather utilizes the ROS2 middleware stack (specifically the rcl layer and below), enabling the inclusion of ROS2 nodes within Unity simulations.
+
R2FU is used in AWSIM for many reasons.
+First of all, because it offers high-performance integration between Unity and ROS2, with improved throughput and lower latencies compared to bridging solutions.
+It provides real ROS2 functionality for simulation entities in Unity, supports standard and custom messages, and includes convenient abstractions and tools, all wrapped as a Unity asset.
+For a detailed description, please see README.
+
Prerequisites
+
This asset can be prepared in two flavours:
+
+
standalone mode - where no ROS2 installation is required on target machine, e.g., your Unity simulation server.
+All required dependencies are installed and can be used e.g. as a complete set of Unity plugins.
+
overlay mode - where the ROS2 installation is required on target machine.
+Only asset libraries and generated messages are installed therefore ROS2 instance must be sourced.
+
+
By default, asset R2FU in AWSIM is prepared in standalone mode.
+Thanks to this, ROS2 instance doesn't need to be sourced - all you have to do is run the Unity editor.
+
+
Can't see topics
+
There are no errors but I can't see topics published by R2FU
Sometimes ROS2 daemon brakes up when changing network interfaces or ROS2 version.
+
+
+
Try to stop it forcefully (pkill -9 ros2_daemon) and restart (ros2 daemon start).
+
Concept
+
Describing the concept of using R2FU in AWSIM, we distinguish:
+
+
ROS2Node - it is the equivalent of a node in ROS2, it has its own name, it can have any number of subscribers, publishers, service servers and service clients.
+In the current AWSIM implementation, there is only one main node.
+
ROS2Clock - it is responsible for generating the simulation time using the selected source.
+
SimulatorROS2Node - it is a class that is directly responsible for AWSIM<->ROS2 communication, and contains one instance each of ROS2Node and ROS2Clock, so it creates the main AWSIM node in ROS2 and simulates the time from the selected source (currently UnityTimeSource is used).
+It is initialized at the moment of running the scene in Unity - thanks to the RuntimeInitializeOnLoadMethod mark.
+
Publisher - it is the equivalent of the publisher in ROS2, it uses a single topic on which it can publish a selected type of message, and it has a selected QoS profile.
+Each publisher in AWSIM is created in ROS2Node object of class SimulatorROS2Node.
+
Subscriber - it is the equivalent of the subscriber in ROS2, it uses a single topic from which it subscribes to the selected type of message, and it has a selected QoS profile.
+Each subscriber in AWSIM is created in ROS2Node object of class SimulatorROS2Node.
+
+
+
+
+
The SimulatorROS2Node implementation, thanks to the use of R2FU, allows you to add communication via ROS2 to any Unity component.
+For example, we can receive control commands from any other ROS2 node and publish the current state of Ego, such as its position in the environment.
+
+
Simulation time
+
If you want to use system time (ROS2 time) instead of Unity time, use ROS2TimeSource instead of UnityTimeSource in the SimulatorROS2Node class.
+
+
Package structure
+
Ros2ForUnity asset contains:
+
+
Plugins - dynamically loaded libraries for Windows and Linux (*.dll and *.so files).
+In addition to the necessary libraries, here are the libraries created as a result of generation the types of ROS2 messages that are used in communication.
+
Scripts - scripts for using R2FU in Unity - details below.
+
Extension Scripts - scripts for using R2FU in AWSIM, provide abstractions of a single main Node and simplify the interface - details below.
+These scripts are not in the library itself, but directly in the directory Assets/AWSIM/Scripts/ROS/**.
+
+
Scripts
+
+
ROS2UnityCore - the principal class for handling ROS2 nodes and executables.
+Spins and executes actions (e.g. clock, sensor publish triggers) in a dedicated thread.
+
ROS2UnityComponent - ROS2UnityCore adapted to work as a Unity component.
+
ROS2Node - a class representing a ROS2 node, it should be constructed through ROS2UnityComponent class, which also handles spinning.
+
ROS2ForUnity - an internal class responsible for handling checking, proper initialization and shutdown of ROS2 communication,
+
ROS2ListenerExample - an example class provided for testing of basic ROS2->Unity communication.
+
ROS2TalkerExample - an example class provided for testing of basic Unity->ROS2 communication.
+
ROS2PerformanceTest - an example class provided for performance testing of ROS2<->Unity communication.
+
Sensor - an abstract base class for ROS2-enabled sensor.
+
Transformations - a set of transformation functions between coordinate systems of Unity and ROS2.
+
PostInstall - an internal class responsible for installing R2FU metadata files.
+
Time scripts - a set of classes that provide the ability to use different time sources:
+
ROS2Clock - ROS2 clock class that for interfacing between a time source (Unity or ROS2 system time) and ROS2 messages.
+
ROS2TimeSource - acquires ROS2 time (system time by default).
+
UnityTimeSource - acquires Unity time.
+
DotnetTimeSource - acquires UnityDateTime based clock that has resolution increased using Stopwatch.
+
ITimeSource - interface for general time extraction from any source.
+
TimeUtils - utils for time conversion.
+
+
+
+
Extension Scripts
+
Additionally, in order to adapt AWSIM to the use of R2FU, the following scripts are used:
+
+
SimulatorROS2Node - it is a class that is directly responsible for AWSIM<->ROS2 communication.
+
+
ClockPublisher - allows the publication of the simulation time from the clock running in the SimulatorROS2Node.
+It must be added as a component to the scene in order to publish the current time when the scene is run.
+
+
+
+
QoSSettings - it is the equivalent of ROS2QoS, which allows to specify the QoS for subscribers and publishers in AWSIM.
+It uses the QualityOfServiceProfile implementation from the Ros2cs library.
+
+
ROS2Utility - it is a class with utils that allow, for example, to convert positions in the ROS2 coordinate system to the AWSIM coordinate system.
+
DiagnosticsManager - prints diagnostics for desired elements described in *.yaml config file.
+
+
Default message types
+
The basic ROS2 msgs types that are supported in AWSIM by default include:
In order for the message package to be used in Unity, its *.dll and *.so libraries must be generated using R2FU.
+
+
Custom message
+
If you want to generate a custom message to allow it to be used in AWSIM please read this tutorial.
+
+
Use of generated messages in Unity
+
Each message type is composed of other types - which can also be a complex type.
+All of them are based on built-in C# types.
+The most common built-in types in messages are bool, int, double and string.
+These types have their communication equivalents using ROS2.
+
A good example of a complex type that is added to other complex types in order to specify a reference - in the form of a timestamp and a frame - is std_msgs/Header.
+This message has the following form:
It is not required to define the value of each field.
+As you can see, it creates an object, filling only frame_id field - and left the field of complex builtin_interfaces/msg/Time type initialized by default.
+Time is an important element of any message, how to fill it is written here.
+
Accessing and filling in message fields
+
As you might have noticed in the previous example, a ROS2 message in Unity is just a structure containing the same fields - keep the same names and types.
+Access to its fields for reading and filling is the same as for any C# structure.
+
varheader2=newstd_msgs.msg.Header();
+header2.Frame_id="map";
+header2.Stamp.sec="1234567";
+Debug.Log($"StampSec: {header2.Stamp.sec} and Frame: {header2.Frame_id}");
+
+
+
Field names
+
There is one always-present difference in field names.
+The first letter of each message field in Unity is alwaysuppercase - even if the base ROS2 message from which it is generated is lowercase.
+
+
Filling a time
+
In order to complete the time field of the Header message, we recommend the following methods in AWSIM:
+
+
+
When the message has no Header but only the Time type:
These methods allow to fill the Time field in the message object with the simulation time - from ROS2Clock
+
Create a message with array
+
Some message types contain an array of some type.
+An example of such a message is nav_msgs/Path, which has a PoseStamped array.
+In order to fill such an array, you must first create a List<T>, fill it and then convert it to a raw array.
In order to publish messages, a publisher object must be created.
+The static method CreatePublisher of the SimulatorROS2Node makes it easy.
+You must specify the type of message, the topic on which it will be published and the QoS profile.
+Below is an example of autoware_auto_vehicle_msgs.msg.VelocityReport type message publication with a frequency of 30Hz on /vehicle/status/velocity_status topic, the QoS profile is (Reliability=Reliable, Durability=Volatile, History=Keep last, Depth=1):
+
usingUnityEngine;
+usingROS2;
+
+namespaceAWSIM
+{
+publicclassVehicleReportRos2Publisher:MonoBehaviour
+{
+floattimer=0;
+intpublishHz=30;
+QoSSettingsqosSettings=newQoSSettings()
+{
+ReliabilityPolicy=ReliabilityPolicy.QOS_POLICY_RELIABILITY_RELIABLE,
+DurabilityPolicy=DurabilityPolicy.QOS_POLICY_DURABILITY_VOLATILE,
+HistoryPolicy=HistoryPolicy.QOS_POLICY_HISTORY_KEEP_LAST,
+Depth=1,
+};
+stringvelocityReportTopic="/vehicle/status/velocity_status";
+autoware_auto_vehicle_msgs.msg.VelocityReportvelocityReportMsg;
+IPublisher<autoware_auto_vehicle_msgs.msg.VelocityReport>velocityReportPublisher;
+
+voidStart()
+{
+// Create a message object and fill in the constant fields
+velocityReportMsg=newautoware_auto_vehicle_msgs.msg.VelocityReport()
+{
+Header=newstd_msgs.msg.Header()
+{
+Frame_id="map",
+}
+};
+
+// Create publisher with specific topic and QoS profile
+velocityReportPublisher=SimulatorROS2Node.CreatePublisher<autoware_auto_vehicle_msgs.msg.VelocityReport>(velocityReportTopic,qosSettings.GetQoSProfile());
+}
+
+boolNeedToPublish()
+{
+timer+=Time.deltaTime;
+varinterval=1.0f/publishHz;
+interval-=0.00001f;
+if(timer<interval)
+returnfalse;
+timer=0;
+returntrue;
+}
+
+voidFixedUpdate()
+{
+// Provide publications with a given frequency
+if(NeedToPublish())
+{
+// Fill in non-constant fields
+velocityReportMsg.Longitudinal_velocity=1.00f;
+velocityReportMsg.Lateral_velocity=0.00f;
+velocityReportMsg.Heading_rate=0.00f;
+
+// Update Stamp
+varvelocityReportMsgHeader=velocityReportMsgasMessageWithHeader;
+SimulatorROS2Node.UpdateROSTimestamp(refvelocityReportMsgHeader);
+
+// Publish
+velocityReportPublisher.Publish(velocityReportMsg);
+}
+}
+}
+}
+
+
Subscribe to the topic
+
In order to subscribe messages, a subscriber object must be created.
+The static method CreateSubscription of the SimulatorROS2Node makes it easy.
+You must specify the type of message, the topic from which it will be subscribed and the QoS profile.
+In addition, the callback must be defined, which will be called when the message is received - in particular, it can be defined as a lambda expression.
+Below is an example of std_msgs.msg.Bool type message subscription on /vehicle/is_vehicle_stopped topic, the QoS profile is “system default”:
+
The following is a summary of the ROS2 topics that the AWSIM node subscribes to and publishes on.
+
+
Ros2ForUnity
+
AWSIM works with ROS2 thanks to the use of Ros2ForUnity - read the details here.
+If you want to generate a custom message to allow it to be used in AWSIM please read this tutorial.
CameraSensor is a component that simulates an RGB camera.
+Autonomous vehicles can be equipped with many cameras used for various purposes.
+In the current version of AWSIM, the camera is used primarily to provide the image to the traffic light recognition module in Autoware.
The mentioned single CameraSensor has its own frame traffic_light_left_camera/camera_link in which its data is published.
+The sensor prefab is added to this frame.
+The traffic_light_left_camera/camera_link link is added to the base_link object located in the URDF.
+
+
A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.
+
CameraSensorHolder (script)
+
+
CameraSensorHolder (script) allows the sequential rendering of multiple camera sensors.
+To utilize it, each CameraSensor object should be attached as a child object of the CameraSensorHolder.
+
+
Elements configurable from the editor level
+
+
Camere Sensors - a collection of camera sensors used for rendering
+
Publish Hz - the frequency at which camera rendering, image processing and callbacks are executed
+
Render In Queue - camera sensors rendering sequence type: in queue (one after another) or all at the same frame
+
+
CameraSensor Components
+
+
For the CameraSensor to work properly, the GameObject to which the scripts are added must also have:
+
+
Camera component - the basic component that ensures the functionality of the camera as a device in Unity that capture and display the world to the player.
In case of problems with the recognition of traffic lights in Autoware, it may help to increase the image resolution and focal length of the camera in AWSIM.
+
+
+
Camera settings
+
If you would like to adjust the image captured by the camera, we encourage you to read this manual.
+
+
The CameraSensor functionality is split into two scripts:
+
+
Camera Sensor (script) - acquires the image from the Unitycamera, transforms it and saves to the BGR8 format, this format along with the camera parameters is its script output - script also calls the callback for it.
+
Camera Ros2 Publisher (script) - provides the ability to publish CameraSensor output as Image and CameraInfo messages type published on a specific ROS2 topics.
+
+
Scripts can be found under the following path:
+
Assets/AWSIM/Scripts/Sensors/CameraSensor/*
+
+
In the same location there are also *.compute files containing used ComputeShaders.
+
CameraSensor (script)
+
+
Camera Sensor (script) is a core camera sensor component.
+It is responsible for applying OpenCV distortion and encoding to BGR8 format.
+The distortion model is assumed to be Plumb Bob.
+The script renders the image from the camera to Texture2D and transforms it using the distortion parameters.
+This image is displayed in the GUI and further processed to obtain the list of bytes in BGR8 format on the script output.
+
The script uses two ComputeShaders, they are located in the same location as the scripts:
+
+
CameraDistortion - to correct the image using the camera distortion parameters,
+
+
RosImageShader - to encode two pixels color (bgr8 - 3 bytes) into one (uint32 - 4 bytes) in order to produce ROS ImageBGR8 buffer.
+
+
+
+
+
+
+
API
+
type
+
feature
+
+
+
+
+
DoRender
+
void
+
Renders the Unity camera, applies OpenCV distortion to rendered image and update output data.
+
+
+
+
Elements configurable from the editor level
+
+
Output Hz - frequency of output calculation and callback (default: 10Hz)
+
Image On GUI:
+
Show - if camera image should be show on GUI (default: true)
+
Scale - scale of reducing the image from the camera, 1 - will give an image of real size, 2 - twice smaller, etc. (default: 4)
+
X Axis - position of the upper left corner of the displayed image in the X axis, 0is the left edge (default: 0)
+
Y Axis - position of the upper left corner of the displayed image in the Y axis, 0 is the upper edge (default: 0)
+
+
+
Camera parameters
+
Width - image width (default: 1920)
+
Height - image height (default: 1080)
+
K1, K2, P1, P2, K3 - camera distortion coefficients for Plum Bob model (default: 0, 0, 0, 0, 0)
+
+
+
Camera Object - reference to the basic Camera component (default: None)
+
Distortion Shader - reference to ComputeShader asset about Distortion Shader functionality (default: None)
+
Ros Image Shader - reference to ComputeShader asset about Ros Image Shader functionality
+(default: None)
+
+
Output Data
+
The sensor computation output format is presented below:
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
ImageDataBuffer
+
byte[ ]
+
Buffer with image data.
+
+
+
CameraParameters
+
CameraParameters
+
Set of the camera parameters.
+
+
+
+
CameraRos2Publisher (script)
+
+
Converts the data output from CameraSensor to ROS2Image
+and CameraInfo type messages and publishes them.
+The conversion and publication is performed using the Publish(CameraSensor.OutputData outputData) method,
+which is the callback triggered by Camera Sensor (script) for the current output.
+
Due to the fact that the entire image is always published, the ROI field of the message is always filled with zeros.
+The script also ensures that binning is assumed to be zero and the rectification matrix is the identity matrix.
+
+
Warning
+
The script uses the camera parameters set in the CameraSensor script - remember to configure them depending on the camera you are using.
+
+
Elements configurable from the editor level
+
+
Image Topic - the ROS2 topic on which the Image message is published (default: "/sensing/camera/traffic_light/image_raw")
+
Camera Info Topic - the ROS2 topic on which the CameraInfo message is published (default: "/sensing/camera/traffic_light/camera_info")
+
Frame id - frame in which data is published, used in Header (default: "traffic_light_left_camera/camera_link")
+
Qos Settings - Quality of service profile used in the publication (default: Best effort, Volatile, Keep last, 1)
GnssSensor is a component which simulates the position of vehicle computed by the Global Navigation Satellite System based on the transformation of the GameObject to which this component is attached.
+The GnssSensor outputs the position in the MGRS coordinate system.
+
Prefab
+
Prefab can be found under the following path:
+
Assets/AWSIM/Prefabs/Sensors/GnssSensor.prefab
+
+
Link
+
GnssSensor has its own frame gnss_link in which its data is published.
+The sensor prefab is added to this frame.
+The gnss_link frame is added to the sensor_kit_base_link in the base_link object located in the URDF.
+
+
A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.
+
Components
+
+
The GnssSensor functionality is split into two components:
+
+
Gnss Sensor (script) - it calculates the position as its output and calls the callback for it.
+
Gnss Ros2 Publisher (script) - provides the ability to publish GnssSensor output as PoseStamped and PoseWithCovarianceStamped published on a specific ROS2 topics.
+
+
Scripts can be found under the following path:
+
Assets/AWSIM/Prefabs/Sensors/Gnss/*
+
+
Gnss Sensor (script)
+
+
This is the main script in which all calculations are performed:
+
+
the position of the Object in Unity is read,
+
this position is transformed to the ROS2 coordinate system (MGRS offset is added here),
+
the result of the transformation is saved as the output of the component,
+
for the current output a callback is called (which can be assigned externally).
+
+
Elements configurable from the editor level
+
+
Output Hz - frequency of output calculation and callback (default: 100Hz)
+
+
Output Data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
Position
+
Vector3
+
Position in the MGRS coordinate system.
+
+
+
+
Gnss Ros2 Publisher (script)
+
+
Converts the data output from GnssSensor to ROS2PoseStamped and PoseWithCovarianceStamped messages.
+These messages are published on two separate topics for each type.
+The conversion and publication is performed using the Publish(GnssSensor.OutputData outputData) method, which is the callback triggered by Gnss Sensor (script) for the current output update.
+
+
Covariance matrix
+
The row-major representation of the 6x6 covariance matrix is filled with 0 and does not change during the script run.
+
+
Elements configurable from the editor level
+
+
Pose Topic - the ROS2 topic on which the message PoseStamped type is published (default: "/sensing/gnss/pose")
+
Pose With Covariance Stamped Topic - the ROS2 topic on which the message PoseWithCovarianceStamped type is published (default: "/sensing/gnss/pose_with_covariance")
+
Frame id - frame in which data are published, used in Header (default: "gnss_link")
+
Qos Settings - Quality of service profile used in the publication (default is assumed as "system_default": Reliable, Volatile, Keep last, 1)
IMUSensor is a component that simulates an IMU (Inertial Measurement Unit) sensor.
+Measures acceleration (\({m}/{s^2}\)) and angular velocity (\({rad}/{s}\)) based on the transformation of the GameObject to which this component is attached.
+
Prefab
+
Prefab can be found under the following path:
+
Assets/AWSIM/Prefabs/Sensors/IMUSensor.prefab
+
+
Link in the default Scene
+
IMUSensor has its own frame tamagawa/imu_link in which its data is published.
+The sensor prefab is added to this frame.
+The tamagawa/imu_link link is added to the sensor_kit_base_link in the base_link object located in the URDF.
+
+
A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.
+
Components
+
+
The IMUSensor functionality is split into two scripts:
+
+
IMU Sensor (script) - it calculates the acceleration and angular velocity as its output and calls the callback for it.
+
Imu Ros2 Publisher (script) - provides the ability to publish IMUSensor output as Imu message type published on a specific ROS2 topics.
+
+
Scripts can be found under the following path:
+
Assets/AWSIM/Scripts/Sensors/Imu/*
+
+
IMU Sensor (script)
+
+
This is the main script in which all calculations are performed:
+
+
the angular velocity is calculated as the derivative of the orientation with respect to time,
+
acceleration is calculated as the second derivative of position with respect to time,
+
in the calculation of acceleration, the gravitational vector is considered - which is added.
+
+
+
Warning
+
If the angular velocity about any axis is NaN (infinite), then angular velocity is published as vector zero.
+
+
Elements configurable from the editor level
+
+
Output Hz - frequency of output calculation and callback (default: 30Hz)
+
+
Output Data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
LinearAcceleration
+
Vector3
+
Measured acceleration (m/s^2)
+
+
+
AngularVelocity
+
Vector3
+
Measured angular velocity (rad/s)
+
+
+
+
Imu Ros2 Publisher (script)
+
+
Converts the data output from IMUSensor to ROS2Imu type message and publishes it.
+The conversion and publication is performed using the Publish(IMUSensor.OutputData outputData) method, which is the callback triggered by IMU Sensor (script) for the current output.
+
+
Warning
+
In each 3x3 covariance matrices the row-major representation is filled with 0 and does not change during the script run.
+In addition, the field orientation is assumed to be {1,0,0,0} and also does not change.
+
+
Elements configurable from the editor level
+
+
Topic - the ROS2 topic on which the message is published (default: "/sensing/imu/tamagawa/imu_raw")
+
Frame id - frame in which data is published, used in Header (default: tamagawa/imu_link")
+
Qos Settings - Quality of service profile used in the publication (default: Reliable, Volatile, Keep last, 1000)
RGLUnityPlugin (RGL) comes with a number of the most popular LiDARs model definitions and ready-to-use prefabs. However, there is a way to create your custom LiDAR. This section describes how to add a new LiDAR model that works with RGL, then create a prefab for it and add it to the scene.
+
+
Supported LiDARs
+
Not all lidar types are supported by RGL. Unfortunately, in the case of MEMsLiDARs, there is a non-repetitive phenomenon - for this reason, the current implementation is not able to reproduce their work.
+
+
1. Add a new LiDAR model
+
The example shows the addition of a LiDAR named NewLidarModel.
+
To add a new LiDAR model, perform the following steps:
+
+
+
Navigate to Assets/RGLUnityPlugin/Scripts/LidarModels.
+
+
+
Add its name to the LidarModels.cs at the end of the enumeration. The order of enums must not be changed to keep existing prefabs working.
+
+
+
+
Now, it is time to define the laser (also called a channel) distribution of the LiDAR.
+
+
Info
+
If your LiDAR:
+
- has a uniform laser distribution
+- has the equal range for all of the lasers
+- fire all of the rays (beams) at the same time
+
+
You can skip this step and use our helper method to generate a simple uniform laser array definition (more information in the next step).
+
+
+
+
Laser distribution is represented by LaserArray consists of:
+
+
+
centerOfMeasurementLinearOffsetMm - 3D translation from the game object's origin to LiDAR's origin. Preview in 2D:
+
+
+
+
focalDistanceMm - Distance from the sensor center to the focal point where all laser beams intersect.
+
+
+
+
lasers - array of lasers (channels) with a number of parameters:
+
+
horizontalAngularOffsetDeg - horizontal angle offset of the laser (Azimuth)
+
verticalAngularOffsetDeg - vertical angle offset of the laser (Elevation)
+
verticalLinearOffsetMm - vertical offset of the laser (translation from origin)
+
ringId - Id of the ring (in most cases laser Id)
+
timeOffset - time offset of the laser firing in milliseconds (with reference to the first laser in the array)
+
minRange - minimum range of the laser (set if lasers have different ranges)
+
maxRange - maximum range of the laser (set if lasers have different ranges)
+
+
+
+
+
+
To define a new laser distribution create a new entry to the LaserArrayLibrary.cs
+
+
+
+
Add a new public static instance of LaserArray with the definition.
+
+
+
Add a new item to the ByModel dictionary that collects LiDAR model enumerations with their laser array definitions.
+
+
+
In this example, NewLidarModel laser distribution consists of 5 lasers with
+
- elevations: 15, 10, 0, -10, -15 degrees
+- azimuths: 1.4, -1.4, 1.4, -1.4, 1.4 degrees
+- ring Ids: 1, 2, 3, 4, 5
+- time offsets: 0, 0.01, 0.02, 0.03, 0.04 milliseconds
+- an equal range that will be defined later
+
+
+
Coordinate system
+
Keep in mind that Unity has a left-handed coordinate system, while most of the LiDAR's manuals use a right-handed coordinate system. In that case, reverse sign of the values of the angles.
+
+
+
+
+
+
The last step is to create a LiDAR configuration by adding an entry to LidarConfigurationLibrary.cs
+
+
+
+
Add a new public static instance of LidarConfiguration with the definition:
+
+
laserArray - laser distribution array created in the previous step (it could be also generated uniformly with LaserArray.Uniform())
+
horizontalResolution - horizontal resolution of laser array firings in degrees (laser array will be rotated according to this resolution)
+
laserArrayCycleTime - time between two consecutive firings of the whole laser array in milliseconds. Usually, it consists of firing time for all the lasers and recharge time. Skip this parameter if all of the rays are fired at the same time.
+
minHAngle - minimum horizontal angle of the LiDAR
+
maxHAngle - maximum horizontal angle of the LiDAR
+
noiseParams - LiDAR noise parameters (see LidarNoiseParams.cs for more details)
+
rayGenerateMethod - if LiDAR has equal range for all of the lasers choose RotatingLidarEqualRange and configure minRange and maxRange in the LidarConfiguration. Otherwise, choose RotatingLidarDifferentLaserRanges and define ranges in LaserArray.
+
minRange - minimum range of the sensor (applied when Ray Generate Method is Rotating Lidar Equal Range)
+
maxRange - maximum range of the sensor (applied when Ray Generate Method is Rotating Lidar Equal Range)
+
+
+
+
Add a new item to the ByModel dictionary that collects LiDAR model enumerations with their LiDAR configurations.
+
+
+
+
+
Done. New LiDAR preset should be available via Unity Inspector.
+
+
Frame rate of the LiDAR can be set in the Automatic Capture Hz parameter.
+
Note: In the real-world LiDARs, frame rate affects horizontal resolution. Current implementation separates these two parameters. Keep in mind to change it manually.
+
+
+
2. Create new LiDAR prefab
+
+
Create an empty object and name it appropriately according to the LiDAR model.
+
Attach script LidarSensor.cs to created object.
+
Set the new added LiDAR model in Model Preset field, check if the configuration loads correctly. You can now customize it however you like.
+
(Optional) Attach script PointCloudVisualization.cs for visualization purposes.
+
For publishing point cloud via ROS2 attach script RglLidarPublisher.cs script to created object.
+
Set the topics on which you want the data to be published and their frame.
LidarSensor is the component that simulates the LiDAR (Light Detection and Ranging) sensor.
+LiDAR works by emitting laser beams that bounce off objects in the environment, and then measuring the time it takes for the reflected beams to return, allowing the sensor to create a 3D map of the surroundings.
+This data is used for object detection, localization, and mapping.
+
LiDAR in an autonomous vehicle can be used for many purposes.
+The ones mounted on the top of autonomous vehicles are primarily used
+
+
to scan the environment for localization in space
+
to detect and identify obstacles such as approaching vehicles, pedestrians or other objects in the driving path.
+
+
LiDARs placed on the left and right sides of the vehicle are mainly used to monitor the traffic lane and detect vehicles moving in adjacent lanes, enabling safe maneuvers such as lane changing or turning.
+
LidarSensor component is a part of RGLUnityPlugin that integrates the external RobotecGPULidar (RGL) library with Unity. RGL also allows to provide additional information about objects, more about it here.
If you would like to see how LidarSensor works using RGL or run some tests, we encourage you to familiarize yourself with the RGL test scenes section.
+
+
+
Supported LiDARs
+
The current scripts implementation allows you to configure the prefab for any mechanical LiDAR.
+You can read about how to do it here.
+MEMS-based LiDARs due to their different design are not yet fully supported.
+
+
Prefabs
+
Prefabs can be found under the following path:
+
Assets/AWSIM/Prefabs/RobotecGPULidars/*
+
+
The table of available prefabs can be found below:
+
+
+
+
LiDAR
+
Path
+
Appearance
+
+
+
+
+
HESAI Pandar40P
+
HesaiPandar40P.prefab
+
+
+
+
HESAI PandarQT64
+
HesaiPandarQT64.prefab
+
+
+
+
HESAI PandarXT32
+
HesaiPandarXT32.prefab
+
+
+
+
HESAI AT128 E2X
+
HesaiAT128E2X.prefab
+
+
+
+
Ouster OS1-64
+
OusterOS1-64.prefab
+
+
+
+
Velodyne VLP-16
+
VelodyneVLP16.prefab
+
+
+
+
Velodyne VLC-32C
+
VelodyneVLP32C.prefab
+
+
+
+
Velodyne VLS-128-AP
+
VelodyneVLS128.prefab
+
+
+
+
+
Link in the default Scene
+
+
LidarSensor is configured in default vehicle EgoVehicle prefab.
+It is added to URDF object as a child of sensor_kit_base_link.
+LidarSensor placed in this way does not have its own frame, and the data is published relative to sensor_kit_base_link.
+More details about the location of the sensors in the vehicle can be found here.
+
A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.
+
+
Additional LiDARs
+
For a LiDAR placed on the left side, right side or rear, an additional link should be defined.
+
+
Components and Resources
+
+
The LiDAR sensor simulation functionality is split into three components:
+
+
Lidar Sensor (script) - provides lidar configuration, creates RGL pipeline to simulate lidar, and performs native RGL raytrace calls,
+
Rgl Lidar Publisher (script) - extends RGL pipeline with nodes to publish ROS2 messages.
+
Point Cloud Visualization (script) - visualizes point cloud collected by sensor.
+
+
Moreover, the scripts use Resources to provide configuration for prefabs of supported lidar models:
+
+
LaserModels - provides a list of supported models,
+
LaserArrayLibrary - provides data related to laser array construction for supported models,
+
LaserConfigurationLibrary - provides full configuration, with ranges and noise for supported models.
+
+
These are elements of the RGLUnityPlugin, you can read more here.
+
Lidar Sensor (script)
+
+
This is the main component that creates the RGL node pipeline for the LiDAR simulation.
+The pipeline consists of:
+
+
setting ray pattern,
+
transforming rays to represent pose of the sensor on the scene,
+
applying Gaussian noise,
+
performing raytracing,
+
removing non-hits from the result point cloud,
+
transforming point cloud to sensor frame coordinate system.
+
+
LidarSensor provides public methods to extend this pipeline with additional RGL nodes.
+In this way, other components can request point cloud processing operations and receive data in the desired format.
+
LidarSensor component in the output provides 3 types of data.
+Two of them: rosPCL24 and rosPCL48 are point clouds that are published by the RglLidarPublisher component.
+Whereas vector onlyHits is used for visualization by the PointCloudVisualization component.
+
Elements configurable from the editor level
+
+
Automatic Capture Hz - the rate of sensor processing (default: 10Hz)
+
Model Preset - allows selecting one of the built-in LiDAR models (default: RangeMeter)
Ray Generate Method - method that lidar's rays are generated:
+
Rotating Lidar Equal Range - rays are generated for rotating lidar with equal range for all of the lasers (described with Min Range and Max Range)
+
Rotating Lidar Different Laser Ranges - rays are generated for rotating lidar with different ranges for the lasers (described in Laser Array)
+
Hesai AT128 - rays are generated in specific way to Hesai AT128 lidar
+
+
+
Laser Array - geometry description of lidar's array of lasers, should be prepared on the basis of the manual for a given model of LiDAR (default: loaded from LaserArrayLibrary)
+
Horizontal Resolution - the horiontal resolution of laser array firings
+
Min H Angle - minimum horizontal angle, left (default: 0)
+
Max H Angle - maximum horizontal angle, right (default: 0)
+
Min Range - minimum range of the sensor (applied when Ray Generate Method is Rotating Lidar Equal Range)
+
Max Range - maximum range of the sensor (applied when Ray Generate Method is Rotating Lidar Equal Range)
+
Noise Params:
+
Angular Noise Type - angular noise type (default: Ray Based)
+
Angular Noise St Dev - angular noise standard deviation in degree (default: 0.05729578)
+
Angular Noise Mean - angular noise mean in degrees (default: 0)
+
Distance Noise St Dev Base - distance noise standard deviation base in meters (default: 0.02)
+
Distance Noise Rise Per Meter - distance noise standard deviation rise per meter (default: 0)
+
Distance Noise Mean - distance noise mean in meters (default: 0)
+
+
+
+
+
+
Output Data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
onlyHits
+
Vector3[ ]
+
Vertices for visualization in Unity's coordinate system
+
+
+
rosPCL24
+
byte[ ]
+
Vertices for publishing Autoware format pointcloud in ROS2 coordinate system
+
+
+
rosPCL48
+
byte[ ]
+
Vertices for publishing extended Autoware format pointcloud in ROS2 coordinate system
+
+
+
+
Rgl Lidar Publisher (script)
+
+
RglLidarPublisher extends the main RGL pipeline created in LidarSensor with RGL nodes that produce point clouds in specific format and publish them to the ROS2 topic.
+Thanks to the ROS2 integration with RGL, point clouds can be published directly from the native library.
+RGL creates ROS2 node named /RobotecGPULidar with publishers generated by RGL nodes.
+
Currently, RglLidarPublisher implements two ROS2 publishers:
+
+
rosPCL24 - a 24-byte point cloud format used by Autoware
+
rosPCL48 - a 48-byte extended version point cloud format used by Autoware
+
+
Details on the construction of these formats are available in the PointCloudFormats under the following path:
For a better understanding of the rosPCL48 format, we encourage you to familiarize yourself with the point cloud pre-processing process in Autoware, which is described here.
+
+
Elements configurable from the editor level
+
+
Pcl 24 Topic - the ROS2 topic on which the PointCloud2 message is published (default: "lidar/pointcloud")
+
Pcl 48 Topic - the ROS2 topic on which the PointCloud2 message is published (default: "lidar/pointcloud_ex")
+
Frame ID - frame in which data are published, used in Header (default: "world")
+
Publish PCL24 - if publish cloud PCL24 (default: true)
+
Publish PCL48 - if publish cloud PCL48 (default: true)
+
Qos Settings - Quality of service profile used in the publication (default: Best effort, Volatile, Keep last, 5)
A component visualizing a point cloud obtained from RGL in the form of a Vector3 list as colored points in the Unity scene.
+Based on the defined color table, it colors the points depending on the height at which they are located.
+
The obtained points are displayed as the vertices of mesh, and their coloring is possible thanks to the use of PointCloudMaterial material which can be found in the following path:
Point Shape - the shape of the displayed points (default: Box)
+
Point Size - the size of the displayed points (default: 0.05)
+
Colors - color list used depending on height (default: 6 colors: red, orange, yellow, green, blue, violet)
+
Auto Compute Coloring Heights - automatic calculation of heights limits for a list of colors (default: false)
+
Min Coloring Height - minimum height value from which color matching is performed, below this value all points have the first color from the list (default: 0)
+
Max Coloring Height - maximum height value from which color matching is performed, above this value all points have the last color from the list (default: 20)
+
+
Read material information
+
To ensure the publication of the information described in this section, GameObjects must be adjusted accordingly. This tutorial describes how to do it.
+
Intensity Texture
+
RGL Unity Plugin allows assigning an Intensity Texture to the GameObjects to produce a point cloud containing information about the lidar ray intensity of hit. It can be used to distinguish different levels of an object's reflectivity.
+
Output data
+
Point cloud containing intensity is published on the ROS2 topic via RglLidarPublisher component. The intensity value is stored in the intensity field of the sensor_msgs/PointCloud2 message.
+
Instance segmentation
+
RGL Unity Plugin allows assigning an ID to GameObjects to produce a point cloud containing information about hit objects. It can be used for instance/semantic segmentation tasks.
+
+
LidarInstanceSegmentationDemo
+
If you would like to see how LidarInstanceSegmentationDemo works using RGL or run some tests, we encourage you to familiarize yourself with this section.
+
+
Output data
+
Point cloud containing hit objects IDs is published on the ROS2 topic via RglLidarPublisher component. It is disabled by default. Properties related to this feature are marked below:
+
+
Dictionary mapping
+
The resulting simulation data contains only the id of objects without their human-readable names. To facilitate the interpretation of such data, a function has been implemented to save a file with a dictionary mapping instance ID to GameObject names. It writes pairs of values in the yaml format:
+
+
The name of the GameObject
+
Category ID of SemanticCategory component
+
+
To enable saving dictionary mapping set output file path to the Semantic Category Dictionary File property in the Scene Manager component:
+
+
The dictionary mapping file will be saved at the end of the simulation.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Sensors/LiDARSensor/LiDARSensor/lidar_meshes.png b/Components/Sensors/LiDARSensor/LiDARSensor/lidar_meshes.png
new file mode 100644
index 0000000000..3898eec42f
Binary files /dev/null and b/Components/Sensors/LiDARSensor/LiDARSensor/lidar_meshes.png differ
diff --git a/Components/Sensors/LiDARSensor/LiDARSensor/link.png b/Components/Sensors/LiDARSensor/LiDARSensor/link.png
new file mode 100644
index 0000000000..ce39cacfa0
Binary files /dev/null and b/Components/Sensors/LiDARSensor/LiDARSensor/link.png differ
diff --git a/Components/Sensors/LiDARSensor/LiDARSensor/script.png b/Components/Sensors/LiDARSensor/LiDARSensor/script.png
new file mode 100644
index 0000000000..6af404caab
Binary files /dev/null and b/Components/Sensors/LiDARSensor/LiDARSensor/script.png differ
diff --git a/Components/Sensors/LiDARSensor/LiDARSensor/script_ros2.png b/Components/Sensors/LiDARSensor/LiDARSensor/script_ros2.png
new file mode 100644
index 0000000000..5b67c45ff3
Binary files /dev/null and b/Components/Sensors/LiDARSensor/LiDARSensor/script_ros2.png differ
diff --git a/Components/Sensors/LiDARSensor/LiDARSensor/script_visualization.png b/Components/Sensors/LiDARSensor/LiDARSensor/script_visualization.png
new file mode 100644
index 0000000000..da95f947ef
Binary files /dev/null and b/Components/Sensors/LiDARSensor/LiDARSensor/script_visualization.png differ
diff --git a/Components/Sensors/LiDARSensor/RGLUnityPlugin/index.html b/Components/Sensors/LiDARSensor/RGLUnityPlugin/index.html
new file mode 100644
index 0000000000..d59b256df1
--- /dev/null
+++ b/Components/Sensors/LiDARSensor/RGLUnityPlugin/index.html
@@ -0,0 +1,2061 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RGLUnityPlugin - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Robotec GPU Lidar (RGL) is an open source high performance lidar simulator running on CUDA-enabled GPUs.
+It is a cross-platform solution compatible with both Windows and Linux operating systems.
+RGL utilizes RTX cores for acceleration, whenever they are accessible.
+
RGL is used in AWSIM for performance reasons.
+Thanks to it, it is possible to perform a large number of calculations using the GPU, which is extremely helpful due to the size of the scenes.
+AWSIM is integrated with RGL out-of-the-box - using RGLUnityPlugin asset.
Describing the concept of using RGL in AWSIM, we distinguish:
+
+
+
Mesh - a handle to the on-GPU data of the 3D model of objects that in AWSIM are provided in the form of Mesh Filter component.
+RGLUnityPlugin supports two types of meshes: static (rendered by Mesh Renderer) and animated (rendered by Skinned Mesh Renderer).
+Static meshes could be shared between Entities.
+
+
+
Entity - represents a 3D object on the scene with its position and rotation.
+It consists of a lightweight reference to a Mesh and a transformation matrix of the object.
+
+
+
Scene - a location where raytracing occurs.
+It is a set of entites uploaded by SceneManager script to the RGL Native Library.
+
+
+
Node - performs specific operations such as setting rays for raytracing, transforming rays, performing raytracing, and manipulating output formats.
+In AWSIM, the main sequence of RGL nodes that simulates LiDAR is created in the LidarSensor script.
+Other scripts usually create nodes to get requested output or preprocess point cloud, and then connect those nodes to the LidarSensor.
+
+
+
Graph - a collection of connected Nodes that can be run to calculate results.
+It allows users to customize functionality and output format by adding or removing Nodes.
+
+
+
Producing a point cloud is based on the use of a Scene containing Entities with Meshes, and placing an EgoEntity with LiDAR sensor that creates a Graph describing ray pattern and performing raytracing.
+In subsequent frames of the simulation, SceneManager synchronizes the scene between Unity and RGL, and LiDAR sensor updates rays pose on the scene and triggers Graph to perform raytracing and format desired output.
+
Package structure
+
RGLUnityPlugin asset contains:
+
+
Plugins - dynamically loaded libraries for Windows and Linux (*.dll and *.so files).
+
Resources - visualization shader and material.
+
Scripts - scripts for using RGL in the Unity - details below.
+
+
Scripts
+
+
SceneManager - responsible for syncing the scene between Unity and RGL.
+
LidarSensor - provide lidar configuration and create RGL pipeline to simulate lidar.
+
PointCloudVisualization - visualize point cloud on the Unity scene.
+
IntensityTexture - adds slot for Intensity Texture ID to the GameObject
+
SemanticCategory - adds category ID to the GameObject
+
RGLDebugger - provides configuration for Native RGL debug tools (logging and tape).
+
A set of classes providing tools to define LiDAR specification (mostly: ray poses):
+
LidarModels - enumeration of some real-world LiDARs names.
LidarConfigurationLibrary - provides a number of pre-defined LidarConfigurations.
+
LaserArray - definition of a (vertical) array of lasers.
+
LaserArrayLibrary - provides a number of pre-defined LaserArrays.
+
Laser - describes offsets of a single laser within a LaserArray.
+
LidarNoiseParams - describes a LiDAR noise that can be simulated
+
+
+
LowLevelWrappers scripts - provides some convenience code to call Native RGL functions.
+
Utilities scripts - miscellaneous utilities to make rest of the code clearer.
+
+
SceneManager
+
Each scene needs SceneManager component to synchronize models between Unity and RGL.
+On every frame, it detects changes in the Unity's scene and propagates the changes to native RGL code.
+When necessary, it obtains 3D models from GameObjects on the scene, and when they are no longer needed, it removes them.
+
Three different strategies to interact with in-simulation 3D models are implemented.
+SceneManager uses one of the following policies to construct the scene in RGL:
+
+
Only Colliders - data is computed based on the colliders only, which are geometrical primitives or simplified Meshes.
+This is the fastest option, but will produce less accurate results, especially for the animated entities.
+
Regular Meshes And Colliders Instead Of Skinned - data is computed based on the regular meshes for static Entities (with MeshRenderers component) and the colliders for animated Entities (with SkinnedMeshRenderer component).
+This improves accuracy for static Entities with a negligible additional performance cost.
+
Regular Meshes And Skinned Meshes - uses regular meshes for both static and animated Entities.
+This incurs additional performance, but produces the most realistic results.
+
+
+
+
+
Mesh Source Strategy
+
Static Entity
+
Animated Entity (NPC)
+
+
+
+
+
Only Colliders
+
Collider
+
Collider
+
+
+
Regular Meshes And Colliders Instead Of Skinned
+
Regular Mesh
+
Collider
+
+
+
Regular Meshes And Skinned Meshes
+
Regular Mesh
+
Regular Mesh
+
+
+
+
Mesh source can be changed in the SceneManager script properties:
+
+
+
Performance
+
SceneManager performance depends on mesh source option selected.
+
+
Usage requirements
+
Objects, to be detectable by RGL, must fulfill the following requirements:
assigning an Intensity Texture to the GameObjects to produce a point cloud containing information about the lidar ray intensity of hit. It can be used to distinguish different levels of an object's reflectivity.
+
assigning an ID to GameObjects to produce a point cloud containing information about hit objects. It can be used for instance/semantic segmentation tasks.
+Below describes how to ensure the publication of this information.
+
+
Add Intensity Texture assignment
+
To enable reading material information, add IntensityTexture component to every GameObject that is expected to have non-default intensity values.
+
+
After that desired texture has to be inserted into the Intensity Texture slot.
+
The texture has to be in R8 format. That means 8bit in the red channel (255 possible values).
+
+
When the texture is assigned, the intensity values will be read from the texture and added to the point cloud if and only if the mesh component in the GameObject has a set of properly created texture coordinates.
+
The expected number of texture coordinates is equal to the number of vertices in the mesh. The quantity of indices is not relevant. In other cases, the texture will be no read properly.
+
Add ID assignment
+
To enable segmentation, add SemanticCategory component to every GameObject that is expected to have a distinct ID. All meshes that belong to a given object will inherit its ID.
+ID inheritance mechanism allows IDs to be overwritten for individual meshes/objects.
+This solution also enables the creation of coarse categories (e.g., Pedestrians, Vehicles)
+
+
Example
+
SemanticCategory component is assigned to the TaxiGameObject. All meshes in the TaxiGameObject will have the same instance ID as Taxi:*
+
+
+
+
Example
+
The driver has its own SemanticCategory component, so his instance ID will differ from the rest of the meshes:
+
+
+
+
Example
+
SemanticCategory component is assigned to the VehiclesGameObject that contains all of the cars on the scene:
+
+
+
Dictionary mapping
+
The resulting simulation data contains only the id of objects without their human-readable names. To facilitate the interpretation of such data, a function has been implemented to save a file with a dictionary mapping instance ID to GameObject names. It writes pairs of values in the yaml format:
+
+
The name of the GameObject
+
Category ID of SemanticCategory component
+
+
To enable saving dictionary mapping set output file path to the Semantic Category Dictionary File property in the Scene Manager component:
+
+
The dictionary mapping file will be saved at the end of the simulation.
This sensor is added directly to the URDF link in the EgoVehicle prefab.
+
+
A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.
+
Components
+
+
All features are implemented within the Vehicle Report Ros2 Publisher (script) which can be found under the following path:
+
Assets/AWSIM/Prefabs/Sensors/*
+
+
Vehicle Report Ros2 Publisher (script)
+
+
The script is responsible for updating and publishing each of the aggregated data on a separate topic.
+Therefore, it has 6 publishers publishing the appropriate type of message with a constant frequency - one common for all data.
+
Elements configurable from the editor level
+
+
* Report Topic - topic on which suitable type of information is published (default: listed in the table below)
+
Publish Hz - frequency of publications on each topic (default: 30Hz)
+
Frame ID - frame in which data is published, used in Header (default: base_link)
+
QoS- Quality of service profile used in the publication (default assumed as "system_default": Reliable, Volatile, Keep last/1)
+
Vehicle - the object from which all published data are read (default: None)
+
+
+
Vehicle configuration
+
An important element of the script configuration that must be set is the scene Object (Vehicle).
+It will be used for reading all the data needed.
+The appropriate EgoVehicle object should be selected.
+
If you can't select the right object, make sure it's set up correctly - it has got added all the scripts needed for EgoVehicle.
NPCPedestrian is an object that simulates a human standing or moving on the scene.
+It can move cyclically in any chosen place thanks to the available scripts.
+Traffic light tracking will be implemented in the future.
+
+
+
Sample scene
+
If you would like to see how NPCPedestrian works or run some tests, we encourage you to familiarize yourself with the NPCPedestrianSample default scene described in this section.
Prefab is developed using models available in the form of *.fbx file.
+From this file, the visual elements of the model, Animator and LOD were loaded.
+The Animator and LOD are added as components of the main-parent GameObject in prefab, while the visual elements of the model are added as its children.
The ReferencePoint is used by the NPC Pedestrian (script) described here.
+
Link in the default Scene
+
+
Pedestrians implemented in the scene are usually added in one aggregating object - in this case it is NPCPedestrians.
+This object is added to the Environment prefab.
+
Components
+
+
There are several components responsible for the full functionality of NPCPedestrian:
+
+
Animator - provides motion animations in the scene, which are composed of clips controlled by the controller.
+
LOD Group - provides level of detail configuration for shaders - affects GPU usage.
+
Rigidbody - ensures that the object is controlled by the physics engine in Unity - e.g. pulled downward by gravity.
+
NPC Pedestrian (script) - ensures that the movement of the object is combined with animation.
+
Simple Pedestrian Walker Controller (script) - provides pedestrian movement in a specific direction and distance in a cyclical manner.
+
+
Scripts can be found under the following path:
+
Assets/AWSIM/Scripts/NPCs/Pedestrians/*
+
+
Rigidbody
+
+
Rigidbody ensures that the object is controlled by the physics engine.
+In order to connect the animation to the object, the Is Kinematic option must be enabled.
+By setting Is Kinematic, each NPCPedestrian object will have no physical interaction with other objects - it will not react to a vehicle that hits it.
+The Use Gravity should be turned off - the correct position of the pedestrian in relation to the ground is ensured by the NPC Pedestrian (script).
+In addition, Interpolate should be turned on to ensure the physics engine's effects are smoothed out.
+
LOD (Level of Detail)
+
+
LOD provides dependence of the level of detail of the object depending on the ratio of the GameObject’s screen space height to the total screen height.
+The pedestrian model has two object groups: suffixed LOD0 and LOD1.
+LOD0 objects are much more detailed than LOD1 - they have many more vertices in the Meshes.
+Displaying complex meshes requires more performance, so if the GameObject is a small part of the screen, less complex LOD1 objects are used.
+
In the case of the NPCPedestrian prefab, if its object is less than 25% of the height of the screen then objects with the LOD1 suffix are used.
+For values less than 1% the object is culled.
+
Animator
+
+
Animator component provides animation assignments to a GameObject in the scene.
+It uses a developed Controller which defines which animation clips to use and controls when and how to blend and transition between them.
+
The AnimationController for humans should have the two float parameters for proper transitions.
+Transitions between animation clips are made depending on the values of these parameters:
+
+
moveSpeed - pedestrian movement speed in \({m}/{s}\),
+
rotateSpeed - pedestrian rotation speed in \({rad}/{s}\).
+
+
Developed controller can be found in the following path:
+Assets/AWSIM/Models/NPCs/Pedestrians/Human/Human.controller
+
+
+
Walking to running transition
+
The example shows the state of walking and then transitions to running as a result of exceeding the condition \(\mathrm{moveSpeed} > 1.6\)
+
+
+
NPC Pedestrian (script)
+
+
The script takes the Rigidbody and Animator components and combines them in such a way that the actual animation depends on the movement of Rigidbody.
+It provides an inputs that allows the pedestrian to move - change his position and orientation.
+In addition, the ReferencePoint point is used to ensure that the pedestrian follows the ground plane correctly.
+
Elements configurable from the editor level
+
+
Ray Cast Max Distance - ray-cast max distance for locating the ground.
+
Ray Cast Origin Offset - upward offset of the ray-cast origin from the GameObject local origin for locating the ground.
+
+
Input Data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
SetPosition
+
Vector3
+
Move the NPCPedestrian so that the reference point is at the specified coordinates.
+
+
+
SetRotation
+
Vector3
+
Rotate the NPCPedestrian so that the orientation of the reference point becomes the specified one.
+
+
+
+
Simple Pedestrian Walker Controller (script)
+
+
Simple Pedestrian Walker Controller is a script that allows the pedestrian to cyclically move back and forth along a straight line.
+One-way motion is performed with a fixed time as parameter Duration and a constant linear velocity as parameter Speed.
+The script obviously uses the NPCPedestrian controls provided by the NPC Pedestrian (script) inputs.
+
+
Pedestrian walking on the sidewalk
+
+
+
Collider
+
+
Collider is an optional pedestrian component.
+By default, NPCPedestrian doesn't have this component added, It can be added if you want to detect a collision, e.g. with an EgoVehicle.
+There are several types of colliders, choose the right one and configure it for your own requirements.
+
+
Capsule Collider
+
An example of a CapsuleCollider that covers almost the entire pedestrian.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Traffic/NPCs/Pedestrian/link.png b/Components/Traffic/NPCs/Pedestrian/link.png
new file mode 100644
index 0000000000..934ed44441
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/link.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/lod.png b/Components/Traffic/NPCs/Pedestrian/lod.png
new file mode 100644
index 0000000000..265b3be97f
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/lod.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/model.png b/Components/Traffic/NPCs/Pedestrian/model.png
new file mode 100644
index 0000000000..432fdaa5f6
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/model.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/prefab.png b/Components/Traffic/NPCs/Pedestrian/prefab.png
new file mode 100644
index 0000000000..7e3d2ffb8e
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/prefab.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/prefab_link.png b/Components/Traffic/NPCs/Pedestrian/prefab_link.png
new file mode 100644
index 0000000000..56401bedea
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/prefab_link.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/rigidbody.png b/Components/Traffic/NPCs/Pedestrian/rigidbody.png
new file mode 100644
index 0000000000..6c86b92f22
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/rigidbody.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/script.png b/Components/Traffic/NPCs/Pedestrian/script.png
new file mode 100644
index 0000000000..eedc522e78
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/script.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/simple_walk.png b/Components/Traffic/NPCs/Pedestrian/simple_walk.png
new file mode 100644
index 0000000000..9346449e80
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/simple_walk.png differ
diff --git a/Components/Traffic/NPCs/Pedestrian/walk.mp4 b/Components/Traffic/NPCs/Pedestrian/walk.mp4
new file mode 100644
index 0000000000..f303abb6ff
Binary files /dev/null and b/Components/Traffic/NPCs/Pedestrian/walk.mp4 differ
diff --git a/Components/Traffic/NPCs/Vehicle/bounds_example.png b/Components/Traffic/NPCs/Vehicle/bounds_example.png
new file mode 100644
index 0000000000..5cb45285ea
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/bounds_example.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/collider.png b/Components/Traffic/NPCs/Vehicle/collider.png
new file mode 100644
index 0000000000..e80640677c
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/collider.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/collider_example.png b/Components/Traffic/NPCs/Vehicle/collider_example.png
new file mode 100644
index 0000000000..1ab0e6f510
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/collider_example.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/com.png b/Components/Traffic/NPCs/Vehicle/com.png
new file mode 100644
index 0000000000..f79ba02547
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/com.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/com_2.png b/Components/Traffic/NPCs/Vehicle/com_2.png
new file mode 100644
index 0000000000..7dca64e778
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/com_2.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/driver.png b/Components/Traffic/NPCs/Vehicle/driver.png
new file mode 100644
index 0000000000..abb1e545d1
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/driver.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/fbx.png b/Components/Traffic/NPCs/Vehicle/fbx.png
new file mode 100644
index 0000000000..fa004393a7
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/fbx.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/gizmo.png b/Components/Traffic/NPCs/Vehicle/gizmo.png
new file mode 100644
index 0000000000..d4b63b7ab5
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/gizmo.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/image_0.png b/Components/Traffic/NPCs/Vehicle/image_0.png
new file mode 100644
index 0000000000..b016d9635f
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/image_0.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/image_1.png b/Components/Traffic/NPCs/Vehicle/image_1.png
new file mode 100644
index 0000000000..552a229ff9
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/image_1.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/image_2.png b/Components/Traffic/NPCs/Vehicle/image_2.png
new file mode 100644
index 0000000000..b6a5e3f010
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/image_2.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/image_3.png b/Components/Traffic/NPCs/Vehicle/image_3.png
new file mode 100644
index 0000000000..66dd205db9
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/image_3.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/image_4.png b/Components/Traffic/NPCs/Vehicle/image_4.png
new file mode 100644
index 0000000000..f739ead68b
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/image_4.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/image_5.png b/Components/Traffic/NPCs/Vehicle/image_5.png
new file mode 100644
index 0000000000..dc9bdee696
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/image_5.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/index.html b/Components/Traffic/NPCs/Vehicle/index.html
new file mode 100644
index 0000000000..1328853561
--- /dev/null
+++ b/Components/Traffic/NPCs/Vehicle/index.html
@@ -0,0 +1,2256 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Vehicle - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NPCVehicle is a non-playable object that simulates a vehicle that is stationary or moving around the scene.
+It can move on roads, more specifically TrafficLanes, thanks to the use of TrafficSimulator - which you can read more about here.
+Vehicles moving on the scene take into account each other - avoiding collisions, follow traffic lights and have an implemented mechanism of yielding the right of way.
+
+
+
Sample scene
+
If you would like to see how NPCVehicle works or run some tests, we encourage you to familiarize yourself with the NPCVehicleSample default scene described in this section.
+
+
+
Ego Vehicle
+
If you are interested in the most important vehicle on the scene - Ego Vehicle, we encourage you to read this section.
+
+
Prefabs and Fbxs
+
Prefabs can be found under the following path:
+
Assets/AWSIM/Prefabs/NPCs/Vehicles/*
+
+
The table shows the available prefabs of the vehicles:
+
+
+
+
+
Hatchback
+
SmallCar
+
Taxi
+
Truck
+
Van
+
+
+
+
+
Appearance
+
+
+
+
+
+
+
+
Prefab
+
Hatchback.prefab
+
SmallCar.prefab
+
Taxi-64.prefab
+
Truck_2t.prefab
+
Van.prefab
+
+
+
+
NPCVehicle prefab has the following content:
+
+
As you can see, it consists of 2 parents for GameObjects: Visuals - aggregating visual elements, Colliders - aggregating colliders and single object CoM.
+ All objects are described in the sections below.
+
Visual elements
+
Prefabs are developed using models available in the form of *.fbx files.
+For each vehicle, the visuals elements and LOD were loaded from the appropriate *.fbx file.
+The LOD is always added as components of the main-parent GameObject in prefab, while the visual elements of the model are aggregated and added in object Visuals.
+
*.fbx file for each vehicle is located in the appropriate Models directory for the vehicle under the following path:
The content of a sample *.fbx file is presented below, all elements except Collider have been added to the prefab as visual elements of the vehicle.
+Collider is used as the Mesh source for the Mesh Collider in the BodyCollider object.
+
.
+
+
Link
+
The default scene does not have vehicles implemented in fixed places, but they are spawned by RandomTrafficSimulator which is located in the Environment prefab.
+Therefore, before starting the simulation, no NPCVehicle object is on the scene.
+
When you run the simulation, you can see objects appearing as children of RandomTrafficSimulator:
+
+
In each NPCVehicle prefab, the local coordinate system of the vehicle (main prefab link) should be defined in the axis of the rear wheels projected onto the ground - in the middle of the distance between them.
+This aspect holds significance when characterizing the dynamics of the object, as it provides convenience in terms of describing its motion and control.
+
+
Components
+
+
There are several components responsible for the full functionality of NPCVehicle:
+
+
LOD Group - provides level of detail configuration for shaders - affects GPU usage.
+
Rigidbody - ensures that the object is controlled by the physics engine in Unity - e.g. pulled downward by gravity.
+
NPC Vehicle (script) - provides the ability to change the position and orientation of the vehicle, as well as to control the turn signals and brake light.
+
+
Script can be found under the following path:
+
Assets/AWSIM/Scripts/NPCs/Vehicles
+
+
CoM
+
CoM (Center of Mass) is an additional link that is defined to set the center of mass in the Rigidbody.
+The NPC Vehicle (script) is responsible for its assignment.
+This measure should be defined in accordance with reality.
+Most often, the center of mass of the vehicle is located in its center, at the height of its wheel axis - as shown below.
+
+
Colliders
+
Colliders are used to ensure collision between objects.
+In NPCVehicle, the main BodyCollider collider and Wheels Colliders colliders for each wheel were added.
+
Body Collider
+
+
BodyCollider is a vehicle Object responsible for ensuring collision with other objects.
+Additionally it can be used to detect these collisions.
+The MeshCollider uses a Mesh of an Object to build its Collider.
+The Mesh for the BodyCollider was also loaded from the *.fbx file similarly to the visual elements.
+
+
Wheels Colliders
+
+
WheelsColliders are an essential element from the point of view of driving vehicles on the road.
+They are the only ones that have contact with the roads and it is important that they are properly configured.
+Each vehicle, apart from the visual elements related to the wheels, should also have 4 colliders - one for each wheel.
+
To prevent inspector entry for WheelCollider the WheelColliderConfig has been developed.
+It ensures that friction is set to 0 and only wheel suspension and collisions are enabled.
+
+
+
+
+
Wheel Collider Config
+
For a better understanding of the meaning of WheelCollider we encourage you to read this manual.
+
+
LOD
+
+
LOD provides dependence of the level of detail of the object depending on the ratio of the GameObject’s screen space height to the total screen height.
+Vehicle models have only one LOD0 group, therefore there is no reduction in model complexity when it does not occupy a large part of the screen.
+It is only culled when it occupies less than 2% of the height.
+
Rigidbody
+
+
Rigidbody ensures that the object is controlled by the physics engine.
+The Mass of the vehicle should approximate its actual weight.
+In order for the vehicle to physically interact with other objects - react to collisions, Is Kinematic must be turned off.
+The Use Gravity should be turned on - to ensure the correct behavior of the body during movement.
+In addition, Interpolate should be turned on to ensure the physics engine's effects are smoothed out.
+
NPC Vehicle (script)
+
+
The script takes the Rigidbody and provides an inputs that allows the NPCVehicle to move.
+Script inputs give the ability to set the position and orientation of the vehicle, taking into account the effects of suspension and gravity.
+In addition, the script uses the CoM link reference to assign the center of mass of the vehicle to the Rigidbody.
+
Script inputs are used by RandomTrafficSimulator, which controls the vehicles on the scene - it is described here.
+
Input Data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
SetPosition
+
Vector3
+
Move the NPCVehicle so that its x, z coordinates are same as the specified coordinates. Pitch and roll are determined by physical operations that take effects of suspension and gravity into account.
+
+
+
SetRotation
+
Vector3
+
Rotate the NPCVehicle so that its yaw becomes equal to the specified one. Vertical movement is determined by physical operations that take effects of suspension and gravity into account.
+
+
+
+
Visual Object Root is a reference to the parent aggregating visuals, it can be used to disable the appearance of visual elements of the NPCVehicle in the scene.
+
Whereas Bounds Represents an axis aligned bounding box of the NPCVehicle.
+It is used primarily to detect collisions between vehicles in the event of spawning, yielding and others.
+Moreover, vehicle bounds are displayed by Gizmos.
+
+
The settings of the remaining elements, i.e. the Axle and the Lights, are described here and here.
+
+
No Gizmo visualization
+
If you don't see Gizmo's visual elements, remember to turn them on.
+
+
+
Axle Settings
+
+
This part of the settings is responsible for the proper connection of visual elements with the collider for each wheel - described earlier.
+The objects configured in this section are used to control the vehicle - its wheel speed and steering angle, which are calculated based on the input values.
+Correct configuration is very important from the point of view of the NPCVehicle movement on the road.
+
Lights Settings
+
+
This part of the settings is related to the configuration of materials emission - used when a specific lighting is activated.
+There are 3 types of lights: Brake, Left Turn Signal and Right Turn Signal.
+Each of the lights has its visual equivalent in the form of a Mesh.
+In the case of NPCVehicle all of the lights are included in the Body object Mesh, which has many materials - including those related to lights.
+
For each type of light, the appropriate Material Index (equivalent of element index in mesh) and Lighting Color are assigned - yellow for Turn Signals, red for Break.
+
Lighting Intensity values are also configured - the greater the value, the more light will be emitted.
+This value is related to Lighting Exposure Weight parameter that is an exposure weight - the lower the value, the more light is emitted.
+
The brake light is switched on depending on the speed of the NPCVehicle, while RandomTrafficSimulator is responsible for switching the turn signals on and off.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Traffic/NPCs/Vehicle/link.png b/Components/Traffic/NPCs/Vehicle/link.png
new file mode 100644
index 0000000000..ddf55180f5
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/link.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/link_2.png b/Components/Traffic/NPCs/Vehicle/link_2.png
new file mode 100644
index 0000000000..e328c3f958
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/link_2.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/lod.png b/Components/Traffic/NPCs/Vehicle/lod.png
new file mode 100644
index 0000000000..2cb7f2c52d
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/lod.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/materials.png b/Components/Traffic/NPCs/Vehicle/materials.png
new file mode 100644
index 0000000000..94b60a9053
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/materials.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/prefab.png b/Components/Traffic/NPCs/Vehicle/prefab.png
new file mode 100644
index 0000000000..ef22ebe0c2
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/prefab.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/prefab_link.png b/Components/Traffic/NPCs/Vehicle/prefab_link.png
new file mode 100644
index 0000000000..fee3f44019
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/prefab_link.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/rigidbody.png b/Components/Traffic/NPCs/Vehicle/rigidbody.png
new file mode 100644
index 0000000000..48c9c2d938
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/rigidbody.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/script.png b/Components/Traffic/NPCs/Vehicle/script.png
new file mode 100644
index 0000000000..f1d990ee47
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/script.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/script_axle.png b/Components/Traffic/NPCs/Vehicle/script_axle.png
new file mode 100644
index 0000000000..b282ece911
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/script_axle.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/script_lights.png b/Components/Traffic/NPCs/Vehicle/script_lights.png
new file mode 100644
index 0000000000..323e3ca19f
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/script_lights.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/traffic_link.png b/Components/Traffic/NPCs/Vehicle/traffic_link.png
new file mode 100644
index 0000000000..1b6d2d1674
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/traffic_link.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/vehicles.png b/Components/Traffic/NPCs/Vehicle/vehicles.png
new file mode 100644
index 0000000000..982fd8e983
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/vehicles.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/wheel_collider.png b/Components/Traffic/NPCs/Vehicle/wheel_collider.png
new file mode 100644
index 0000000000..67ed829cac
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/wheel_collider.png differ
diff --git a/Components/Traffic/NPCs/Vehicle/wheel_collider_example.png b/Components/Traffic/NPCs/Vehicle/wheel_collider_example.png
new file mode 100644
index 0000000000..ad83fe1df0
Binary files /dev/null and b/Components/Traffic/NPCs/Vehicle/wheel_collider_example.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/environment_components.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/environment_components.png
new file mode 100644
index 0000000000..f0bba5159f
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/environment_components.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/index.html b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/index.html
new file mode 100644
index 0000000000..74022105ea
--- /dev/null
+++ b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/index.html
@@ -0,0 +1,1972 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Random Traffic Environment - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This document describes the steps to properly configuer RandomTrafficSimulator in your environment.
+
Map preparation
+
The 3D map model should be added to the scene. Please make sure that the Environment component with appropriate mgrsOffsetPosition is attached to the root GameObject.
+
+
Annotate Traffic Lights
+
Please attach TrafficLight component to all traffic light GameObjects placed on scene.
+
+
Load Lanelet
+
The lanelet load process can be performed by opening AWSIM -> Random Traffic -> Load Lanelet at the top toolbar of Unity Editor.
+
+
You should be prompted with a similar window to the one presented below. Please adjust the parameters for the loading process if needed.
+
+
Waypoint settings affect the density and accuracy of the generated waypoints. The parameters are described below:
+
+
Resolution: resolution of resampling. Lower values provide better accuracy at the cost of processing time.
+
Min Delta Length: minimum length(m) between adjacent points.
+
Min Delta Angle: minimum angle(deg) between adjacent edges. Lowering this value produces a smoother curve.
+
+
To generate the Lanelet2 map representation in your simulation, please click the Load button. Environment components should be generated and placed as child objects of the Environment GameObject. You can check their visual representation by clicking consecutive elements in the scene hierarchy.
+
+
Annotate Traffic Intersections
+
+
To annotate intersection please, add an empty GameObject named TrafficIntersections at the same level as the TrafficLanes GameObject.
+
For each intersection repeat the following steps:
+
+
Add an GameObject named TrafficIntersection as a child object of the TrafficIntersections object.
+
Attach a TrafficIntersection component to it.
+
Add a BoxCollider as a component of GameObject. It's size and position should cover the whole intersection. This is used for detecting vehicles in the intersection.
+
Set TrafficLightGroups. Each group is controlled to have different signals, so facing traffic lights should be added to the same group. These groupings are used in traffic signal control.
+
Specify the signal control pattern.
+
+
Annotate right of ways on uncontrolled intersections
+
For the vehicles to operate properly it is needed to annotate the right of way of TrafficLane manually on intersections without traffic lights.
+
+
To set the right of way, please:
+
+
Select a straight lane that is not right of way in the intersection. The selected lane should be highlighted as presented below.
+
Click the Set RightOfWays button to give the lane priority over other lanes.
+
+
Please check if all lanes that intersect with the selected lane are highlighted yellow. This means that the right of way was applied correctly.
+
+
+
Annotate stop lines
+
For each right turn lane that yields to the opposite straight or left turn lane, a stop line needs to be defined near the center of the intersection.
+
+If there is no visible stop line, a StopLine component should be added to the scene, near the center of the intersection and associated with TrafficLane.
+
Check final configuration
+
Once all the components are ready, the simulation can be run.
+Check carefully if the vehicles are moving around the map correctly.
+For each intersection, review the settings of the relevant components if vehicles are unable to proceed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/lanelet_loader_window.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/lanelet_loader_window.png
new file mode 100644
index 0000000000..0224deda3a
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/lanelet_loader_window.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/load_lanelet.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/load_lanelet.png
new file mode 100644
index 0000000000..163b90affb
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/load_lanelet.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/load_lanelet_menu.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/load_lanelet_menu.png
new file mode 100644
index 0000000000..755f361e1b
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/load_lanelet_menu.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/map.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/map.png
new file mode 100644
index 0000000000..aee44754df
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/map.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/right_of_ways.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/right_of_ways.png
new file mode 100644
index 0000000000..83ddf658c1
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/right_of_ways.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/select_traffic_light.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/select_traffic_light.png
new file mode 100644
index 0000000000..a58d70fe5e
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/select_traffic_light.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/set_right_of_way.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/set_right_of_way.png
new file mode 100644
index 0000000000..1226bdaa26
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/set_right_of_way.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/stop_lines.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/stop_lines.png
new file mode 100644
index 0000000000..78406360e0
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/stop_lines.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/traffic_intersection.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/traffic_intersection.png
new file mode 100644
index 0000000000..15ee42b77c
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/traffic_intersection.png differ
diff --git a/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/traffic_light.png b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/traffic_light.png
new file mode 100644
index 0000000000..144e33644b
Binary files /dev/null and b/Components/Traffic/RandomTraffic/AddRandomTrafficEnvironment/traffic_light.png differ
diff --git a/Components/Traffic/RandomTraffic/RandomTrafficSimulator/gizmos.png b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/gizmos.png
new file mode 100644
index 0000000000..26fa4e5edc
Binary files /dev/null and b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/gizmos.png differ
diff --git a/Components/Traffic/RandomTraffic/RandomTrafficSimulator/index.html b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/index.html
new file mode 100644
index 0000000000..ddcd3e5432
--- /dev/null
+++ b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/index.html
@@ -0,0 +1,2003 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Random Traffic Simulator - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The RandomTrafficSimulator simulates city traffic with respect to all traffic rules. The system allows for random selection of car models and the paths they follow. It also allows adding static vehicles in the simulation.
+
+
Getting Started
+
Overview
+
The random traffic system consists of the following components:
+
+
RandomTrafficSimulator: manages lifecycle of NPCs and simulates NPC behaviours.
+
TrafficLane, TrafficIntersection and StopLine: represent traffic entities
+
NPCVehicle: vehicle models (NPCs) controlled by RandomTrafficSimulator
+
+
+
Components Settings
+
The following section describes Unity Editor components settings.
+
Random Traffic Simulator
+
+
+
+
+
Parameter
+
Description
+
+
+
+
+
General Settings
+
+
+
+
Seed
+
Seed value for random generator
+
+
+
Ego Vehicle
+
Transform of ego vehicle
+
+
+
Vehicle Layer Mask
+
LayerMask that masks only vehicle(NPC and ego) colliders
+
+
+
Ground Layer Mask
+
LayerMask that masks only ground colliders of the map
+
+
+
Culling Distance
+
Distance at which NPCs are culled relative to EgoVehicle
+
+
+
Culling Hz
+
Culling operation cycle
+
+
+
NPC Vehicle Settings
+
+
+
+
Max Vehicle Count
+
Maximum number of NPC vehicles to be spawned in simulation
+
+
+
NPC Prefabs
+
Prefabs representing controlled vehicles. They must have NPCVehicle component attached.
+
+
+
Spawnable Lanes
+
TrafficLane components where NPC vehicles can be spawned during traffic simulation
+
+
+
Vehicle Config
+
Parameters for NPC vehicle control Sudden Deceleration is a deceleration related to emergency braking
+
+
+
Debug
+
+
+
+
Show Gizmos
+
Enable the checkbox to show editor gizmos that visualize behaviours of NPCs
+
+
+
+
Gizmos
+
Gizmos are useful for checking current behavior of NPCs and its causes.
+Gizmos have a high computational load so please disable them if the simulation is laggy.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Traffic/RandomTraffic/RandomTrafficSimulator/inspector.png b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/inspector.png
new file mode 100644
index 0000000000..8a523f7e77
Binary files /dev/null and b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/inspector.png differ
diff --git a/Components/Traffic/RandomTraffic/RandomTrafficSimulator/overview.png b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/overview.png
new file mode 100644
index 0000000000..6cca06714f
Binary files /dev/null and b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/overview.png differ
diff --git a/Components/Traffic/RandomTraffic/RandomTrafficSimulator/play.png b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/play.png
new file mode 100644
index 0000000000..6758b30387
Binary files /dev/null and b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/play.png differ
diff --git a/Components/Traffic/RandomTraffic/RandomTrafficSimulator/random_traffic.png b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/random_traffic.png
new file mode 100644
index 0000000000..e459a4a3da
Binary files /dev/null and b/Components/Traffic/RandomTraffic/RandomTrafficSimulator/random_traffic.png differ
diff --git a/Components/Traffic/TrafficComponents/gizmos.png b/Components/Traffic/TrafficComponents/gizmos.png
new file mode 100644
index 0000000000..26fa4e5edc
Binary files /dev/null and b/Components/Traffic/TrafficComponents/gizmos.png differ
diff --git a/Components/Traffic/TrafficComponents/index.html b/Components/Traffic/TrafficComponents/index.html
new file mode 100644
index 0000000000..7ffd7f578b
--- /dev/null
+++ b/Components/Traffic/TrafficComponents/index.html
@@ -0,0 +1,2774 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Traffic Components - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
It is a top level interface meant to be used on the Unity scene.
+TrafficManager runs all elements needed for a successful traffic simulation.
+This component manages all TrafficSimulators so they don't work against each other.
+It gives you the possibility to configure the TrafficSimulators.
+
+
+
TrafficSimulator
+
Technically it is not a component, it is crucial to understand what it is and what it does in order to correctly configure the TrafficManager.
+TrafficSimulator manages NPCVehicles spawning.
+There can be many TrafficSimulators on the scene.
+They are added and configured in the TrafficManager component.
+Every TrafficSimulator manages some part of the traffic it is responsible for - meaning it has spawned the NPCVehicles and set their configuration.
+
+
RandomTrafficSimulator - spawns and controls NPCVehicles driving randomly
+
RouteTrafficSimulator - spawns and controls NPCVehicles driving on a defined route
+
+
+
TrafficSimulator inaccessibility
+
It is not possible to get direct access to the TrafficSimulator.
+It should be added and configured through the TrafficManager component.
These components represent traffic entities.
+They are used to control and manage the traffic with respect to traffic rules and current road situation.
The vehicle models (NPCs) spawned by one of the TrafficSimulators.
+They are spawned according to the TrafficSimulator configuration and either drive around the map randomly (when spawned by a RandomTrafficSimulator) or follow the predefined path (when spawned by a RouteTrafficSimulator).
+NPCVehicles are managed by one central knowledge base.
+
+
+
The process of spawning a NPCVehicle and its later behavior control is presented on the following sequence diagram.
+
+
+
+
+
Sequence Diagram Composition
+
Please note that the diagram composition has been simplified to the level of GameObjects and chosen elements of the GameObjects for the purpose of improving readability.
+
+
Lanelet2
+
Lanelet2 is a library created for handling a map focused on automated driving.
+It also supports ROS and ROS2 natively.
+In AWSIMLanelet2 is used for reading and handling a map of all roads.
+Specifically it does contain all TrafficLanes and StopLines.
+You may also see us referring to the actual map data file (*.osm) as a Lanelet2.
are named RandomTrafficSimulator.
+Keep this in mind when reading the following page - so you don't get confused.
+
+
RandomTrafficSimulator simulates traffic with respect to all traffic rules. The system allows for random selection of car models and the paths they follow. It also allows adding static vehicles in the simulation.
+
Link in the default Scene
+
+
The RandomTrafficSimulator consists of several GameObjects.
+
+
RandomTrafficSimulator - this is an Object consisting of a Traffic Manager (script).
+ You can learn more about it here.
+
TrafficIntersections - this is a parent Object for all TrafficIntersections.
+ You can learn more about it here.
+
TrafficLanes - this is a parent Object for all TrafficLanes.
+ You can learn more about it here.
+
StopLines - this is a parent Object for all StopLines.
+ You can learn more about it here.
+
+
Components
+
+
RandomTrafficSimulator only has one component: Traffic Manager (script) which is described below.
+
TrafficManager (script)
+
+
Traffic Manager (script) is responsible for all of top level management of the NPCVehicles.
+It managed spawning of NPCVehicles on TrafficLanes.
+
TrafficManager uses the concept of TrafficSimulators.
+One TrafficSimulator is responsible for managing its set of NPCVehicles.
+Every TrafficSimulator spawns its own NPCVehicles independently.
+The vehicles spawned by one TrafficSimulator do respect its configuration.
+TrafficSimulators can be interpreted as NPCVehicle spawners with different configurations each.
+Many different TrafficSimulators can be added to the TrafficManager.
+
If a random mode is selected (RandomTrafficSimulator) then NPCVehicles will spawn in random places (from the selected list) and drive in random directions.
+To be able to reproduce the behavior of the RandomTrafficSimulator a Seed can be specified - which is used for the pseudo-random numbers generation.
+
TrafficManager script also configures all of the spawned NPCVehicles, so that they all have common parameters
+
+
Acceleration - the acceleration used by the vehicles at all times when accelerating.
+
Deceleration - the value of deceleration used in ordinary situations.
+
Sudden Deceleration - deceleration used when standard Deceleration is not sufficient to avoid accident.
+
Absolute Deceleration - value of deceleration used when no other deceleration allows to avoid the accident.
+
+
The Vehicle Layer Mask and Ground Layer Mask are used to make sure all vehicles can correctly interact with the ground to guarantee simulation accuracy.
+
Max Vehicle Count specifies how many NPCVehicles can be present on the scene at once.
+When the number of NPCVehicles on the scene is equal to this value the RandomTrafficSimulator stops spawning new vehicles until some existing vehicles drive away and disappear.
+
The EgoVehicle field provides the information about Ego vehicle used for correct behavior ofNPCVehicleswhen interacting with Ego.
+
Show Gizmos checkbox specifies whether the Gizmos visualization should be displayed when running the simulation.
+
+
Gizmos performance
+
Gizmos have a high computational load.
+Enabling them may cause the simulation to lag.
+
+
As mentioned earlier - TrafficManager may contain multiple TrafficSimulators.
+The two available variants of TrafficSimulator are described below
TrafficSimulators should be interpreted as spawning configurations for some group of NPCVehicles on the scene.
+
Random Traffic
+
+
When using RandomTrafficSimulator the NPCVehicle prefabs (NPC Prefabs) can be chosen as well as Spawnable Lanes.
+The later are the only TrafficLanes on which the NPCVehicles can spawn.
+Upon spawning one of the Spawnabe Lanes is chosen and - given the vehicle limits are not reached - one random NPCVehicle from the Npc prefabs list is spawned on that lane.
+After spawning, the NPCVehicle takes a random route until it drives out of the map - then it is destroyed.
+
The Maximum Spawns field specifies how many Vehicles should be spawned before this TrafficSimulator stops working.
+Set to 0 to disable this restriction.
+
Route Traffic
+
+
When using Route traffic Simulator the NPCVehicle prefabs (NPC Prefabs) as well as Route can be chosen.
+The later is an ordered list of TrafficLanes that all spawned vehicles will drive on.
+Given the vehicle limit is not reached - the RouteTrafficSimulator will spawn one of the Npc Prefabs chosen randomly on the first Route element (Element 0).
+After the first vehicle drives off the next one will spawn according to the configuration.
+It is important for all Route elements to be connected and to be arranged in order of appearance on the map.
+The NPCVehicle disappears after completing the Route.
+
The Maximum Spawns field specifies how many Vehicles should be spawned before this TrafficSimulator stops working.
+Set to 0 to disable this restriction.
+
Parameter explanation
+
+
+
+
Parameter
+
Description
+
+
+
+
+
General Settings
+
+
+
+
Seed
+
Seed value for random generator
+
+
+
Ego Vehicle
+
Transform of ego vehicle
+
+
+
Vehicle Layer Mask
+
LayerMask that masks only vehicle(NPC and ego) colliders
+
+
+
Ground Layer Mask
+
LayerMask that masks only ground colliders of the map
+
+
+
Culling Distance
+
Distance at which NPCs are culled relative to EgoVehicle
+
+
+
Culling Hz
+
Culling operation cycle
+
+
+
NPCVehicle Settings
+
+
+
+
Max Vehicle Count
+
Maximum number of NPC vehicles to be spawned in simulation
+
+
+
NPC Prefabs
+
Prefabs representing controlled vehicles. They must have NPCVehicle component attached.
+
+
+
Spawnable Lanes
+
TrafficLane components where NPC vehicles can be spawned during traffic simulation
+
+
+
Vehicle Config
+
Parameters for NPC vehicle control Sudden Deceleration is a deceleration related to emergency braking
+
+
+
Debug
+
+
+
+
Show Gizmos
+
Enable the checkbox to show editor gizmos that visualize behaviours of NPCs
+
+
+
+
Traffic Light (script)
+
+
+
Traffic Light (script) is a component added to every TrafficLight on the scene.
+It is responsible for configuring the TrafficLight behavior - the bulbs and their colors.
+
The Renderer filed points to the renderer that should be configured - in this case it is always a TrafficLight renderer.
+
Bulbs Emission Config is a list describing available colors for this Traffic Light.
+Every element of this list configures the following
+
+
Bulb Color - the name of the configured color that will be used to reference this color
+
Color - the actual color with which a bulb should light up
+
Intensity - the intensity of the color
+
Exposure Weight - how bright should the color be when lighting up
+
+
The Bulb Material Config is a list of available bulbs in a given Traffic Light.
+Every element describes a different bulb.
+Every bulb has the following aspects configured
+
+
Bulb Type - the name that will be usd to reference the configured bulb
+
Material Index - The index of a material of the configured bulb.
+ This is an index of a sub-mesh of the configured bulb in the Traffic Light mesh.
+ The material indices are described in detail here and here.
+
+
TrafficIntersections
+
+
TrafficIntersection is a representation of a road intersection.
+It consists of several components.
+TrafficIntersection is used in the Scene for managing TrafficLights.
+All Traffic Lights present on one Traffic Intersection must be synchronized - this is why the logic of TrafficLight operation is included in the TrafficIntersection.
+
Link in the default Scene
+
+
Every TrafficIntersection has its own GameObject and is added as a child of the aggregate TrafficIntersectionsObject.
+TrafficIntersections are elements of an Environment, so they should be placed as children of an appropriate EnvironmentObject.
+
Components
+
+
TrafficIntersection has the following components:
+
+
Box Collider - marks the area of the Traffic Intersection, it should cover the whole intersection area
+
Traffic Intersection (script) - controls all Traffic Lights on the given intersection according to the configuration
+
+
Collider
+
+
Every TrafficIntersection contains a Box Collider element.
+It needs to accurately cover the whole area of the TrafficIntersection.
+Box Collider - together with the Traffic Intersection (script) - is used for detecting vehicles entering the TrafficIntersection.
+
Traffic Intersection (script)
+
+
Traffic Intersection (script) is used for controlling all TrafficLights on a given intersection.
+The Collider Mask field is a mask on which all Vehicle Colliders are present.
+It - together with Box Collider - is used for keeping track of how many Vehicles are currently present on the Traffic Intersection.
+The Traffic Light Groups and Lighting Sequences are described below.
+
Traffic Light Groups
+
+
Traffic Light Group is a collection of all Traffic Lights that are in the same state at all times.
+This includes all redundant Traffic Lights shining in one direction as well as the ones in the opposite direction.
+In other words - as long as two Traffic Lights indicate exactly the same thing they should be added to the same Traffic Light Group.
+This grouping simplifies the creation of Lighting Sequences.
+
Lighting Sequences
+
+
Lighting Sequences is the field in which the whole intersection Traffic Lights logic is defined.
+It consists of many different Elements.
+Each Element is a collection of Orders that should take an effect for the period of time specified in the Interval Sec field.
+Lighting SequencesElements are executed sequentially, in order of definition and looped - after the last element sequence goes back to the first element.
+
The Group Lighting Orders field defines which Traffic Light Groups should change their state and how.
+For every Group Lighting OrdersElement the Traffic Lights Group is specified with the exact description of the goal state for all Traffic Lights in that group - which bulb should light up and with what color.
+
One Lighting SequencesElement has many Group Lighting Orders, which means that for one period of time many different orders can be given.
+E.g. when Traffic Lights in one direction change color to green - Traffic Lights in the parallel direction change color to red.
+
+
Traffic Light state persistance
+
If in the given Lighting SequencesElement no order is given to some Traffic Light Group - this Group will keep its current state.
+When the next Lighting SequencesElement activates - the given Traffic Light Group will remain in an unchanged state.
+
+
+Lighting Sequence Sample - details
+
+
+
Description
+
Editor
+
+
+
+ Traffic Lights in Pedestrian Group 1 change color to flashing green.
+ Other Groups keep their current state.
+ This state lasts for 5 seconds.
+
+
+
+
+
+ Traffic Lights in Pedestrian Group 1 change color to solid red.
+ Other Groups keep their current state.
+ This state lasts for 1 second.
+
+
+
+
+
+ Traffic Lights in Vehicle Group 1 change color to solid yellow.
+ Other Groups keep their current state.
+ This state lasts for 5 seconds.
+
+
+
+
+
+ Traffic Lights in Vehicle Group 1 change color to solid red.
+ Other Groups keep their current state.
+ This state lasts for 3 seconds.
+
+
+
+
+
+ Traffic Lights in Vehicle Group 2 change color to solid green.
+ Traffic Lights in Pedestrian Group 2 change color to solid green.
+ Other Groups keep their current state.
+ This state lasts for 15 seconds.
+
+
+
+
+
+ Traffic Lights in Pedestrian Group 2 change color to flashing green.
+ Other Groups keep their current state.
+ This state lasts for 5 seconds.
+
+
+
+
+
+ Traffic Lights in Pedestrian Group 2 change color to solid red.
+ Other Groups keep their current state.
+ This state lasts for 1 second.
+
+
+
+
+
+ Traffic Lights in Vehicle Group 2 change color to solid yellow.
+ Other Groups keep their current state.
+ This state lasts for 5 seconds.
+
+
+
+
+
+ Traffic Lights in Vehicle Group 2 change color to solid red.
+ Other Groups keep their current state.
+ This state lasts for 3 second.
+ Sequence loops back to the first element of the list.
+
+
+
+
+
+
TrafficLanes
+
+
TrafficLane is a representation of a short road segment.
+It consists of several waypoints that are connected by straight lines.
+TrafficLanes are used as a base for a RandomTrafficSimulator.
+They allow NPCVehicles to drive on the specific lanes on the road and perform different maneuvers with respect to the traffic rules.
+TrafficLanes create a network of drivable roads when connected.
+
Link in the default Scene
+
+
Every TrafficLane has its own GameObject and is added as a child of the aggregate TrafficLanesObject.
+TrafficLanes are an element of an Environment, so they should be placed as children of an appropriate EnvironmentObject.
+
TrafficLanes can be imported from the lanelet2*.osm file.
TrafficLane has a transformation property - as every Object in Unity - however it is not used in any way.
+All details are configured in the Traffic Lane (script), the information in Object transformation is ignored.
+
Traffic Lane (script)
+
+
Traffic Lane (script) defines the TrafficLane structure.
+The Waypoints field is an ordered list of points that - when connected with straight lines - create a TrafficLane.
+
+
Traffic Lane (script) coordinate system
+
Waypoints are defined in the Environment coordinate system, the transformation of GameObject is ignored.
+
+
Turn Direction field contains information on what is the direction of this TrafficLane - whether it is a right or left turn or straight road.
+
Traffic lanes are connected using Next Lanes and Prev Lanes fields.
+This way individual TrafficLanes can create a connected road network.
+One Traffic Lane can have many Next Lanes and Prev Lanes.
+This represents the situation of multiple lanes connecting to one or one lane splitting into many - e.g. the possibility to turn and to drive straight.
Every TrafficLane has to have a Stop Line field configured when the Stop Line is present on the end of the TrafficLane.
+Additionally the Speed Limit field contains the highest allowed speed on given TrafficLane.
+
Right Of Way Lanes
+
+
Right Of Way Lanes is a collection of TrafficLanes.
+Vehicle moving on the given TrafficLane has to give way to all vehicles moving on every Right Of Way Lane.
+It is determined based on basic traffic rules.
+Setting Right Of Way Lanes allows RandomTrafficSimulator to manage all NPCVehicles so they follow traffic rules and drive safely.
+
In the Unity editor - when a TrafficLane is selected - aside from the selected TrafficLane highlighted in blue, all Right Of Way Lanes are highlighted in yellow.
+
+
Right Of Way Lanes Sample - details
+
The selected TrafficLane (blue) is a right turn on an intersection.
+This means, that before turning right the vehicle must give way to all vehicles driving from ahead - the ones driving straight as well as the ones turning left.
+This can be observed as TrafficLanes highlighted in yellow.
+
+
+
StopLines
+
+
StopLine is a representation of a place on the road where vehicles giving way to other vehicles should stop and wait.
+They allow RandomTrafficSimulator to manage NPCVehicles in safe and correct way - according to the traffic rules.
+All possible locations where a vehicle can stop in order to give way to other vehicles - that are enforced by an infrastructure, this does not include regular lane changing - need to be marked with StopLines.
+
Link in the default Scene
+
+
Every StopLine has its own GameObject and is added as a child of the aggregate StopLinesObject.
+Stop Lines are an element of an Environment, so they should be placed as children of an appropriate EnvironmentObject.
+
StopLines can be imported from the lanelet2*.osm file.
Stop Line has a transformation property - as every Object in Unity - however it is not used in any way.
+All details are configured in the Traffic Lane (script), the information in Object transformation is ignored.
+
Stop Line (script)
+
+
Stop Line (script) defines StopLine configuration.
+The Points field is an ordered list of points that - when connected - create a StopLine.
+The list of points should always have two elements that create a straight StopLine.
+
+
Stop Line (script) coordinate system
+
Points are defined in the Environment coordinate system, the transformation of GameObject is ignored.
+
+
The Has Stop Sign field contains information whether the configured StopLine has a corresponding StopSign on the scene.
+
Every Stop Line needs to have a Traffic Light field configured with the corresponding Traffic Light.
+This information allows the RandomTrafficSimulator to manage the NPCVehicles in such a way that they respect the Traffic Lights and behave on the Traffic Intersections correctly.
+
Gizmos
+
+
Gizmos are a in-simulation visualization showing current and future moves of the NPCVehicles.
+They are useful for checking current behavior of NPCs and its causes.
+On the Scene they are visible as cuboid contours indicating which TrafficLanes will be taken by each vehicle in the near future.
+
+
Gizmos computing
+
Gizmos have a high computational load.
+Please disable them if the simulation is laggy.
In this tutorial we will create a new EgoVehicle.
+To learn more about what an EgoVehicle is in AWSIM please visit Ego Vehicle description page.
+
+
Cerate an Object
+
Add a child Object to the Simulation called EgoVehicle.
+
+
Add a Rigidbody
+
+
+
While having a newly created EgoVehicleObject selected, in the Inspector view click on the 'Add Component' button, search for Rigidbody and select it.
+
+
+
+
+
Configure Mass and Drag with the correct values for your Vehicle.
+
+
+
+
Configure Interpolation and Collision Detection.
+
+
+
+
Add visual elements
+
For a detailed explanation hwo to add visual elements of your Vehicle check out this dedicated tutorial.
+
Add a Canter of Mass
+
To add a center of mass to your vehicle you have to add a CoM child Object to the EgoVehicleObject (the same as in steps before).
+
Then just set the position of the CoMObject in the Inspector view to represent real-world center of mass of the Vehicle.
+
+
+How do I know what is the Center of Mass of my Vehicle
+
The best way is to obtain a Center of Mass information from your Vehicle documentation.
+
However, if this is not possible, you can try to estimate the Center of Mass of your vehicle.
+Best practice is to set the estimated Center of Mass as the following
+
+
Evenly between the axles of the Vehicle
+
Right in the middle of the Vehicles width
+
Somewhere in the neighborhood of a quarter of the Vehicle height
+
+
Note: This will vary very much depending on your Vehicle construction.
+For the best possible result please follow the Vehicle specifications.
+
+
Add a Reflection Probe
+
+
+
Add a new Object called Reflection Probe as a child to the EgoVehicleObject.
+
+
+
+
Click on the 'Add Component' button, in the windows that pops-up search for Reflection Probe and select it.
+
+
+
Note
+
Please note that with Reflection Probe there should also be automatically added a `HD Additional Reflection Data Script.
+
+
+
+
+
Configure the Reflection Probe as you wish.
+
+
Example Configuration
+
Below you can see an example configuration of the Reflection Probe.
+
+
+
+
+
Add Colliders
+
For a detailed explanation how to add colliders to your Vehicle check out this dedicated tutorial.
+
Add a base for sensors (URDF)
+
You will most certainly want to add some sensors to your EgoVehicle.
+First you need to create a parent Object for all those sensors called URDF.
+To do this we will add a child ObjectURDF to the EgoVehicleObject.
+
+
This Object will be used as a base for all sensors we will add later.
+
Add a Vehicle Script
+
To be able to control your EgoVehicle you need a Vehicle Script.
+
+
+
Add the Vehicle Script to the EgoVehicleObject.
+
+
+
+
+
Configure the Vehicle Script Axle Settings and Center Of Mass Transform.
+
+
+
+
+
Testing
+
It is not possible to test this Script alone, but you can test the following
If components listed above work correctly this means the Vehicle Script works correctly too.
+
+
Add a Vehicle Keyboard Input Script
+
You can control your EgoVehicle in the simulation manually with just one Script called Vehicle Keyboard Input.
+
If you want to add it just click the 'Add Component' button on the EgoVehicleObject and search for Vehicle Keyboard Input Script and select it.
+
+
Add a Vehicle Visual Effect Script
+
For a visual indication of a Vehicle status you will need a Vehicle Visual Effect Script.
+To add and configure it follow the steps below.
+
+
+
Add a Vehicle Visual Effect Script by clicking 'Add Component' button, searching for it and selecting it.
+
+
+
+
Configure the lights.
+
+
Note
+
In this step we will configure only Brake Lights, but should repeat this for every Light.
+The process is almost the same for all Lights - just change the mesh renderer and lighting settings according to your preference.
+
+
+
+
+
How to test
+
After configuring Vehicle Visual Effect Script it is advised to test whether everything works as expected.
If your scene does not have any models yet please turn the gravity off in Rigidbody configuration so that the Vehicle does not fall down into infinity.
+
+
+
+
Start the simulation.
+
+
+
+
Test the Turn Signals.
+
You can control the Turn Signals with a Vehicle Keyboard Input Script.
+Activate the Turn Signals with one of the following keys
+
+
1 - Left Turn Signal
+
2 - Right Turn Signal
+
3 - Hazard Lights
+
4 - Turn Off all Signals
+
+
+
+
+
Test the Lights.
+
You can control the lights by "driving" the Vehicle using Vehicle Keyboard Input Script.
+Although if you have an empty Environment like in this tutorial the Vehicle won't actually drive.
+
To test Brake Lights change the gear to Drive by pressing D on the keyboard and activate braking by holding arrow down.
+
To test the Reverse Light change the gear to Reverse by pressing R on the keyboard.
+The Reverse Light should turn on right away.
+
+
+
+
+
Camera tip
+
If you have not configured a camera or configured it in such a way that you can't see the Vehicle well you can still test most of the lights by changing views.
+
+
Turn the Light (or Signal) on by pressing the appropriate key
+
Move to the Scene View by pressing ctrl + 1 - now you can move the camera freely
+
To change the Lights you need to go back to Game View by pressing ctrl + 2
+
+
Pleas note that this method won't work for testing Brake Lights, as for them to work you need to keep the arrow down button pressed all the time.
+
+
Add a Vehicle Ros Input Script
+
For controlling your Vehicle with autonomous driving software (e.g. Autoware) you need a Vehicle Ros Input Script.
+
+
Disable Vehicle Keyboard Input Script
+
If you have added a Vehicle Keyboard Input Script in your Vehicle please disable it when using the Vehicle Ros Input Script.
+
Not doing so will lead to the vehicle receiving two different inputs which will cause many problems.
+
+
+
Add it to the EgoVehicleObject by clicking on the 'Add Component' button, searching for it and selecting it.
+
+
The Script is configured to work with Autoware by default, but you can change the topics and Quality of Service settings as you wish.
+
+
Note
+
The Vehicle should be configured correctly, but if you have many Vehicles or something goes wrong, please select the right Vehicle in the Vehicle field by clicking on the small arrow icon and choosing the right item from the list.
+
+
How to test
+
The best way to test the Vehicle Ros Input Script is to run Autoware.
Next you need to add Colliders to your Vehicle.
+To do this follow the steps below.
+
+
+
Add a child Object called Colliders to the EgoVehicleObject.
+
+
+
+
Shift parent ObjectColliders accordingly as in earlier steps where we shifted Models.
+
+
+
Add a Vehicle Collider
+
+
+
Add a child ObjectCollider to the CollidersObject.
+
+
+
+
Add a Mesh Collider component to the ColliderObject by clicking on the 'Add Component' button in the Inspector view and searching for it.
+
+
+
+
Click on the arrow in mesh selection field and from the pop-up window select your collider mesh.
+ Next click on the check-box called Convex, by now your collider mesh should be visible in the editor.
+
+
+
+
Add Wheel Colliders
+
+
+
Add a child ObjectWheels to the CollidersObject.
+
+
+
+
+
Note
+
In this tutorial we will add only one wheel collider, but you should repeat the step for all 4 wheels.
+That is, follow the instructions that follow this message for every wheel your Vehicle has.
+
+
Front Left Wheel
+
Front Right Wheel
+
Rear Left Wheel
+
Rear Right Wheel
+
+
+
+
+
Add a child ObjectFrontLeftWheel to the WheelsObject.
+
+
+
+
Add a Wheel Collider component to the FrontLeftWheelObject by clicking 'Add Component' and searching for it.
+
+
+
+
Add a Wheel Script to the FrontLeftWheelObject by clicking 'Add Component' and searching for it.
+
+
+
+
Drag FrontLeftWheelObject from the WheelVisuals to the Wheel Visual Transform field.
+
+
+
+
Add a Wheel Collider Config Script to the FrontLeftWheelObject by clicking 'Add Component' and searching for it.
+
+
+
+
Configure the Wheel Collider Config Script so that the Vehicle behaves as you wish.
+
+
+
+
Set the Transform of FrontLeftWheelObject to match the visuals of your Vehicle.
+
+
+
+
+
Successful configuration
+
If you have done everything right your CollidersObject should look similar to the one following.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_add_component.gif b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_add_component.gif
new file mode 100644
index 0000000000..3019fc5335
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_add_component.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_config_script_add_component.gif b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_config_script_add_component.gif
new file mode 100644
index 0000000000..4c732ef7f4
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_config_script_add_component.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_config_script_configure.gif b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_config_script_configure.gif
new file mode 100644
index 0000000000..d2036b1d07
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_collider_config_script_configure.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddColliders/wheel_script_add_component.gif b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_script_add_component.gif
new file mode 100644
index 0000000000..9d5e054858
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_script_add_component.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddColliders/wheel_script_configure_transform2.gif b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_script_configure_transform2.gif
new file mode 100644
index 0000000000..d9f1ced584
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddColliders/wheel_script_configure_transform2.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddColliders/wheels_add_object.gif b/Components/Vehicle/AddNewVehicle/AddColliders/wheels_add_object.gif
new file mode 100644
index 0000000000..3d811d1577
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddColliders/wheels_add_object.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddSensors/base_link_add_object.gif b/Components/Vehicle/AddNewVehicle/AddSensors/base_link_add_object.gif
new file mode 100644
index 0000000000..994c76a57d
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddSensors/base_link_add_object.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddSensors/camera_component.png b/Components/Vehicle/AddNewVehicle/AddSensors/camera_component.png
new file mode 100644
index 0000000000..bad7129339
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddSensors/camera_component.png differ
diff --git a/Components/Vehicle/AddNewVehicle/AddSensors/camera_preview_example.gif b/Components/Vehicle/AddNewVehicle/AddSensors/camera_preview_example.gif
new file mode 100644
index 0000000000..20c030bf01
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddSensors/camera_preview_example.gif differ
diff --git a/Components/Vehicle/AddNewVehicle/AddSensors/camera_sensor_script.png b/Components/Vehicle/AddNewVehicle/AddSensors/camera_sensor_script.png
new file mode 100644
index 0000000000..ed471d3fb5
Binary files /dev/null and b/Components/Vehicle/AddNewVehicle/AddSensors/camera_sensor_script.png differ
diff --git a/Components/Vehicle/AddNewVehicle/AddSensors/index.html b/Components/Vehicle/AddNewVehicle/AddSensors/index.html
new file mode 100644
index 0000000000..19bdc4a044
--- /dev/null
+++ b/Components/Vehicle/AddNewVehicle/AddSensors/index.html
@@ -0,0 +1,2817 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add Sensors - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Best practice is to replicate a ROS sensors transformations tree in Unity using Objects.
+
Coordinate system conversion
+
Please note that Unity uses less common left-handed coordinate system.
+Please keep this in mind while defining transformations.
+More details about right-handed and left-handed systems can be found here.
+
To simplify the conversion process always remember that any point in ROS coordinate system (x, y, z) has an equivalent in the Unity coordinate system being (-y, z, x).
+
The same can be done with the rotation.
+ROS orientation described with roll, pitch and yaw (r, p, y) can be translated to Unity Rotation as follows (p, -y, -r).
+
+
Unit conversion
+
Please remember to convert the rotation units.
+ROS uses radians and Unity uses degrees.
+The conversion from radians (rad) to degrees (deg) is as follows.
+
deg = rad * 180 / PI
+
+
+
Add transformations tree
+
+
URDF
+
Before following this tutorial please make sure you have an URDFObject like it is shown shown in this section.
+
+
First we will have to add a base_link which is the root of all transformations.
+
Add a base_linkObject as a child to the URDFObject.
+
+
+
base_link transformation
+
Please remember to set an appropriate transformation of the base_linkObject so that it is identical as the base_link used in ROS in reference to the Vehicle.
+
This is very important, as a mistake here will result in all subsequent sensors being misplaced.
+
+
Inside the base_link we will represent all transformations contained in the ROS transformations tree.
+
You will have to check your Vehicle specific configuration.
+You can do this in many ways, for example:
+
+
+
Check the ROS specific .yaml parameter files containing information about each transformation.
+
+
Example
+
Here we see an example .yaml file containing transformation from the base_link to the sensor_kit_base_link:
Here we see an example command with the output containing transformation from the base_link to the sensor_kit_base_link (note that the line after $ sign is the executed command):
+
$ ros2 run tf2_ros tf2_echo base_link sensor_kit_base_link
+[INFO] [1686654712.339110702] [tf2_echo]: Waiting for transform base_link -> sensor_kit_base_link: Invalid frame ID "base_link" passed to canTransform argument target_frame - frame does not exist
+At time 0.0
+- Translation: [0.900, 0.000, 2.000]
+- Rotation: in Quaternion [-0.000, 0.008, -0.018, 1.000]
+- Rotation: in RPY (radian) [-0.001, 0.015, -0.036]
+- Rotation: in RPY (degree) [-0.057, 0.859, -2.086]
+- Matrix:
+0.999 0.036 0.015 0.900
+-0.036 0.999 0.000 0.000
+-0.015 -0.001 1.000 2.000
+0.000 0.000 0.000 1.000
+
+
+
+
+
Add one sensor link
+
+
Note
+
In this step we will only add one sensor link.
+You will have to repeat this step for every sensor you want to add to your Vehicle.
+
+
Let's say we want to add a LiDAR that is facing right.
We need to start adding these transformation from the root of the tree.
+We will start with the sensor_kit_base_link, as the base_link already exists in our tree.
+
+
+
The first step is to add an Object named the same as the transformation frame (sensor_kit_base_link).
+
+
+
+
Next we have to convert the transformation from ROS standard to the Unity standard.
+ This is done with the formulas show in this section.
+
The result of conversion of the coordinate systems and units is shown below.
Please keep in mind, that we have created the sensor links in order to have an accurate transformations for all of the sensors.
+This implies that the Sensor Object itself can not have any transformation.
+
If one of your Sensors, after adding it to the scene, is mispositioned, check whether the transformation is set to identity (position and rotation are zeros).
+
+
When adding sensors almost all of them will have some common fields.
+
+
+
Frame Id
+
Frame Id is the name of frame of reference against which the received data will be interpreted by the autonomous driving software stack.
+
Remember that the Frame Id must exist internally in the ROS transformations tree.
+
+
+
Topics
+
Topics are names of broadcasting channels.
+You can set the names of topics as you like and the data from sensors will be broadcasted on these topics.
+
Remember to configure your receiving end to listen on the same topics as broadcasting ones.
+
+
+
Quality Of Service settings (QOS settings)
+
Quality of service settings allow you to configure the behavior of the source node while broadcasting the sensor data.
+You can adjust these settings to suit your needs.
+
+
+
Add a Vehicle Status Sensor
+
To add a Vehicle Status Sensor to your Vehicle simply locate the following directory in the Project view and drag a prefab of this Sensor into the URDFObject.
+
Assets/AWSIM/Prefabs/Sensors
+
+
+
Next in the Inspector View select your Vehicle.
+
+
+ROS message example
+
In this example you can see what a valid message from the Vehicle Status Sensor can look like.
To add a LiDAR to your Vehicle you will have to drag a model of the LiDAR to the link tree you have created in the earlier step.
+
You can use the predefined RGL LiDAR models or any other LiDAR models.
+In this tutorial we will be using RGL VelodyneVLP16 LiDAR model.
+
Simply locate the following directory in the Project view and drag the prefab into the designated sensor link.
+
Assets/AWSIM/Prefabs/Sensors/RobotecGPULidars
+
+
+
+
LiDAR noise configuration
+
LiDAR Sensor in simulation is returning a perfect result data.
+This is not an accurate representation of the real-world.
+
LiDAR Sensor addresses this issue by applying a simulated noise to the output data.
+You can configure the noise parameters in the Inspector View under Configuration -> Noise Params fields.
+
You can optionally remove the noise simulation by unchecking the Apply Distance/Angular Gaussian Noise.
+
You can also change the ranges of the LiDAR detection.
+
+
There is also a possibility to configure the visualization of the Point Cloud generated by the LiDAR.
+E.g. change the hit-point shape and size.
+
+
+
+ROS message example
+
In this example you can see what a valid message from the LiDAR Sensor can look like.
To add a Camera Sensor to your Vehicle you will have to drag a model of the Camera to the link tree you have created in the earlier step.
+
Simply locate the following directory in the Project view and drag the prefab into the designated sensor link.
+
Assets/AWSIM/Prefabs/Sensors
+
+
+
You can configure some aspects of the Camera to your liking.
+
E.g. you can set the field of view (fov) of the camera by changing the Field of View field or manipulating the physical camera parameters like Focal Length.
+
+
The important thing is to configure the Camera Sensor Script correctly.
+
Always check whether the correct Camera Object is selected and make sure that Distortion Shader and Ros Image Shader are selected.
+
+
Example Camera Sensor Script configuration
+
+
+
You can add the live Camera preview onto the Scene.
+To do this select the Show checkbox.
+Additionally you can change how the preview is displayed.
+Change the Scale value to control the size of the preview (how many times smaller the preview will be compared to the actual screen size).
+
Move the preview on the screen by changing the X Axis and Y Axis values on the Image On Gui section.
+
+
Camera preview example
+
+
+
+
Testing camera with traffic light recognition
+
You can test the Camera Sensor traffic light recognition by positioning the vehicle on the Unity Scene in such a way that on the Camera preview you can see the traffic lights.
+
Remember to lock the Inspector view on Camera Object before dragging the whole Vehicle - this way you can see the preview while moving the vehicle.
To add a Pose Sensor to your Vehicle simply locate the following directory in the Project view and drag a prefab of this Sensor into the base_linkObject.
+
Assets/AWSIM/Prefabs/Sensors
+
+
+
+ROS message example
+
In this example you can see what a valid message from the Pose Sensor can look like.
Your EgoVehicle needs many individual visual parts.
+Below we will add all needed visual elements.
+
First in EgoVehicleObject add a child Object called Models.
+
+
Inside ModelsObject we will add all visual models of our EgoVehicle.
+
Add a Body
+
First you will need to add a Body of your Vehicle.
+It will contain many parts, so first lets create a Body parent Object.
+
+
Next we will need to add Car Body
+
+
+
Add a child ObjectBodyCar to the BodyObject.
+
+
+
+
To the BodyCarObject add a Mesh Filter.
+
Click on the 'Add Component' button, search for Mesh Filter and select it.
+Next search for mesh of your vehicle and select it in the Mesh field.
+
+
+
+
+
To the BodyCarObject add a Mesh Renderer.
+
Click on the 'Add Component' button, search for Mesh Filter and select it
+
+
+
+
+
Specify Materials.
+
You need to specify what materials will be used for rendering your EgoVehicle model.
+Do this by adding elements to the Materials list and selecting the materials you wish to use as shown below.
+
+
Add as many materials as your model has sub-meshes.
+
+
Tip
+
When you add too many materials, meaning there will be no sub-meshes to apply these materials to, you will see this warning.
+In such a case please remove materials until this warning disappears.
+
+
+
+
+
Add interactive Body parts
+
In this step we will add the following parts
+
+
Break light
+
Reverse Light
+
Right Turn Signal
+
Left Turn Signal
+
(optional) other visual elements required specifically by your Vehicle.
+
+
+
Info
+
It may seem like all of the elements above can be parts of the Body mesh, but it is important for these parts to be separate, because we need to be able to make them interactive (e.g. flashing turn signals).
+
Other good reason for having different meshes for Vehicle parts is that you have a Vehicle model, but for the simulation you need to add e.g. a roof rack with sensors - which can be achieved by adding more meshes.
+
+
+
Note
+
We will illustrate this step only for Break Light, but you should repeat this step of the tutorial for each element of the list above.
+
+
+
+
Add a child Object to the BodyObject.
+
+
+
+
Add a Mesh Filter and select the mesh (the same as in section before).
+
+
+
+
+
Add a Mesh Renderer and select the materials (the same as in section before).
+
+
+
+
+
Add Wheels
+
In this step we will add individual visuals for every wheel.
+This process is very similar to the one before.
+
+
+
Add a child Object to the ModelsObject called WheelVisuals.
+
+
+
+
+
Note
+
In this tutorial we will add only one wheel, but you should repeat the step for all 4 wheels.
+That is, follow the instructions that follow this message for every wheel your Vehicle has.
+
+
Front Left Wheel
+
Front Right Wheel
+
Rear Left Wheel
+
Rear Right Wheel
+
+
+
+
+
Add a child Object to the WheelVisualsObject called FrontLeftWheel.
+
+
+
+
Add a child Object to the FrontLeftWheelObject called WheelFrontL.
+ This Object will contain the actual wheel part.
+
+
+
+
Add a Mesh Filter and select the wheel mesh.
+
+
+
+
+
Add a Mesh Renderer and select the wheel materials.
+
+
+
+
+
+
Repeat the steps before to add Breaks.
+
The same way you have added the WheelFrontLObject now add the WheelFrontLBreaks.
+Naturally you will have to adjust the mesh and materials used as they will be different for breaks than for the wheel.
+
Your final break configuration should look similar to the one following.
+
+
+
+
Set the FrontLeftWheel parent Object transformation to position the wheel in correct place.
+
+
+
+
+
Successful configuration
+
If you have done everything right your WheelVisualsObject should look similar to the one following.
+
+
+
Move the models
+
The last step to correctly configure Vehicle models is to shift them so that the EgoVehicle origin is in the center of fixed axis.
+
This means you need to shift the whole ModelsObject accordingly (change the position fields in transformation).
+
+
Tip
+
Add a dummyObject as a child to the EgoVehicleObject (the same as in steps before) so it is located in the origin of the EgoVehicle.
+
Now move Models around relative to the dummy - change position in the Inspector view.
+The dummy will help you see when the fixed axis (in case of the Lexus from example it is the rear axis) is aligned with origin of EgoVehicle.
+
In the end delete the dummyObject as it is no longer needed.
EgoVehicle is a playable object that simulates a vehicle that can autonomously move around the scene.
+It has components (scripts) that make it possible to control it by keyboard or by Autoware (using ROS2 communication). Moreover, it provides sensory data needed for self-localization in space and detection of objects in the surrounding environment.
+
The default prefab EgoVehicle was developed using a Lexus RX450h 2015 vehicle model with a configured sample sensor kit.
+
+
+
Own EgoVehicle prefab
+
If you would like to develop your own EgoVehicle prefab, we encourage you to read this tutorial.
+
+
Supported features
+
This vehicle model was created for Autoware simulation, and assuming that Autoware has already created a gas pedal map,
+this vehicle model uses acceleration as an input value.
+It has the following features:
+
+
Longitudinal control by acceleration (\(\frac{m}{s^2}\)).
3D Mesh (*.fbx) as road surface for vehicle driving, gradient resistance.
+
+
+
AutowareSimulation
+
If you would like to see how EgoVehicle works or run some tests, we encourage you to familiarize yourself with the AutowareSimulation scene described in this section.
In order to standardize the documentation, the name EgoVehicle will be used in this section as the equivalent of the prefab named Lexus RX450h 2015 2015 Sample Sensor.
+
+
EgoVehicle prefab has the following content:
+
+
As you can see, it consists of 3 parents for GameObjects:
+
+
Models - aggregating visual elements,
+
Colliders - aggregating colliders,
+
URDF - aggregating sensors,
+
and 2 single GameObjects: CoM and Reflection Probe.
+
+
All objects are described in the sections below.
+
Visual elements
+
Prefab is developed using models available in the form of *.fbx files.
+The visuals elements have been loaded from the appropriate *.fbx file and are aggregated and added in object Models.
+
*.fbx file for Lexus RX450h 2015 is located under the following path:
As you can see, the additional visual element is XX1 Sensor Kit.
+
+
It was also loaded from the *.fbx file which can be found under the following path:
+
Assets/AWSIM/Models/Sensors/XX1 Sensor Kit.fbx
+
+
+
Lexus RX450h 2015.fbx
+
The content of a sample *.fbx file is presented below, all elements except Collider have been added to the prefab as visual elements of the vehicle.
+Collider is used as the Mesh source for the Mesh Collider in the BodyCollider object.
+
+
+
Link in the default Scene
+
The default scene contains a single Lexus RX450h 2015 Sample Sensor prefab that is added as a child of the EgoVehicleGameObject.
+
+
In EgoVehicle prefab, the local coordinate system of the vehicle (main prefab link) should be defined in the axis of the rear wheels projected onto the ground - in the middle of the distance between them.
+This aspect holds significance when characterizing the dynamics of the object, as it provides convenience in terms of describing its motion and control.
+
+
+
Components
+
+
There are several components responsible for the full functionality of Vehicle:
+
+
Rigidbody - ensures that the object is controlled by the physics engine in Unity - e.g. pulled downward by gravity.
+
Vehicle (script) - provides the ability to set the acceleration of the vehicle and the steering angle of its wheels.
Vehicle Ros Input (script) - provides the ability to set inputs in the Vehicle (script) via subscribed ROS2 topics (outputs from Autoware).
+
Vehicle Visual Effect - provides the ability to simulate vehicle lights, such as turn signals, brake lights, and hazard light.
+
+
Scripts can be found under the following path:
+
Assets/AWSIM/Scripts/Vehicles/*
+
+
Architecture
+
The EgoVehicle architecture - with dependencies - is presented on the following diagram.
+
+
The communication between EgoVehicle components is presented on two different diagrams - a flow diagram and a sequence diagram.
+
The flow diagram presents a flow of information between the EgoVehicle components.
+
+
The sequence diagram provides a deeper insight in how the communication is structured and what are the steps taken by each component.
+Some tasks performed by the elements are presented for clarification.
+
+
+
Sequence diagram
+
Please keep in mind, that Autoware message callbacks and the update loop present on the sequence diagram are executed independently and concurrently.
+One thing they have in common are resources - the Vehicle (script).
+
+
CoM
+
CoM (Center of Mass) is an additional link that is defined to set the center of mass in the Rigidbody.
+The Vehicle (script) is responsible for its assignment.
+This measure should be defined in accordance with reality.
+Most often, the center of mass of the vehicle is located in its center, at the height of its wheel axis - as shown below.
+
+
+
Colliders
+
Colliders are used to ensure collision between objects.
+In EgoVehicle, the main Collider collider and colliders in WheelsGameObject for each wheel were added.
+
Colliders object has the following content:
+
+
BodyCollider
+
+
Collider is a vehicle object responsible for ensuring collision with other objects.
+Additionally, it can be used to detect these collisions.
+The MeshCollider takes a Mesh of object and builds its Collider based on it.
+The Mesh for the Collider was also loaded from the *.fbx file similarly to the visual elements.
+
+
Wheels Colliders
+
+
WheelsColliders are an essential elements from the point of view of driving vehicles on the road.
+They are the only ones that have contact with the roads and it is important that they are properly configured.
+Each vehicle, apart from the visual elements related to the wheels, should also have 4 colliders - one for each wheel.
+
Wheel (script) provides a reference to the collider and visual object for the particular wheel.
+Thanks to this, the Vehicle (script) has the ability to perform certain actions on each of the wheels, such as:
+
+
+
update the steering angle in WheelCollider,
+
+
+
update the visual part of the wheel depending on the speed and angle of the turn,
+
+
+
update the wheel contact information stored in the WheelHit object,
+
+
+
update the force exerted by the tire forward and sideways depending on the acceleration (including cancellation of skidding),
+
+
+
ensure setting the tire sleep (it is impossible to put Rigidbody to sleep, but putting all wheels to sleep allows to get closer to this effect).
+
+
+
Wheel Collider Config (script) has been developed to prevent inspector entry for WheelCollider which ensures that friction is set to 0 and only wheel suspension and collisions are enabled.
+
+
+
Wheel Collider Config
+
For a better understanding of the meaning of WheelCollider we encourage you to read this manual.
+
+
Rigidbody
+
+
Rigidbody ensures that the object is controlled by the physics engine.
+The Mass of the vehicle should approximate its actual weight.
+In order for the vehicle to physically interact with other objects - react to collisions, Is Kinematic must be turned off.
+The Use Gravity should be turned on - to ensure the correct behavior of the body during movement.
+In addition, Interpolate should be turned on to ensure the physics engine's effects are smoothed out.
+
Reflection Probe
+
+
Reflection Probe is added to EgoVehicle prefab to simulate realistic reflections in a scene.
+It is a component that captures and stores information about the surrounding environment and uses that information to generate accurate reflections on objects in real-time.
+The values in the component are set as default.
+
HD Additional Reflection Data (script) is additional component used to store settings for HDRP's reflection probes and is added automatically.
+
URDF and Sensors
+
+
URDF (Unified Robot Description Format) is equivalent to the simplified URDF format used in ROS2.
+This format allows to define the positions of all sensors of the vehicle in relation to its local coordinate system.
+URDF is built using multiple GameObjects as children appropriately transformed with relation to its parent.
+
A detailed description of the URDF structure and sensors added to prefab Lexus RX450h 2015 is available in this section.
+
Vehicle (script)
+
+
Vehicle (script) provides an inputs that allows the EgoVehicle to move.
+Script inputs provides the ability to set the acceleration of the vehicle and the steering angle of its wheels, taking into account the effects of suspension and gravity.
+It also provides an input to set the gear in the gearbox and to control the turn signals.
+Script inputs can be set by one of the following scripts: Vehicle Ros Input (script) or Vehicle Keyboard Input (script).
+
The script performs several steps periodically:
+
+
checks whether the current inputs meet the set limits and adjusts them within them,
+
calculates the current linear velocity, angular velocity vector and local acceleration vector,
+
set the current steering angle in the script for each wheel and perform their updates,
+
if the current gear is PARKING and the vehicle is stopped (its speed and acceleration are below the set thresholds), it puts the vehicle (Rigidbody) and its wheels (Wheel (script)) to sleep,
+
if the vehicle has not been put to sleep, it sets the current acceleration to each with the appropriate sign depending on the DRIVE and REVERSE gear.
+
+
Elements configurable from the editor level
+
The script uses the CoM link reference to assign the center of mass of the vehicle to the Rigidbody.
+In addiction, Use inertia allows to define the inertia tensor for component Rigidbody - by default it is disabled.
+
Physics Settings - allows to set values used to control vehicle physics:
+
+
Sleep Velocity Threshold - velocity threshold used to put vehicle to sleep,
+
Sleep Time Threshold - time threshold for which the vehicle must not exceed the Sleep Velocity Threshold, have contact with the ground and a set acceleration input equal to zero,
+
Skidding Cancel Rate - coefficient that determines the rate at which skidding is canceled, affects the anti-skid force of the wheels - the higher the value, the faster the cancellation of the skid.
+
+
Axles Settings contains references to (Wheel (script)) scripts to control each wheel.
+Thanks to them, the Vehicle (script) is able to set their steering angle and accelerations.
+
Input Settings - allows to set limits for values on script input:
+
+
Max Steer Angle Input - maximum value of acceleration set by the script (also negative),
+
Max Acceleration Input - maximum steering angle of the wheels set by the script (also negative).
+
+
Inputs - are only used as a preview of the currently set values in the script input:
+
+
Input Data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
AccelerationInput
+
float
+
Acceleration input (m/s^2). On the plane, output the force that will result in this acceleration. On a slope, it is affected by the slope resistance, so it does not match the input.
+
+
+
SteerAngleInput
+
float
+
Vehicle steering input (degree). Negative steers left, positive right
Vehicle turn signal input. Values: NONE, LEFT, RIGHT, HAZARD.
+
+
+
+
Output data
+
+
+
+
Category
+
Type
+
Description
+
+
+
+
+
LocalAcceleration
+
Vector3
+
Acceleration(m/s^2) in the local coordinate system of the vehicle
+
+
+
Speed
+
float
+
Vehicle speed (m/s).
+
+
+
SteerAngle
+
float
+
Vehicle steering angle (degree).
+
+
+
Signal
+
enumeration
+
Vehicle turn signal.
+
+
+
Velocity
+
Vector3
+
Vehicle velocity (m/s)
+
+
+
LocalVelocity
+
Vector3
+
Vehicle local velocity (m/s)
+
+
+
AngularVelocity
+
Vector3
+
Vehicle angular velocity (rad/s)
+
+
+
+
The acceleration or deceleration of the vehicle is determined by AutomaticShiftInput and AccelerationInput.
+The vehicle will not move in the opposite direction of the (DRIVE or REVERSE) input.
+
+
Example
+
Sample vehicle behaves:
+
+
+
Sample 1 - vehicle will accelerate with input values (gradient resistance is received).
+
AutomaticShiftInput = DRIVE
+Speed = Any value
+AccelerationInput > 0
+
+
+
+
Sample 2 - vehicle will decelerate (like a brake).
Vehicle Ros (script) is responsible for subscribing to messages that are vehicle control commands.
+The values read from the message are set on the inputs of the Vehicle (script) script.
+
The concept for vehicle dynamics is suitable for Autoware'sautoware_auto_control_msgs/AckermannControlCommand and autoware_auto_vehicle_msgs/GearCommand messages interface usage.
+The script sets gear, steering angle of wheels and acceleration of the vehicle (read from the aforementioned messages) to the Vehicle (script) input.
+In the case of VehicleEmergencyStamped message it sets the absolute acceleration equal to 0.
+In addition, also through Vehicle (script), the appropriate lights are turned on and off depending on TurnIndicatorsCommand and HazardLightsCommand messages.
+
Elements configurable from the editor level
+
+
* Command Topic - topic on which suitable type of information is subscribed (default: listed in the table below)
+
QoS- Quality of service profile used in the publication (default assumed as "system_default": Reliable, TransientLocal, Keep last/1)
+
Vehicle - reference to a script in the vehicle object where the subscribed values are to be set (default: None)
If you would like to know all the topics used in communication Autoware with AWSIM, we encourage you to familiarize yourself with this section
+
+
Vehicle Keyboard (script)
+
+
Vehicle Keyboard (script) allows EgoVehicle to be controlled by the keyboard.
+Thanks to this, it is possible to switch on the appropriate gear of the gearbox, turn the lights on/off, set the acceleration and steering of the wheels.
+It's all set in the Vehicle (script) of the object assigned in the Vehicle field.
+The table below shows the available control options.
+
+
+
+
Button
+
Option
+
+
+
+
+
d
+
Switch to move forward (drive gear)
+
+
+
r
+
Switch to move backwards (reverse gear)
+
+
+
n
+
Switch to neutral
+
+
+
p
+
Switch to parking gear
+
+
+
UP ARROW
+
Forward acceleration
+
+
+
DOWN ARROW
+
Reverse acceleration (decelerate)
+
+
+
LEFT/RIGHT ARROW
+
Turning
+
+
+
1
+
Turn left blinker on (right off)
+
+
+
2
+
Turn right blinker on (left off)
+
+
+
3
+
Turn on hazard lights
+
+
+
4
+
Turn off blinker or hazard lights
+
+
+
+
+
WASD
+
Controlling the movement of the vehicle with WASD as the equivalent of arrow keys is acceptable, but remember that the d button engages the drive gear.
+
+
Elements configurable from the editor level
+
+
Max Acceleration- maximum value of acceleration set by the script (also negative)
+
Max Steer Angle - maximum steering angle of the wheels set by the script (also negative)
+
+
+
Value limits
+
Max Acceleration and Max Steer Angle values greater than those set in the Vehicle (script) are limited by the script itself - they will not be exceeded.
+
+
Vehicle Visual Effect (script)
+
+
This part of the settings is related to the configuration of the emission of materials when a specific lighting is activated.
+There are 4 types of lights: Brake, Left Turn Signal, Right Turn Signal and Reverse.
+Each of the lights has its visual equivalent in the form of a Mesh.
+In the case of EgoVehicle, each light type has its own GameObject which contains the Mesh assigned.
+
+
For each type of light, the appropriate Material Index (equivalent of element index in mesh) and Lighting Color are assigned - yellow for Turn Signals, red for Break and white for Reverse.
+
Lighting Intensity values are also configured - the greater the value, the more light will be emitted.
+This value is related to Lighting Exposure Weight parameter that is a exposure weight - the lower the value, the more light is emitted.
+
All types of lighting are switched on and off depending on the values obtained from the Vehicle (script) of the vehicle, which is assigned in the Vehicle field.
+
Elements configurable from the editor level
+
+
Turn Signal Timer Interval Sec - time interval for flashing lights - value \(0.5\) means that the light will be on for \(0.5s\), then it will be turned off for \(0.5s\) and turned on again.
+(default: 0.5)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Vehicle/EgoVehicle/input.gif b/Components/Vehicle/EgoVehicle/input.gif
new file mode 100644
index 0000000000..90ec3cb25e
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/input.gif differ
diff --git a/Components/Vehicle/EgoVehicle/link.png b/Components/Vehicle/EgoVehicle/link.png
new file mode 100644
index 0000000000..eaf5739620
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/link.png differ
diff --git a/Components/Vehicle/EgoVehicle/link_2.png b/Components/Vehicle/EgoVehicle/link_2.png
new file mode 100644
index 0000000000..c5192cd58f
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/link_2.png differ
diff --git a/Components/Vehicle/EgoVehicle/material.png b/Components/Vehicle/EgoVehicle/material.png
new file mode 100644
index 0000000000..a1ba522c19
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/material.png differ
diff --git a/Components/Vehicle/EgoVehicle/models_link.png b/Components/Vehicle/EgoVehicle/models_link.png
new file mode 100644
index 0000000000..49d04ed932
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/models_link.png differ
diff --git a/Components/Vehicle/EgoVehicle/prefab.png b/Components/Vehicle/EgoVehicle/prefab.png
new file mode 100644
index 0000000000..fade1e21fa
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/prefab.png differ
diff --git a/Components/Vehicle/EgoVehicle/prefab_link.png b/Components/Vehicle/EgoVehicle/prefab_link.png
new file mode 100644
index 0000000000..4f6cc4e948
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/prefab_link.png differ
diff --git a/Components/Vehicle/EgoVehicle/reflection.png b/Components/Vehicle/EgoVehicle/reflection.png
new file mode 100644
index 0000000000..b97e0d1e88
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/reflection.png differ
diff --git a/Components/Vehicle/EgoVehicle/rigidbody.png b/Components/Vehicle/EgoVehicle/rigidbody.png
new file mode 100644
index 0000000000..b1de0f8efd
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/rigidbody.png differ
diff --git a/Components/Vehicle/EgoVehicle/scene_link.png b/Components/Vehicle/EgoVehicle/scene_link.png
new file mode 100644
index 0000000000..1bcca84121
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/scene_link.png differ
diff --git a/Components/Vehicle/EgoVehicle/script.png b/Components/Vehicle/EgoVehicle/script.png
new file mode 100644
index 0000000000..af09b3d1a1
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/script.png differ
diff --git a/Components/Vehicle/EgoVehicle/script_keyboard.png b/Components/Vehicle/EgoVehicle/script_keyboard.png
new file mode 100644
index 0000000000..fb794669da
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/script_keyboard.png differ
diff --git a/Components/Vehicle/EgoVehicle/script_ros.png b/Components/Vehicle/EgoVehicle/script_ros.png
new file mode 100644
index 0000000000..3eb2114b30
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/script_ros.png differ
diff --git a/Components/Vehicle/EgoVehicle/script_visual.png b/Components/Vehicle/EgoVehicle/script_visual.png
new file mode 100644
index 0000000000..a7d4d82cab
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/script_visual.png differ
diff --git a/Components/Vehicle/EgoVehicle/sensor_kit.png b/Components/Vehicle/EgoVehicle/sensor_kit.png
new file mode 100644
index 0000000000..4b68213b10
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/sensor_kit.png differ
diff --git a/Components/Vehicle/EgoVehicle/urdf_link.png b/Components/Vehicle/EgoVehicle/urdf_link.png
new file mode 100644
index 0000000000..283227c264
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/urdf_link.png differ
diff --git a/Components/Vehicle/EgoVehicle/vehicle.png b/Components/Vehicle/EgoVehicle/vehicle.png
new file mode 100644
index 0000000000..8e0eeefafd
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/vehicle.png differ
diff --git a/Components/Vehicle/EgoVehicle/wheel_collider.png b/Components/Vehicle/EgoVehicle/wheel_collider.png
new file mode 100644
index 0000000000..7f63ae070e
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/wheel_collider.png differ
diff --git a/Components/Vehicle/EgoVehicle/wheel_collider_example.png b/Components/Vehicle/EgoVehicle/wheel_collider_example.png
new file mode 100644
index 0000000000..dc1844c472
Binary files /dev/null and b/Components/Vehicle/EgoVehicle/wheel_collider_example.png differ
diff --git a/Components/Vehicle/URDFAndSensors/index.html b/Components/Vehicle/URDFAndSensors/index.html
new file mode 100644
index 0000000000..d891104a27
--- /dev/null
+++ b/Components/Vehicle/URDFAndSensors/index.html
@@ -0,0 +1,2100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ URDF And Sensors - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This section describes the placement of sensors in EgoVehicle on the example of a Lexus RX450h 2015 Sample Sensor prefab.
+
URDF (Unified Robot Description Format) is equivalent to the simplified URDF format used in ROS2.
+This format allows to define the positions of all sensors of the vehicle in relation to its main parent prefab coordinate system.
+
+
URDF is added directly to the main parent of the prefab and there are no transforms between these objects.
+It is built using multiple GameObjects as children appropriately transformed with relation to its parent.
+
+
The transforms in the URDF object are defined using the data from the sensor kit documentation used in the vehicle.
+Such data can be obtained from sensor kit packages for Autoware, for example: awsim_sensor_kit_launch - it is used in the AWSIM compatible version of Autoware.
+This package contains a description of transforms between coordinate systems (frames) in the form of *.yaml files: sensors_calibration and sensor_kit_calibration.
+
In the first file, the transform of the sensor kit frame (sensor_kit_base_link) relative to the local vehicle frame (base_link) is defined.
+In Unity, this transform is defined in the object Sensor Kit.
+While the second file contains a definition of the transformations of all sensors with respect to the sensor kit - they are described in the Sensor Kit subsections.
+
+
Transformations
+
Please note that the transformation Objects are intended to be a direct reflection of frames existing in ROS2.
+All frameObjects are defined as children of base_link and consist of nothing but a transformation - analogical to the one present in ROS2 (keep in mind the coordinate system conversion).
+The sensor Objects are added to the transformation Object with no transformation of their own.
+
+
+
Coordinate system conventions
+
Unity uses a left-handed convention for its coordinate system, while the ROS2 uses a right-handed convention.
+For this reason, you should remember to perform conversions to get the correct transforms.
+
+
Base Link
+
Base Link (frame named base_link) is the formalized local coordinate system in URDF.
+All sensors that publish data specified in some frame present in Autoware are defined in relation to base_link.
+It is a standard practice in ROS, that base_link is a parent transformation of the whole robot and all robot parts are defined in some relation to the base_link.
+
If any device publishes data in the base_link frame - it is added as a direct child, with no additional transformation intermediate Object (PoseSensor is an example).
+However, if this device has its own frame, it is added as a child to its frame Object - which provides an additional transformation.
+The final transformation can consist of many intermediate transformation Objects.
+The frame Objects are added to the base_link (GnssSensor and its parent gnss_link are an example).
+
+
Sensor Kit
+
Sensor Kit (frame named sensor_kit_base_link) is a set of objects that consists of all simulated sensors that are physically present in an autonomous vehicle and have their own coordinate system (frame).
+This set of sensors has its own frame sensor_kit_base_link that is relative to the base_link.
+
In the Lexus RX450h 2015 Sample Sensor prefab, it is added to the base_linkGameObject with an appropriately defined transformation.
+It acts as an intermediate frame GameObject.
+Sensor Kit is located on the top of the vehicle, so it is significantly shifted about the Oy and Oz axes.
+Sensors can be defined directly in this Object (VelodyneVLP16 is an example), or have their own transformation Object added on top of the sensor_kit_base_link (like GnssSensor mentioned in the base_link section).
+
The sensors described in this subsection are defined in relation to the sensor_kit_base_linkframe.
+
+
LiDARs
+
LidarSensor is the component that simulates the LiDAR (Light Detection and Ranging) sensor.
+The LiDARs mounted on the top of autonomous vehicles are primarily used to scan the environment for localization in space and for detection and identification of obstacles.
+LiDARs placed on the left and right sides of the vehicle are mainly used to monitor the traffic lane and detect vehicles moving in adjacent lanes.
+A detailed description of this sensor is available in this section.
+
Lexus RX450h 2015 Sample Sensor prefab has one VelodyneVLP16 prefab sensor configured on the top of the vehicle, mainly used for location in space, but also for object recognition.
+Since the top LiDAR publishes data directly in the sensor_kit_base_link frame, the prefab is added directly to it - there is no transform.
+The other two remaining LiDARs are defined, but disabled - they do not provide data from space (but you can enable them!).
+
Top
+
+
Left - disabled
+
+
Right - disabled
+
+
IMU
+
IMUSensor is a component that simulates an IMU (Inertial Measurement Unit) sensor.
+It measures acceleration and angular velocity of the EgoVehicle.
+A detailed description of this sensor is available in this section.
+
Lexus RX450h 2015 Sample Sensor has one such sensor located on the top of the vehicle.
+It is added to an Objecttamagawa/imu_link that matches its frame_id and contains its transform with respect to sensor_kit_base_link.
+This transformation has no transition, but only rotation around the Oy and Oz axes.
+The transform is defined in such a way that its axis Oy points downwards - in accordance with the gravity vector.
+
+
GNSS
+
GnssSensor is a component which simulates the position of vehicle computed by the Global Navigation Satellite.
+A detailed description of this sensor is available in this section.
+
Lexus RX450h 2015 Sample Sensor prefab has one such sensor located on top of the vehicle.
+It is added to an Objectgnss_link that matches its frame_id and contains its transform with respect to sensor_kit_base_link.
+The frame is slightly moved back along the Oy and Oz axes.
+
+
Camera
+
CameraSensor is a component that simulates an RGB camera.
+Autonomous vehicles can be equipped with many cameras used for various purposes.
+A detailed description of this sensor is available in this section.
+
Lexus RX450h 2015 Sample Sensor prefab has one camera, positioned on top of the vehicle in such a way that the cameras field of view provides an image including traffic lights - the status of which must be recognized by Autoware.
+It is added to an Objecttraffic_light_left_camera/camera_link that matches its frame_id and contains its transform with respect to sensor_kit_base_link.
+
+
Pose
+
PoseSensor is a component which provides access to the current position and rotation of the EgoVehicle - is added as a ground truth.
+
The position and orientation of EgoVehicle is defined as the position of the frame base_link in the global frame, so this Object is added directly as its child without a transform.
+
+
VehicleSensor
+
VehicleStatusSensor is a component that is designed to aggregate information about the current state of the EgoVehicle, such as the active control mode, vehicle speed, steering of its wheels, or turn signal status.
+A detailed description of this sensor is available in this section.
+
This Object is not strictly related to any frame, however, it is assumed as a sensor, therefore it is added to the URDF.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/baselink.png b/Components/Vehicle/URDFAndSensors/urdf_links/baselink.png
new file mode 100644
index 0000000000..3fc141f95f
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/baselink.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/camera.png b/Components/Vehicle/URDFAndSensors/urdf_links/camera.png
new file mode 100644
index 0000000000..704a1b376c
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/camera.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/gnss.png b/Components/Vehicle/URDFAndSensors/urdf_links/gnss.png
new file mode 100644
index 0000000000..6518d1cada
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/gnss.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/imu.png b/Components/Vehicle/URDFAndSensors/urdf_links/imu.png
new file mode 100644
index 0000000000..c9a01ba9c8
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/imu.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/pose.png b/Components/Vehicle/URDFAndSensors/urdf_links/pose.png
new file mode 100644
index 0000000000..28b47596fb
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/pose.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/sensor_kit.png b/Components/Vehicle/URDFAndSensors/urdf_links/sensor_kit.png
new file mode 100644
index 0000000000..78ad50dbff
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/sensor_kit.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/urdf.png b/Components/Vehicle/URDFAndSensors/urdf_links/urdf.png
new file mode 100644
index 0000000000..2bd8cea566
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/urdf.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/urdf_link.png b/Components/Vehicle/URDFAndSensors/urdf_links/urdf_link.png
new file mode 100644
index 0000000000..283227c264
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/urdf_link.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/vehicle.png b/Components/Vehicle/URDFAndSensors/urdf_links/vehicle.png
new file mode 100644
index 0000000000..98f98ffe66
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/vehicle.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_left.png b/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_left.png
new file mode 100644
index 0000000000..75f9fc1bfd
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_left.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_right.png b/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_right.png
new file mode 100644
index 0000000000..5734e11f56
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_right.png differ
diff --git a/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_top.png b/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_top.png
new file mode 100644
index 0000000000..0bd6aab620
Binary files /dev/null and b/Components/Vehicle/URDFAndSensors/urdf_links/velodyne_top.png differ
diff --git a/DeveloperGuide/Contact/index.html b/DeveloperGuide/Contact/index.html
new file mode 100644
index 0000000000..a502be57f6
--- /dev/null
+++ b/DeveloperGuide/Contact/index.html
@@ -0,0 +1,1767 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contact - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Do not open issues for general support questions as we want to keep GitHub issues for confirmed bug reports.
+Instead, open a discussion in the Q&A category.
+The trouble shooting page at AWSIM and at Autoware will be also helpful.
AWSIM specific code is distributed under Apache2.0 License.
+The following extensions are included (*.cs*.compute*.xml)
+
AWSIM specific assets are distributed under CC BY-NC License.
+The following extensions are included (*.fbx*.pcd*.osm*.png*.anim*.unitypackage*.x86_64)
+
+
Apache2.0 License
+
**********************************************************************************
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2022 TIER IV, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
CC BY-NC License
+
**********************************************************************************
+
+Attribution-NonCommercial 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-NonCommercial 4.0 International Public
+License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-NonCommercial 4.0 International Public License ("Public
+License"). To the extent this Public License may be interpreted as a
+contract, You are granted the Licensed Rights in consideration of Your
+acceptance of these terms and conditions, and the Licensor grants You
+such rights in consideration of benefits the Licensor receives from
+making the Licensed Material available under these terms and
+conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. NonCommercial means not primarily intended for or directed towards
+ commercial advantage or monetary compensation. For purposes of
+ this Public License, the exchange of the Licensed Material for
+ other material subject to Copyright and Similar Rights by digital
+ file-sharing or similar means is NonCommercial provided there is
+ no payment of monetary compensation in connection with the
+ exchange.
+
+ j. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ k. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ l. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part, for NonCommercial purposes only; and
+
+ b. produce, reproduce, and Share Adapted Material for
+ NonCommercial purposes only.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties, including when
+ the Licensed Material is used other than for NonCommercial
+ purposes.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database for NonCommercial purposes
+ only;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.” The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org
+
Below you can find instructions on how to setup the self-driving demo of CoRE.SIM simulation controlled by Autoware.
+The instruction assumes using the Ubuntu OS.
+
PC specs
+
Please make sure that your machine meets the following requirements in order to run the simulation correctly:
+
+
+
+
Required PC Specs
+
+
+
+
+
+
OS
+
Ubuntu 22.04
+
+
+
CPU
+
6cores and 12thread or higher
+
+
+
GPU
+
RTX2070 or higher
+
+
+
NVIDIA Driver (Ubuntu 22)
+
>=515.43.04
+
+
+
+
Localhost settings
+
The simulation is based on the appropriate network setting, which allows for trouble-free communication of the CoRE.SIM simulation with the Autoware software.
+To apply required localhost settings please add the following lines to ~/.bashrc & ~/.profile files.
Rightclick the CoRE.Auto-rc1.x86_64 file and check the Execute checkbox
+
+
or execute the command below.
+
chmod +x <path to CoRE.SIM folder>/CoRE.Auto-rc1.x86_64
+
+
+
+
Launch CoRE.SIM_demo.x86_64.
+
./<path to CoRE.SIM folder>/CoRE.Auto-rc1.x86_64
+
+
+
Warning
+
It may take some time for the application to start the so please wait until image similar to the one presented below is visible in your application window.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GettingStarted/SetupUnityProject/image_0.png b/GettingStarted/SetupUnityProject/image_0.png
new file mode 100644
index 0000000000..139648a0ed
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_0.png differ
diff --git a/GettingStarted/SetupUnityProject/image_1.png b/GettingStarted/SetupUnityProject/image_1.png
new file mode 100644
index 0000000000..0513ee1fe5
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_1.png differ
diff --git a/GettingStarted/SetupUnityProject/image_10.png b/GettingStarted/SetupUnityProject/image_10.png
new file mode 100644
index 0000000000..b326126d99
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_10.png differ
diff --git a/GettingStarted/SetupUnityProject/image_11.png b/GettingStarted/SetupUnityProject/image_11.png
new file mode 100644
index 0000000000..d92823d122
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_11.png differ
diff --git a/GettingStarted/SetupUnityProject/image_12.png b/GettingStarted/SetupUnityProject/image_12.png
new file mode 100644
index 0000000000..fabe4130c1
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_12.png differ
diff --git a/GettingStarted/SetupUnityProject/image_13.png b/GettingStarted/SetupUnityProject/image_13.png
new file mode 100644
index 0000000000..4ffc7e62ca
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_13.png differ
diff --git a/GettingStarted/SetupUnityProject/image_2.png b/GettingStarted/SetupUnityProject/image_2.png
new file mode 100644
index 0000000000..43daf4bec4
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_2.png differ
diff --git a/GettingStarted/SetupUnityProject/image_3.png b/GettingStarted/SetupUnityProject/image_3.png
new file mode 100644
index 0000000000..a8bdf01dfe
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_3.png differ
diff --git a/GettingStarted/SetupUnityProject/image_4.png b/GettingStarted/SetupUnityProject/image_4.png
new file mode 100644
index 0000000000..9fd756b94c
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_4.png differ
diff --git a/GettingStarted/SetupUnityProject/image_5.png b/GettingStarted/SetupUnityProject/image_5.png
new file mode 100644
index 0000000000..032e4cf240
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_5.png differ
diff --git a/GettingStarted/SetupUnityProject/image_6.png b/GettingStarted/SetupUnityProject/image_6.png
new file mode 100644
index 0000000000..3dc757d3f9
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_6.png differ
diff --git a/GettingStarted/SetupUnityProject/image_7.png b/GettingStarted/SetupUnityProject/image_7.png
new file mode 100644
index 0000000000..9bad2760a7
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_7.png differ
diff --git a/GettingStarted/SetupUnityProject/image_7_.png b/GettingStarted/SetupUnityProject/image_7_.png
new file mode 100644
index 0000000000..961aac9c22
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_7_.png differ
diff --git a/GettingStarted/SetupUnityProject/image_8.png b/GettingStarted/SetupUnityProject/image_8.png
new file mode 100644
index 0000000000..781b2e3e6d
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_8.png differ
diff --git a/GettingStarted/SetupUnityProject/image_9.png b/GettingStarted/SetupUnityProject/image_9.png
new file mode 100644
index 0000000000..5eb20a4564
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_9.png differ
diff --git a/GettingStarted/SetupUnityProject/image_9_.png b/GettingStarted/SetupUnityProject/image_9_.png
new file mode 100644
index 0000000000..4559166c7a
Binary files /dev/null and b/GettingStarted/SetupUnityProject/image_9_.png differ
diff --git a/GettingStarted/SetupUnityProject/index.html b/GettingStarted/SetupUnityProject/index.html
new file mode 100644
index 0000000000..9b06c74741
--- /dev/null
+++ b/GettingStarted/SetupUnityProject/index.html
@@ -0,0 +1,2057 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Setup Unity Project - CoRE.SIM document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Follow the steps below to install Unity on your machine:
+
+
Install UnityHub to manage Unity projects. Please go to Unity download page and download latest UnityHub.AppImage.
+
+
+
Install Unity 2021.1.7f1 via UnityHub.
+
+
Open new terminal, navigate to directory where UnityHub.AppImage is download and execute the following command:
+
./UnityHub.AppImage
+
+
To install Unity Editor please proceed as shown on the images below
+
+
+
+
+
At this point, your Unity installation process should have started.
+
+
+
+
+
+
+
*NOTE: If the installation process has not started after clicking the green button (image above), please copy the hyperlink (by rightclicking the button and selecting Copy link address) and add it as a argument for Unity Hub app. An example command:
+
In Unity Editor, from the menu bar at the top, select Assets -> Import Package -> Custom Package... and navigate the Japan_Tokyo_Nishishinjuku.unitypackage file.
+
+
+
+
Nishishinjuku package has been successfully imported under Assets/AWSIM/Externals/directory.
+
+
+
+
Info
+
The Externals directory is added to the .gitignore because the map has a large file size and should not be directly uploaded to the repository.
+
+
Run the demo in Editor
+
The following steps describe how to run the demo in Unity Editor:
+
+
Open the AutowareSimulation.unity scene placed under Assets/AWSIM/Scenes/Main directory
+
Run the simulation by clicking Play button placed at the top section of Editor.
+
+
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Ha=/["'&<>]/;Un.exports=$a;function $a(e){var t=""+e,r=Ha.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function U(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(a){s={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}function D(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o1||a(u,d)})})}function a(u,d){try{c(o[u](d))}catch(v){f(i[0][3],v)}}function c(u){u.value instanceof Ze?Promise.resolve(u.value.v).then(p,l):f(i[0][2],u)}function p(u){a("next",u)}function l(u){a("throw",u)}function f(u,d){u(d),i.shift(),i.length&&a(i[0][0],i[0][1])}}function io(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof we=="function"?we(e):e[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),n(a,c,s.done,s.value)})}}function n(i,s,a,c){Promise.resolve(c).then(function(p){i({value:p,done:a})},s)}}function k(e){return typeof e=="function"}function at(e){var t=function(o){Error.call(o),o.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Rt=at(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
+`+r.map(function(o,n){return n+1+") "+o.toString()}).join(`
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function De(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ie=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,o,n,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=we(s),c=a.next();!c.done;c=a.next()){var p=c.value;p.remove(this)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(k(l))try{l()}catch(b){i=b instanceof Rt?b.errors:[b]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var u=we(f),d=u.next();!d.done;d=u.next()){var v=d.value;try{ao(v)}catch(b){i=i!=null?i:[],b instanceof Rt?i=D(D([],U(i)),U(b.errors)):i.push(b)}}}catch(b){o={error:b}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}}if(i)throw new Rt(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)ao(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&De(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&De(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var gr=Ie.EMPTY;function Pt(e){return e instanceof Ie||e&&"closed"in e&&k(e.remove)&&k(e.add)&&k(e.unsubscribe)}function ao(e){k(e)?e():e.unsubscribe()}var Ae={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var st={setTimeout:function(e,t){for(var r=[],o=2;o0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var o=this,n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?gr:(this.currentObservers=null,a.push(r),new Ie(function(){o.currentObservers=null,De(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var o=this,n=o.hasError,i=o.thrownError,s=o.isStopped;n?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new P;return r.source=this,r},t.create=function(r,o){return new ho(r,o)},t}(P);var ho=function(e){ie(t,e);function t(r,o){var n=e.call(this)||this;return n.destination=r,n.source=o,n}return t.prototype.next=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,r)},t.prototype.error=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,r)},t.prototype.complete=function(){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||o===void 0||o.call(r)},t.prototype._subscribe=function(r){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(r))!==null&&n!==void 0?n:gr},t}(x);var yt={now:function(){return(yt.delegate||Date).now()},delegate:void 0};var Et=function(e){ie(t,e);function t(r,o,n){r===void 0&&(r=1/0),o===void 0&&(o=1/0),n===void 0&&(n=yt);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(r){var o=this,n=o.isStopped,i=o._buffer,s=o._infiniteTimeWindow,a=o._timestampProvider,c=o._windowTime;n||(i.push(r),!s&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(r),n=this,i=n._infiniteTimeWindow,s=n._buffer,a=s.slice(),c=0;c0?e.prototype.requestAsyncId.call(this,r,o,n):(r.actions.push(this),r._scheduled||(r._scheduled=lt.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,o,n){var i;if(n===void 0&&(n=0),n!=null?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,o,n);var s=r.actions;o!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==o&&(lt.cancelAnimationFrame(o),r._scheduled=void 0)},t}(jt);var go=function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var o=this._scheduled;this._scheduled=void 0;var n=this.actions,i;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while((r=n[0])&&r.id===o&&n.shift());if(this._active=!1,i){for(;(r=n[0])&&r.id===o&&n.shift();)r.unsubscribe();throw i}},t}(Wt);var Oe=new go(vo);var L=new P(function(e){return e.complete()});function Ut(e){return e&&k(e.schedule)}function Or(e){return e[e.length-1]}function Qe(e){return k(Or(e))?e.pop():void 0}function Me(e){return Ut(Or(e))?e.pop():void 0}function Nt(e,t){return typeof Or(e)=="number"?e.pop():t}var mt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Dt(e){return k(e==null?void 0:e.then)}function Vt(e){return k(e[pt])}function zt(e){return Symbol.asyncIterator&&k(e==null?void 0:e[Symbol.asyncIterator])}function qt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Pi(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Kt=Pi();function Qt(e){return k(e==null?void 0:e[Kt])}function Yt(e){return no(this,arguments,function(){var r,o,n,i;return $t(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Ze(r.read())];case 3:return o=s.sent(),n=o.value,i=o.done,i?[4,Ze(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Ze(n)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Bt(e){return k(e==null?void 0:e.getReader)}function I(e){if(e instanceof P)return e;if(e!=null){if(Vt(e))return Ii(e);if(mt(e))return Fi(e);if(Dt(e))return ji(e);if(zt(e))return xo(e);if(Qt(e))return Wi(e);if(Bt(e))return Ui(e)}throw qt(e)}function Ii(e){return new P(function(t){var r=e[pt]();if(k(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Fi(e){return new P(function(t){for(var r=0;r=2;return function(o){return o.pipe(e?M(function(n,i){return e(n,i,o)}):ue,xe(1),r?He(t):Io(function(){return new Jt}))}}function Fo(){for(var e=[],t=0;t=2,!0))}function le(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new x}:t,o=e.resetOnError,n=o===void 0?!0:o,i=e.resetOnComplete,s=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(p){var l,f,u,d=0,v=!1,b=!1,z=function(){f==null||f.unsubscribe(),f=void 0},K=function(){z(),l=u=void 0,v=b=!1},G=function(){var C=l;K(),C==null||C.unsubscribe()};return g(function(C,it){d++,!b&&!v&&z();var Ne=u=u!=null?u:r();it.add(function(){d--,d===0&&!b&&!v&&(f=Hr(G,c))}),Ne.subscribe(it),!l&&d>0&&(l=new tt({next:function(Pe){return Ne.next(Pe)},error:function(Pe){b=!0,z(),f=Hr(K,n,Pe),Ne.error(Pe)},complete:function(){v=!0,z(),f=Hr(K,s),Ne.complete()}}),I(C).subscribe(l))})(p)}}function Hr(e,t){for(var r=[],o=2;oe.next(document)),e}function q(e,t=document){return Array.from(t.querySelectorAll(e))}function N(e,t=document){let r=se(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function se(e,t=document){return t.querySelector(e)||void 0}function Re(){return document.activeElement instanceof HTMLElement&&document.activeElement||void 0}var na=_(h(document.body,"focusin"),h(document.body,"focusout")).pipe(ke(1),V(void 0),m(()=>Re()||document.body),J(1));function Zt(e){return na.pipe(m(t=>e.contains(t)),X())}function Je(e){return{x:e.offsetLeft,y:e.offsetTop}}function No(e){return _(h(window,"load"),h(window,"resize")).pipe(Ce(0,Oe),m(()=>Je(e)),V(Je(e)))}function er(e){return{x:e.scrollLeft,y:e.scrollTop}}function dt(e){return _(h(e,"scroll"),h(window,"resize")).pipe(Ce(0,Oe),m(()=>er(e)),V(er(e)))}function Do(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)Do(e,r)}function T(e,t,...r){let o=document.createElement(e);if(t)for(let n of Object.keys(t))typeof t[n]!="undefined"&&(typeof t[n]!="boolean"?o.setAttribute(n,t[n]):o.setAttribute(n,""));for(let n of r)Do(o,n);return o}function tr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function ht(e){let t=T("script",{src:e});return H(()=>(document.head.appendChild(t),_(h(t,"load"),h(t,"error").pipe(E(()=>Mr(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(m(()=>{}),A(()=>document.head.removeChild(t)),xe(1))))}var Vo=new x,ia=H(()=>typeof ResizeObserver=="undefined"?ht("https://unpkg.com/resize-observer-polyfill"):j(void 0)).pipe(m(()=>new ResizeObserver(e=>{for(let t of e)Vo.next(t)})),E(e=>_(Ve,j(e)).pipe(A(()=>e.disconnect()))),J(1));function he(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ye(e){return ia.pipe(w(t=>t.observe(e)),E(t=>Vo.pipe(M(({target:r})=>r===e),A(()=>t.unobserve(e)),m(()=>he(e)))),V(he(e)))}function bt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function zo(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}var qo=new x,aa=H(()=>j(new IntersectionObserver(e=>{for(let t of e)qo.next(t)},{threshold:0}))).pipe(E(e=>_(Ve,j(e)).pipe(A(()=>e.disconnect()))),J(1));function rr(e){return aa.pipe(w(t=>t.observe(e)),E(t=>qo.pipe(M(({target:r})=>r===e),A(()=>t.unobserve(e)),m(({isIntersecting:r})=>r))))}function Ko(e,t=16){return dt(e).pipe(m(({y:r})=>{let o=he(e),n=bt(e);return r>=n.height-o.height-t}),X())}var or={drawer:N("[data-md-toggle=drawer]"),search:N("[data-md-toggle=search]")};function Qo(e){return or[e].checked}function Ke(e,t){or[e].checked!==t&&or[e].click()}function We(e){let t=or[e];return h(t,"change").pipe(m(()=>t.checked),V(t.checked))}function sa(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function ca(){return _(h(window,"compositionstart").pipe(m(()=>!0)),h(window,"compositionend").pipe(m(()=>!1))).pipe(V(!1))}function Yo(){let e=h(window,"keydown").pipe(M(t=>!(t.metaKey||t.ctrlKey)),m(t=>({mode:Qo("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),M(({mode:t,type:r})=>{if(t==="global"){let o=Re();if(typeof o!="undefined")return!sa(o,r)}return!0}),le());return ca().pipe(E(t=>t?L:e))}function pe(){return new URL(location.href)}function ot(e,t=!1){if(te("navigation.instant")&&!t){let r=T("a",{href:e.href});document.body.appendChild(r),r.click(),r.remove()}else location.href=e.href}function Bo(){return new x}function Go(){return location.hash.slice(1)}function nr(e){let t=T("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function pa(e){return _(h(window,"hashchange"),e).pipe(m(Go),V(Go()),M(t=>t.length>0),J(1))}function Jo(e){return pa(e).pipe(m(t=>se(`[id="${t}"]`)),M(t=>typeof t!="undefined"))}function Fr(e){let t=matchMedia(e);return Xt(r=>t.addListener(()=>r(t.matches))).pipe(V(t.matches))}function Xo(){let e=matchMedia("print");return _(h(window,"beforeprint").pipe(m(()=>!0)),h(window,"afterprint").pipe(m(()=>!1))).pipe(V(e.matches))}function jr(e,t){return e.pipe(E(r=>r?t():L))}function ir(e,t){return new P(r=>{let o=new XMLHttpRequest;o.open("GET",`${e}`),o.responseType="blob",o.addEventListener("load",()=>{o.status>=200&&o.status<300?(r.next(o.response),r.complete()):r.error(new Error(o.statusText))}),o.addEventListener("error",()=>{r.error(new Error("Network Error"))}),o.addEventListener("abort",()=>{r.error(new Error("Request aborted"))}),typeof(t==null?void 0:t.progress$)!="undefined"&&(o.addEventListener("progress",n=>{t.progress$.next(n.loaded/n.total*100)}),t.progress$.next(5)),o.send()})}function Ue(e,t){return ir(e,t).pipe(E(r=>r.text()),m(r=>JSON.parse(r)),J(1))}function Zo(e,t){let r=new DOMParser;return ir(e,t).pipe(E(o=>o.text()),m(o=>r.parseFromString(o,"text/xml")),J(1))}function en(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function tn(){return _(h(window,"scroll",{passive:!0}),h(window,"resize",{passive:!0})).pipe(m(en),V(en()))}function rn(){return{width:innerWidth,height:innerHeight}}function on(){return h(window,"resize",{passive:!0}).pipe(m(rn),V(rn()))}function nn(){return B([tn(),on()]).pipe(m(([e,t])=>({offset:e,size:t})),J(1))}function ar(e,{viewport$:t,header$:r}){let o=t.pipe(ee("size")),n=B([o,r]).pipe(m(()=>Je(e)));return B([r,t,n]).pipe(m(([{height:i},{offset:s,size:a},{x:c,y:p}])=>({offset:{x:s.x-c,y:s.y-p+i},size:a})))}function la(e){return h(e,"message",t=>t.data)}function ma(e){let t=new x;return t.subscribe(r=>e.postMessage(r)),t}function an(e,t=new Worker(e)){let r=la(t),o=ma(t),n=new x;n.subscribe(o);let i=o.pipe(Z(),re(!0));return n.pipe(Z(),qe(r.pipe(Y(i))),le())}var fa=N("#__config"),vt=JSON.parse(fa.textContent);vt.base=`${new URL(vt.base,pe())}`;function me(){return vt}function te(e){return vt.features.includes(e)}function be(e,t){return typeof t!="undefined"?vt.translations[e].replace("#",t.toString()):vt.translations[e]}function Ee(e,t=document){return N(`[data-md-component=${e}]`,t)}function oe(e,t=document){return q(`[data-md-component=${e}]`,t)}function ua(e){let t=N(".md-typeset > :first-child",e);return h(t,"click",{once:!0}).pipe(m(()=>N(".md-typeset",e)),m(r=>({hash:__md_hash(r.innerHTML)})))}function sn(e){if(!te("announce.dismiss")||!e.childElementCount)return L;if(!e.hidden){let t=N(".md-typeset",e);__md_hash(t.innerHTML)===__md_get("__announce")&&(e.hidden=!0)}return H(()=>{let t=new x;return t.subscribe(({hash:r})=>{e.hidden=!0,__md_set("__announce",r)}),ua(e).pipe(w(r=>t.next(r)),A(()=>t.complete()),m(r=>R({ref:e},r)))})}function da(e,{target$:t}){return t.pipe(m(r=>({hidden:r!==e})))}function cn(e,t){let r=new x;return r.subscribe(({hidden:o})=>{e.hidden=o}),da(e,t).pipe(w(o=>r.next(o)),A(()=>r.complete()),m(o=>R({ref:e},o)))}function ha(e,t){let r=H(()=>B([No(e),dt(t)])).pipe(m(([{x:o,y:n},i])=>{let{width:s,height:a}=he(e);return{x:o-i.x+s/2,y:n-i.y+a/2}}));return Zt(e).pipe(E(o=>r.pipe(m(n=>({active:o,offset:n})),xe(+!o||1/0))))}function pn(e,t,{target$:r}){let[o,n]=Array.from(e.children);return H(()=>{let i=new x,s=i.pipe(Z(),re(!0));return i.subscribe({next({offset:a}){e.style.setProperty("--md-tooltip-x",`${a.x}px`),e.style.setProperty("--md-tooltip-y",`${a.y}px`)},complete(){e.style.removeProperty("--md-tooltip-x"),e.style.removeProperty("--md-tooltip-y")}}),rr(e).pipe(Y(s)).subscribe(a=>{e.toggleAttribute("data-md-visible",a)}),_(i.pipe(M(({active:a})=>a)),i.pipe(ke(250),M(({active:a})=>!a))).subscribe({next({active:a}){a?e.prepend(o):o.remove()},complete(){e.prepend(o)}}),i.pipe(Ce(16,Oe)).subscribe(({active:a})=>{o.classList.toggle("md-tooltip--active",a)}),i.pipe(Pr(125,Oe),M(()=>!!e.offsetParent),m(()=>e.offsetParent.getBoundingClientRect()),m(({x:a})=>a)).subscribe({next(a){a?e.style.setProperty("--md-tooltip-0",`${-a}px`):e.style.removeProperty("--md-tooltip-0")},complete(){e.style.removeProperty("--md-tooltip-0")}}),h(n,"click").pipe(Y(s),M(a=>!(a.metaKey||a.ctrlKey))).subscribe(a=>{a.stopPropagation(),a.preventDefault()}),h(n,"mousedown").pipe(Y(s),ne(i)).subscribe(([a,{active:c}])=>{var p;if(a.button!==0||a.metaKey||a.ctrlKey)a.preventDefault();else if(c){a.preventDefault();let l=e.parentElement.closest(".md-annotation");l instanceof HTMLElement?l.focus():(p=Re())==null||p.blur()}}),r.pipe(Y(s),M(a=>a===o),ze(125)).subscribe(()=>e.focus()),ha(e,t).pipe(w(a=>i.next(a)),A(()=>i.complete()),m(a=>R({ref:e},a)))})}function Wr(e){return T("div",{class:"md-tooltip",id:e},T("div",{class:"md-tooltip__inner md-typeset"}))}function ln(e,t){if(t=t?`${t}_annotation_${e}`:void 0,t){let r=t?`#${t}`:void 0;return T("aside",{class:"md-annotation",tabIndex:0},Wr(t),T("a",{href:r,class:"md-annotation__index",tabIndex:-1},T("span",{"data-md-annotation-id":e})))}else return T("aside",{class:"md-annotation",tabIndex:0},Wr(t),T("span",{class:"md-annotation__index",tabIndex:-1},T("span",{"data-md-annotation-id":e})))}function mn(e){return T("button",{class:"md-clipboard md-icon",title:be("clipboard.copy"),"data-clipboard-target":`#${e} > code`})}function Ur(e,t){let r=t&2,o=t&1,n=Object.keys(e.terms).filter(c=>!e.terms[c]).reduce((c,p)=>[...c,T("del",null,p)," "],[]).slice(0,-1),i=me(),s=new URL(e.location,i.base);te("search.highlight")&&s.searchParams.set("h",Object.entries(e.terms).filter(([,c])=>c).reduce((c,[p])=>`${c} ${p}`.trim(),""));let{tags:a}=me();return T("a",{href:`${s}`,class:"md-search-result__link",tabIndex:-1},T("article",{class:"md-search-result__article md-typeset","data-md-score":e.score.toFixed(2)},r>0&&T("div",{class:"md-search-result__icon md-icon"}),r>0&&T("h1",null,e.title),r<=0&&T("h2",null,e.title),o>0&&e.text.length>0&&e.text,e.tags&&e.tags.map(c=>{let p=a?c in a?`md-tag-icon md-tag--${a[c]}`:"md-tag-icon":"";return T("span",{class:`md-tag ${p}`},c)}),o>0&&n.length>0&&T("p",{class:"md-search-result__terms"},be("search.result.term.missing"),": ",...n)))}function fn(e){let t=e[0].score,r=[...e],o=me(),n=r.findIndex(l=>!`${new URL(l.location,o.base)}`.includes("#")),[i]=r.splice(n,1),s=r.findIndex(l=>l.scoreUr(l,1)),...c.length?[T("details",{class:"md-search-result__more"},T("summary",{tabIndex:-1},T("div",null,c.length>0&&c.length===1?be("search.result.more.one"):be("search.result.more.other",c.length))),...c.map(l=>Ur(l,1)))]:[]];return T("li",{class:"md-search-result__item"},p)}function un(e){return T("ul",{class:"md-source__facts"},Object.entries(e).map(([t,r])=>T("li",{class:`md-source__fact md-source__fact--${t}`},typeof r=="number"?tr(r):r)))}function Nr(e){let t=`tabbed-control tabbed-control--${e}`;return T("div",{class:t,hidden:!0},T("button",{class:"tabbed-button",tabIndex:-1,"aria-hidden":"true"}))}function dn(e){return T("div",{class:"md-typeset__scrollwrap"},T("div",{class:"md-typeset__table"},e))}function ba(e){let t=me(),r=new URL(`../${e.version}/`,t.base);return T("li",{class:"md-version__item"},T("a",{href:`${r}`,class:"md-version__link"},e.title))}function hn(e,t){return T("div",{class:"md-version"},T("button",{class:"md-version__current","aria-label":be("select.version")},t.title),T("ul",{class:"md-version__list"},e.map(ba)))}function va(e){return e.tagName==="CODE"?q(".c, .c1, .cm",e):[e]}function ga(e){let t=[];for(let r of va(e)){let o=[],n=document.createNodeIterator(r,NodeFilter.SHOW_TEXT);for(let i=n.nextNode();i;i=n.nextNode())o.push(i);for(let i of o){let s;for(;s=/(\(\d+\))(!)?/.exec(i.textContent);){let[,a,c]=s;if(typeof c=="undefined"){let p=i.splitText(s.index);i=p.splitText(a.length),t.push(p)}else{i.textContent=a,t.push(i);break}}}}return t}function bn(e,t){t.append(...Array.from(e.childNodes))}function sr(e,t,{target$:r,print$:o}){let n=t.closest("[id]"),i=n==null?void 0:n.id,s=new Map;for(let a of ga(t)){let[,c]=a.textContent.match(/\((\d+)\)/);se(`:scope > li:nth-child(${c})`,e)&&(s.set(c,ln(c,i)),a.replaceWith(s.get(c)))}return s.size===0?L:H(()=>{let a=new x,c=a.pipe(Z(),re(!0)),p=[];for(let[l,f]of s)p.push([N(".md-typeset",f),N(`:scope > li:nth-child(${l})`,e)]);return o.pipe(Y(c)).subscribe(l=>{e.hidden=!l,e.classList.toggle("md-annotation-list",l);for(let[f,u]of p)l?bn(f,u):bn(u,f)}),_(...[...s].map(([,l])=>pn(l,t,{target$:r}))).pipe(A(()=>a.complete()),le())})}function vn(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return vn(t)}}function gn(e,t){return H(()=>{let r=vn(e);return typeof r!="undefined"?sr(r,e,t):L})}var yn=Ht(Vr());var xa=0;function En(e){if(e.nextElementSibling){let t=e.nextElementSibling;if(t.tagName==="OL")return t;if(t.tagName==="P"&&!t.children.length)return En(t)}}function xn(e){return ye(e).pipe(m(({width:t})=>({scrollable:bt(e).width>t})),ee("scrollable"))}function wn(e,t){let{matches:r}=matchMedia("(hover)"),o=H(()=>{let n=new x;if(n.subscribe(({scrollable:s})=>{s&&r?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}),yn.default.isSupported()&&(e.closest(".copy")||te("content.code.copy")&&!e.closest(".no-copy"))){let s=e.closest("pre");s.id=`__code_${xa++}`,s.insertBefore(mn(s.id),e)}let i=e.closest(".highlight");if(i instanceof HTMLElement){let s=En(i);if(typeof s!="undefined"&&(i.classList.contains("annotate")||te("content.code.annotate"))){let a=sr(s,e,t);return xn(e).pipe(w(c=>n.next(c)),A(()=>n.complete()),m(c=>R({ref:e},c)),qe(ye(i).pipe(m(({width:c,height:p})=>c&&p),X(),E(c=>c?a:L))))}}return xn(e).pipe(w(s=>n.next(s)),A(()=>n.complete()),m(s=>R({ref:e},s)))});return te("content.lazy")?rr(e).pipe(M(n=>n),xe(1),E(()=>o)):o}function ya(e,{target$:t,print$:r}){let o=!0;return _(t.pipe(m(n=>n.closest("details:not([open])")),M(n=>e===n),m(()=>({action:"open",reveal:!0}))),r.pipe(M(n=>n||!o),w(()=>o=e.open),m(n=>({action:n?"open":"close"}))))}function Sn(e,t){return H(()=>{let r=new x;return r.subscribe(({action:o,reveal:n})=>{e.toggleAttribute("open",o==="open"),n&&e.scrollIntoView()}),ya(e,t).pipe(w(o=>r.next(o)),A(()=>r.complete()),m(o=>R({ref:e},o)))})}var Tn=".node circle,.node ellipse,.node path,.node polygon,.node rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}marker{fill:var(--md-mermaid-edge-color)!important}.edgeLabel .label rect{fill:#0000}.label{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.label foreignObject{line-height:normal;overflow:visible}.label div .edgeLabel{color:var(--md-mermaid-label-fg-color)}.edgeLabel,.edgeLabel rect,.label div .edgeLabel{background-color:var(--md-mermaid-label-bg-color)}.edgeLabel,.edgeLabel rect{fill:var(--md-mermaid-label-bg-color);color:var(--md-mermaid-edge-color)}.edgePath .path,.flowchart-link{stroke:var(--md-mermaid-edge-color);stroke-width:.05rem}.edgePath .arrowheadPath{fill:var(--md-mermaid-edge-color);stroke:none}.cluster rect{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}.cluster span{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}g #flowchart-circleEnd,g #flowchart-circleStart,g #flowchart-crossEnd,g #flowchart-crossStart,g #flowchart-pointEnd,g #flowchart-pointStart{stroke:none}g.classGroup line,g.classGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.classGroup text{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.classLabel .box{fill:var(--md-mermaid-label-bg-color);background-color:var(--md-mermaid-label-bg-color);opacity:1}.classLabel .label{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node .divider{stroke:var(--md-mermaid-node-fg-color)}.relation{stroke:var(--md-mermaid-edge-color)}.cardinality{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.cardinality text{fill:inherit!important}defs #classDiagram-compositionEnd,defs #classDiagram-compositionStart,defs #classDiagram-dependencyEnd,defs #classDiagram-dependencyStart,defs #classDiagram-extensionEnd,defs #classDiagram-extensionStart{fill:var(--md-mermaid-edge-color)!important;stroke:var(--md-mermaid-edge-color)!important}defs #classDiagram-aggregationEnd,defs #classDiagram-aggregationStart{fill:var(--md-mermaid-label-bg-color)!important;stroke:var(--md-mermaid-edge-color)!important}g.stateGroup rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}g.stateGroup .state-title{fill:var(--md-mermaid-label-fg-color)!important;font-family:var(--md-mermaid-font-family)}g.stateGroup .composit{fill:var(--md-mermaid-label-bg-color)}.nodeLabel{color:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.node circle.state-end,.node circle.state-start,.start-state{fill:var(--md-mermaid-edge-color);stroke:none}.end-state-inner,.end-state-outer{fill:var(--md-mermaid-edge-color)}.end-state-inner,.node circle.state-end{stroke:var(--md-mermaid-label-bg-color)}.transition{stroke:var(--md-mermaid-edge-color)}[id^=state-fork] rect,[id^=state-join] rect{fill:var(--md-mermaid-edge-color)!important;stroke:none!important}.statediagram-cluster.statediagram-cluster .inner{fill:var(--md-default-bg-color)}.statediagram-cluster rect{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.statediagram-state rect.divider{fill:var(--md-default-fg-color--lightest);stroke:var(--md-default-fg-color--lighter)}defs #statediagram-barbEnd{stroke:var(--md-mermaid-edge-color)}.attributeBoxEven,.attributeBoxOdd{fill:var(--md-mermaid-node-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityBox{fill:var(--md-mermaid-label-bg-color);stroke:var(--md-mermaid-node-fg-color)}.entityLabel{fill:var(--md-mermaid-label-fg-color);font-family:var(--md-mermaid-font-family)}.relationshipLabelBox{fill:var(--md-mermaid-label-bg-color);fill-opacity:1;background-color:var(--md-mermaid-label-bg-color);opacity:1}.relationshipLabel{fill:var(--md-mermaid-label-fg-color)}.relationshipLine{stroke:var(--md-mermaid-edge-color)}defs #ONE_OR_MORE_END *,defs #ONE_OR_MORE_START *,defs #ONLY_ONE_END *,defs #ONLY_ONE_START *,defs #ZERO_OR_MORE_END *,defs #ZERO_OR_MORE_START *,defs #ZERO_OR_ONE_END *,defs #ZERO_OR_ONE_START *{stroke:var(--md-mermaid-edge-color)!important}defs #ZERO_OR_MORE_END circle,defs #ZERO_OR_MORE_START circle{fill:var(--md-mermaid-label-bg-color)}.actor{fill:var(--md-mermaid-sequence-actor-bg-color);stroke:var(--md-mermaid-sequence-actor-border-color)}text.actor>tspan{fill:var(--md-mermaid-sequence-actor-fg-color);font-family:var(--md-mermaid-font-family)}line{stroke:var(--md-mermaid-sequence-actor-line-color)}.actor-man circle,.actor-man line{fill:var(--md-mermaid-sequence-actorman-bg-color);stroke:var(--md-mermaid-sequence-actorman-line-color)}.messageLine0,.messageLine1{stroke:var(--md-mermaid-sequence-message-line-color)}.note{fill:var(--md-mermaid-sequence-note-bg-color);stroke:var(--md-mermaid-sequence-note-border-color)}.loopText,.loopText>tspan,.messageText,.noteText>tspan{stroke:none;font-family:var(--md-mermaid-font-family)!important}.messageText{fill:var(--md-mermaid-sequence-message-fg-color)}.loopText,.loopText>tspan{fill:var(--md-mermaid-sequence-loop-fg-color)}.noteText>tspan{fill:var(--md-mermaid-sequence-note-fg-color)}#arrowhead path{fill:var(--md-mermaid-sequence-message-line-color);stroke:none}.loopLine{fill:var(--md-mermaid-sequence-loop-bg-color);stroke:var(--md-mermaid-sequence-loop-border-color)}.labelBox{fill:var(--md-mermaid-sequence-label-bg-color);stroke:none}.labelText,.labelText>span{fill:var(--md-mermaid-sequence-label-fg-color);font-family:var(--md-mermaid-font-family)}.sequenceNumber{fill:var(--md-mermaid-sequence-number-fg-color)}rect.rect{fill:var(--md-mermaid-sequence-box-bg-color);stroke:none}rect.rect+text.text{fill:var(--md-mermaid-sequence-box-fg-color)}defs #sequencenumber{fill:var(--md-mermaid-sequence-number-bg-color)!important}";var zr,wa=0;function Sa(){return typeof mermaid=="undefined"||mermaid instanceof Element?ht("https://unpkg.com/mermaid@9.4.3/dist/mermaid.min.js"):j(void 0)}function On(e){return e.classList.remove("mermaid"),zr||(zr=Sa().pipe(w(()=>mermaid.initialize({startOnLoad:!1,themeCSS:Tn,sequence:{actorFontSize:"16px",messageFontSize:"16px",noteFontSize:"16px"}})),m(()=>{}),J(1))),zr.subscribe(()=>{e.classList.add("mermaid");let t=`__mermaid_${wa++}`,r=T("div",{class:"mermaid"}),o=e.textContent;mermaid.mermaidAPI.render(t,o,(n,i)=>{let s=r.attachShadow({mode:"closed"});s.innerHTML=n,e.replaceWith(r),i==null||i(s)})}),zr.pipe(m(()=>({ref:e})))}var Mn=T("table");function Ln(e){return e.replaceWith(Mn),Mn.replaceWith(dn(e)),j({ref:e})}function Ta(e){let t=q(":scope > input",e),r=t.find(o=>o.checked)||t[0];return _(...t.map(o=>h(o,"change").pipe(m(()=>N(`label[for="${o.id}"]`))))).pipe(V(N(`label[for="${r.id}"]`)),m(o=>({active:o})))}function _n(e,{viewport$:t}){let r=Nr("prev");e.append(r);let o=Nr("next");e.append(o);let n=N(".tabbed-labels",e);return H(()=>{let i=new x,s=i.pipe(Z(),re(!0));return B([i,ye(e)]).pipe(Ce(1,Oe),Y(s)).subscribe({next([{active:a},c]){let p=Je(a),{width:l}=he(a);e.style.setProperty("--md-indicator-x",`${p.x}px`),e.style.setProperty("--md-indicator-width",`${l}px`);let f=er(n);(p.xf.x+c.width)&&n.scrollTo({left:Math.max(0,p.x-16),behavior:"smooth"})},complete(){e.style.removeProperty("--md-indicator-x"),e.style.removeProperty("--md-indicator-width")}}),B([dt(n),ye(n)]).pipe(Y(s)).subscribe(([a,c])=>{let p=bt(n);r.hidden=a.x<16,o.hidden=a.x>p.width-c.width-16}),_(h(r,"click").pipe(m(()=>-1)),h(o,"click").pipe(m(()=>1))).pipe(Y(s)).subscribe(a=>{let{width:c}=he(n);n.scrollBy({left:c*a,behavior:"smooth"})}),te("content.tabs.link")&&i.pipe(je(1),ne(t)).subscribe(([{active:a},{offset:c}])=>{let p=a.innerText.trim();if(a.hasAttribute("data-md-switching"))a.removeAttribute("data-md-switching");else{let l=e.offsetTop-c.y;for(let u of q("[data-tabs]"))for(let d of q(":scope > input",u)){let v=N(`label[for="${d.id}"]`);if(v!==a&&v.innerText.trim()===p){v.setAttribute("data-md-switching",""),d.click();break}}window.scrollTo({top:e.offsetTop-l});let f=__md_get("__tabs")||[];__md_set("__tabs",[...new Set([p,...f])])}}),i.pipe(Y(s)).subscribe(()=>{for(let a of q("audio, video",e))a.pause()}),Ta(e).pipe(w(a=>i.next(a)),A(()=>i.complete()),m(a=>R({ref:e},a)))}).pipe(rt(ae))}function An(e,{viewport$:t,target$:r,print$:o}){return _(...q(".annotate:not(.highlight)",e).map(n=>gn(n,{target$:r,print$:o})),...q("pre:not(.mermaid) > code",e).map(n=>wn(n,{target$:r,print$:o})),...q("pre.mermaid",e).map(n=>On(n)),...q("table:not([class])",e).map(n=>Ln(n)),...q("details",e).map(n=>Sn(n,{target$:r,print$:o})),...q("[data-tabs]",e).map(n=>_n(n,{viewport$:t})))}function Oa(e,{alert$:t}){return t.pipe(E(r=>_(j(!0),j(!1).pipe(ze(2e3))).pipe(m(o=>({message:r,active:o})))))}function Cn(e,t){let r=N(".md-typeset",e);return H(()=>{let o=new x;return o.subscribe(({message:n,active:i})=>{e.classList.toggle("md-dialog--active",i),r.textContent=n}),Oa(e,t).pipe(w(n=>o.next(n)),A(()=>o.complete()),m(n=>R({ref:e},n)))})}function Ma({viewport$:e}){if(!te("header.autohide"))return j(!1);let t=e.pipe(m(({offset:{y:n}})=>n),Le(2,1),m(([n,i])=>[nMath.abs(i-n.y)>100),m(([,[n]])=>n),X()),o=We("search");return B([e,o]).pipe(m(([{offset:n},i])=>n.y>400&&!i),X(),E(n=>n?r:j(!1)),V(!1))}function kn(e,t){return H(()=>B([ye(e),Ma(t)])).pipe(m(([{height:r},o])=>({height:r,hidden:o})),X((r,o)=>r.height===o.height&&r.hidden===o.hidden),J(1))}function Hn(e,{header$:t,main$:r}){return H(()=>{let o=new x,n=o.pipe(Z(),re(!0));return o.pipe(ee("active"),Ge(t)).subscribe(([{active:i},{hidden:s}])=>{e.classList.toggle("md-header--shadow",i&&!s),e.hidden=s}),r.subscribe(o),t.pipe(Y(n),m(i=>R({ref:e},i)))})}function La(e,{viewport$:t,header$:r}){return ar(e,{viewport$:t,header$:r}).pipe(m(({offset:{y:o}})=>{let{height:n}=he(e);return{active:o>=n}}),ee("active"))}function $n(e,t){return H(()=>{let r=new x;r.subscribe({next({active:n}){e.classList.toggle("md-header__title--active",n)},complete(){e.classList.remove("md-header__title--active")}});let o=se(".md-content h1");return typeof o=="undefined"?L:La(o,t).pipe(w(n=>r.next(n)),A(()=>r.complete()),m(n=>R({ref:e},n)))})}function Rn(e,{viewport$:t,header$:r}){let o=r.pipe(m(({height:i})=>i),X()),n=o.pipe(E(()=>ye(e).pipe(m(({height:i})=>({top:e.offsetTop,bottom:e.offsetTop+i})),ee("bottom"))));return B([o,n,t]).pipe(m(([i,{top:s,bottom:a},{offset:{y:c},size:{height:p}}])=>(p=Math.max(0,p-Math.max(0,s-c,i)-Math.max(0,p+c-a)),{offset:s-i,height:p,active:s-i<=c})),X((i,s)=>i.offset===s.offset&&i.height===s.height&&i.active===s.active))}function _a(e){let t=__md_get("__palette")||{index:e.findIndex(r=>matchMedia(r.getAttribute("data-md-color-media")).matches)};return j(...e).pipe(ce(r=>h(r,"change").pipe(m(()=>r))),V(e[Math.max(0,t.index)]),m(r=>({index:e.indexOf(r),color:{scheme:r.getAttribute("data-md-color-scheme"),primary:r.getAttribute("data-md-color-primary"),accent:r.getAttribute("data-md-color-accent")}})),J(1))}function Pn(e){let t=T("meta",{name:"theme-color"});document.head.appendChild(t);let r=T("meta",{name:"color-scheme"});return document.head.appendChild(r),H(()=>{let o=new x;o.subscribe(i=>{document.body.setAttribute("data-md-color-switching","");for(let[s,a]of Object.entries(i.color))document.body.setAttribute(`data-md-color-${s}`,a);for(let s=0;s{let i=Ee("header"),s=window.getComputedStyle(i);return r.content=s.colorScheme,s.backgroundColor.match(/\d+/g).map(a=>(+a).toString(16).padStart(2,"0")).join("")})).subscribe(i=>t.content=`#${i}`),o.pipe(Se(ae)).subscribe(()=>{document.body.removeAttribute("data-md-color-switching")});let n=q("input",e);return _a(n).pipe(w(i=>o.next(i)),A(()=>o.complete()),m(i=>R({ref:e},i)))})}function In(e,{progress$:t}){return H(()=>{let r=new x;return r.subscribe(({value:o})=>{e.style.setProperty("--md-progress-value",`${o}`)}),t.pipe(w(o=>r.next({value:o})),A(()=>r.complete()),m(o=>({ref:e,value:o})))})}var qr=Ht(Vr());function Aa(e){e.setAttribute("data-md-copying","");let t=e.closest("[data-copy]"),r=t?t.getAttribute("data-copy"):e.innerText;return e.removeAttribute("data-md-copying"),r}function Fn({alert$:e}){qr.default.isSupported()&&new P(t=>{new qr.default("[data-clipboard-target], [data-clipboard-text]",{text:r=>r.getAttribute("data-clipboard-text")||Aa(N(r.getAttribute("data-clipboard-target")))}).on("success",r=>t.next(r))}).pipe(w(t=>{t.trigger.focus()}),m(()=>be("clipboard.copied"))).subscribe(e)}function Ca(e){if(e.length<2)return[""];let[t,r]=[...e].sort((n,i)=>n.length-i.length).map(n=>n.replace(/[^/]+$/,"")),o=0;if(t===r)o=t.length;else for(;t.charCodeAt(o)===r.charCodeAt(o);)o++;return e.map(n=>n.replace(t.slice(0,o),""))}function cr(e){let t=__md_get("__sitemap",sessionStorage,e);if(t)return j(t);{let r=me();return Zo(new URL("sitemap.xml",e||r.base)).pipe(m(o=>Ca(q("loc",o).map(n=>n.textContent))),de(()=>L),He([]),w(o=>__md_set("__sitemap",o,sessionStorage,e)))}}function jn(e){let t=se("[rel=canonical]",e);typeof t!="undefined"&&(t.href=t.href.replace("//localhost:","//127.0.0.1:"));let r=new Map;for(let o of q(":scope > *",e)){let n=o.outerHTML;for(let i of["href","src"]){let s=o.getAttribute(i);if(s===null)continue;let a=new URL(s,t==null?void 0:t.href),c=o.cloneNode();c.setAttribute(i,`${a}`),n=c.outerHTML;break}r.set(n,o)}return r}function Wn({location$:e,viewport$:t,progress$:r}){let o=me();if(location.protocol==="file:")return L;let n=cr().pipe(m(l=>l.map(f=>`${new URL(f,o.base)}`))),i=h(document.body,"click").pipe(ne(n),E(([l,f])=>{if(!(l.target instanceof Element))return L;let u=l.target.closest("a");if(u===null)return L;if(u.target||l.metaKey||l.ctrlKey)return L;let d=new URL(u.href);return d.search=d.hash="",f.includes(`${d}`)?(l.preventDefault(),j(new URL(u.href))):L}),le());i.pipe(xe(1)).subscribe(()=>{let l=se("link[rel=icon]");typeof l!="undefined"&&(l.href=l.href)}),h(window,"beforeunload").subscribe(()=>{history.scrollRestoration="auto"}),i.pipe(ne(t)).subscribe(([l,{offset:f}])=>{history.scrollRestoration="manual",history.replaceState(f,""),history.pushState(null,"",l)}),i.subscribe(e);let s=e.pipe(V(pe()),ee("pathname"),je(1),E(l=>ir(l,{progress$:r}).pipe(de(()=>(ot(l,!0),L))))),a=new DOMParser,c=s.pipe(E(l=>l.text()),E(l=>{let f=a.parseFromString(l,"text/html");for(let b of["[data-md-component=announce]","[data-md-component=container]","[data-md-component=header-topic]","[data-md-component=outdated]","[data-md-component=logo]","[data-md-component=skip]",...te("navigation.tabs.sticky")?["[data-md-component=tabs]"]:[]]){let z=se(b),K=se(b,f);typeof z!="undefined"&&typeof K!="undefined"&&z.replaceWith(K)}let u=jn(document.head),d=jn(f.head);for(let[b,z]of d)z.getAttribute("rel")==="stylesheet"||z.hasAttribute("src")||(u.has(b)?u.delete(b):document.head.appendChild(z));for(let b of u.values())b.getAttribute("rel")==="stylesheet"||b.hasAttribute("src")||b.remove();let v=Ee("container");return Fe(q("script",v)).pipe(E(b=>{let z=f.createElement("script");if(b.src){for(let K of b.getAttributeNames())z.setAttribute(K,b.getAttribute(K));return b.replaceWith(z),new P(K=>{z.onload=()=>K.complete()})}else return z.textContent=b.textContent,b.replaceWith(z),L}),Z(),re(f))}),le());return h(window,"popstate").pipe(m(pe)).subscribe(e),e.pipe(V(pe()),Le(2,1),M(([l,f])=>l.pathname===f.pathname&&l.hash!==f.hash),m(([,l])=>l)).subscribe(l=>{var f,u;history.state!==null||!l.hash?window.scrollTo(0,(u=(f=history.state)==null?void 0:f.y)!=null?u:0):(history.scrollRestoration="auto",nr(l.hash),history.scrollRestoration="manual")}),e.pipe(Cr(i),V(pe()),Le(2,1),M(([l,f])=>l.pathname===f.pathname&&l.hash===f.hash),m(([,l])=>l)).subscribe(l=>{history.scrollRestoration="auto",nr(l.hash),history.scrollRestoration="manual",history.back()}),c.pipe(ne(e)).subscribe(([,l])=>{var f,u;history.state!==null||!l.hash?window.scrollTo(0,(u=(f=history.state)==null?void 0:f.y)!=null?u:0):nr(l.hash)}),t.pipe(ee("offset"),ke(100)).subscribe(({offset:l})=>{history.replaceState(l,"")}),c}var Dn=Ht(Nn());function Vn(e){let t=e.separator.split("|").map(n=>n.replace(/(\(\?[!=<][^)]+\))/g,"").length===0?"\uFFFD":n).join("|"),r=new RegExp(t,"img"),o=(n,i,s)=>`${i}${s}`;return n=>{n=n.replace(/[\s*+\-:~^]+/g," ").trim();let i=new RegExp(`(^|${e.separator}|)(${n.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&").replace(r,"|")})`,"img");return s=>(0,Dn.default)(s).replace(i,o).replace(/<\/mark>(\s+)]*>/img,"$1")}}function Mt(e){return e.type===1}function pr(e){return e.type===3}function zn(e,t){let r=an(e);return _(j(location.protocol!=="file:"),We("search")).pipe($e(o=>o),E(()=>t)).subscribe(({config:o,docs:n})=>r.next({type:0,data:{config:o,docs:n,options:{suggest:te("search.suggest")}}})),r}function qn({document$:e}){let t=me(),r=Ue(new URL("../versions.json",t.base)).pipe(de(()=>L)),o=r.pipe(m(n=>{let[,i]=t.base.match(/([^/]+)\/?$/);return n.find(({version:s,aliases:a})=>s===i||a.includes(i))||n[0]}));r.pipe(m(n=>new Map(n.map(i=>[`${new URL(`../${i.version}/`,t.base)}`,i]))),E(n=>h(document.body,"click").pipe(M(i=>!i.metaKey&&!i.ctrlKey),ne(o),E(([i,s])=>{if(i.target instanceof Element){let a=i.target.closest("a");if(a&&!a.target&&n.has(a.href)){let c=a.href;return!i.target.closest(".md-version")&&n.get(c)===s?L:(i.preventDefault(),j(c))}}return L}),E(i=>{let{version:s}=n.get(i);return cr(new URL(i)).pipe(m(a=>{let p=pe().href.replace(t.base,"");return a.includes(p.split("#")[0])?new URL(`../${s}/${p}`,t.base):new URL(i)}))})))).subscribe(n=>ot(n,!0)),B([r,o]).subscribe(([n,i])=>{N(".md-header__topic").appendChild(hn(n,i))}),e.pipe(E(()=>o)).subscribe(n=>{var s;let i=__md_get("__outdated",sessionStorage);if(i===null){i=!0;let a=((s=t.version)==null?void 0:s.default)||"latest";Array.isArray(a)||(a=[a]);e:for(let c of a)for(let p of n.aliases)if(new RegExp(c,"i").test(p)){i=!1;break e}__md_set("__outdated",i,sessionStorage)}if(i)for(let a of oe("outdated"))a.hidden=!1})}function Pa(e,{worker$:t}){let{searchParams:r}=pe();r.has("q")&&(Ke("search",!0),e.value=r.get("q"),e.focus(),We("search").pipe($e(i=>!i)).subscribe(()=>{let i=pe();i.searchParams.delete("q"),history.replaceState({},"",`${i}`)}));let o=Zt(e),n=_(t.pipe($e(Mt)),h(e,"keyup"),o).pipe(m(()=>e.value),X());return B([n,o]).pipe(m(([i,s])=>({value:i,focus:s})),J(1))}function Kn(e,{worker$:t}){let r=new x,o=r.pipe(Z(),re(!0));B([t.pipe($e(Mt)),r],(i,s)=>s).pipe(ee("value")).subscribe(({value:i})=>t.next({type:2,data:i})),r.pipe(ee("focus")).subscribe(({focus:i})=>{i&&Ke("search",i)}),h(e.form,"reset").pipe(Y(o)).subscribe(()=>e.focus());let n=N("header [for=__search]");return h(n,"click").subscribe(()=>e.focus()),Pa(e,{worker$:t}).pipe(w(i=>r.next(i)),A(()=>r.complete()),m(i=>R({ref:e},i)),J(1))}function Qn(e,{worker$:t,query$:r}){let o=new x,n=Ko(e.parentElement).pipe(M(Boolean)),i=e.parentElement,s=N(":scope > :first-child",e),a=N(":scope > :last-child",e);We("search").subscribe(l=>a.setAttribute("role",l?"list":"presentation")),o.pipe(ne(r),$r(t.pipe($e(Mt)))).subscribe(([{items:l},{value:f}])=>{switch(l.length){case 0:s.textContent=f.length?be("search.result.none"):be("search.result.placeholder");break;case 1:s.textContent=be("search.result.one");break;default:let u=tr(l.length);s.textContent=be("search.result.other",u)}});let c=o.pipe(w(()=>a.innerHTML=""),E(({items:l})=>_(j(...l.slice(0,10)),j(...l.slice(10)).pipe(Le(4),Ir(n),E(([f])=>f)))),m(fn),le());return c.subscribe(l=>a.appendChild(l)),c.pipe(ce(l=>{let f=se("details",l);return typeof f=="undefined"?L:h(f,"toggle").pipe(Y(o),m(()=>f))})).subscribe(l=>{l.open===!1&&l.offsetTop<=i.scrollTop&&i.scrollTo({top:l.offsetTop})}),t.pipe(M(pr),m(({data:l})=>l)).pipe(w(l=>o.next(l)),A(()=>o.complete()),m(l=>R({ref:e},l)))}function Ia(e,{query$:t}){return t.pipe(m(({value:r})=>{let o=pe();return o.hash="",r=r.replace(/\s+/g,"+").replace(/&/g,"%26").replace(/=/g,"%3D"),o.search=`q=${r}`,{url:o}}))}function Yn(e,t){let r=new x,o=r.pipe(Z(),re(!0));return r.subscribe(({url:n})=>{e.setAttribute("data-clipboard-text",e.href),e.href=`${n}`}),h(e,"click").pipe(Y(o)).subscribe(n=>n.preventDefault()),Ia(e,t).pipe(w(n=>r.next(n)),A(()=>r.complete()),m(n=>R({ref:e},n)))}function Bn(e,{worker$:t,keyboard$:r}){let o=new x,n=Ee("search-query"),i=_(h(n,"keydown"),h(n,"focus")).pipe(Se(ae),m(()=>n.value),X());return o.pipe(Ge(i),m(([{suggest:a},c])=>{let p=c.split(/([\s-]+)/);if(a!=null&&a.length&&p[p.length-1]){let l=a[a.length-1];l.startsWith(p[p.length-1])&&(p[p.length-1]=l)}else p.length=0;return p})).subscribe(a=>e.innerHTML=a.join("").replace(/\s/g," ")),r.pipe(M(({mode:a})=>a==="search")).subscribe(a=>{switch(a.type){case"ArrowRight":e.innerText.length&&n.selectionStart===n.value.length&&(n.value=e.innerText);break}}),t.pipe(M(pr),m(({data:a})=>a)).pipe(w(a=>o.next(a)),A(()=>o.complete()),m(()=>({ref:e})))}function Gn(e,{index$:t,keyboard$:r}){let o=me();try{let n=zn(o.search,t),i=Ee("search-query",e),s=Ee("search-result",e);h(e,"click").pipe(M(({target:c})=>c instanceof Element&&!!c.closest("a"))).subscribe(()=>Ke("search",!1)),r.pipe(M(({mode:c})=>c==="search")).subscribe(c=>{let p=Re();switch(c.type){case"Enter":if(p===i){let l=new Map;for(let f of q(":first-child [href]",s)){let u=f.firstElementChild;l.set(f,parseFloat(u.getAttribute("data-md-score")))}if(l.size){let[[f]]=[...l].sort(([,u],[,d])=>d-u);f.click()}c.claim()}break;case"Escape":case"Tab":Ke("search",!1),i.blur();break;case"ArrowUp":case"ArrowDown":if(typeof p=="undefined")i.focus();else{let l=[i,...q(":not(details) > [href], summary, details[open] [href]",s)],f=Math.max(0,(Math.max(0,l.indexOf(p))+l.length+(c.type==="ArrowUp"?-1:1))%l.length);l[f].focus()}c.claim();break;default:i!==Re()&&i.focus()}}),r.pipe(M(({mode:c})=>c==="global")).subscribe(c=>{switch(c.type){case"f":case"s":case"/":i.focus(),i.select(),c.claim();break}});let a=Kn(i,{worker$:n});return _(a,Qn(s,{worker$:n,query$:a})).pipe(qe(...oe("search-share",e).map(c=>Yn(c,{query$:a})),...oe("search-suggest",e).map(c=>Bn(c,{worker$:n,keyboard$:r}))))}catch(n){return e.hidden=!0,Ve}}function Jn(e,{index$:t,location$:r}){return B([t,r.pipe(V(pe()),M(o=>!!o.searchParams.get("h")))]).pipe(m(([o,n])=>Vn(o.config)(n.searchParams.get("h"))),m(o=>{var s;let n=new Map,i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT);for(let a=i.nextNode();a;a=i.nextNode())if((s=a.parentElement)!=null&&s.offsetHeight){let c=a.textContent,p=o(c);p.length>c.length&&n.set(a,p)}for(let[a,c]of n){let{childNodes:p}=T("span",null,c);a.replaceWith(...Array.from(p))}return{ref:e,nodes:n}}))}function Fa(e,{viewport$:t,main$:r}){let o=e.closest(".md-grid"),n=o.offsetTop-o.parentElement.offsetTop;return B([r,t]).pipe(m(([{offset:i,height:s},{offset:{y:a}}])=>(s=s+Math.min(n,Math.max(0,a-i))-n,{height:s,locked:a>=i+n})),X((i,s)=>i.height===s.height&&i.locked===s.locked))}function Kr(e,o){var n=o,{header$:t}=n,r=eo(n,["header$"]);let i=N(".md-sidebar__scrollwrap",e),{y:s}=Je(i);return H(()=>{let a=new x,c=a.pipe(Z(),re(!0)),p=a.pipe(Ce(0,Oe));return p.pipe(ne(t)).subscribe({next([{height:l},{height:f}]){i.style.height=`${l-2*s}px`,e.style.top=`${f}px`},complete(){i.style.height="",e.style.top=""}}),p.pipe($e()).subscribe(()=>{for(let l of q(".md-nav__link--active[href]",e)){if(!l.clientHeight)continue;let f=l.closest(".md-sidebar__scrollwrap");if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:d}=he(f);f.scrollTo({top:u-d/2})}}}),ge(q("label[tabindex]",e)).pipe(ce(l=>h(l,"click").pipe(Se(ae),m(()=>l),Y(c)))).subscribe(l=>{let f=N(`[id="${l.htmlFor}"]`);N(`[aria-labelledby="${l.id}"]`).setAttribute("aria-expanded",`${f.checked}`)}),Fa(e,r).pipe(w(l=>a.next(l)),A(()=>a.complete()),m(l=>R({ref:e},l)))})}function Xn(e,t){if(typeof t!="undefined"){let r=`https://api.github.com/repos/${e}/${t}`;return St(Ue(`${r}/releases/latest`).pipe(de(()=>L),m(o=>({version:o.tag_name})),He({})),Ue(r).pipe(de(()=>L),m(o=>({stars:o.stargazers_count,forks:o.forks_count})),He({}))).pipe(m(([o,n])=>R(R({},o),n)))}else{let r=`https://api.github.com/users/${e}`;return Ue(r).pipe(m(o=>({repositories:o.public_repos})),He({}))}}function Zn(e,t){let r=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return Ue(r).pipe(de(()=>L),m(({star_count:o,forks_count:n})=>({stars:o,forks:n})),He({}))}function ei(e){let t=e.match(/^.+github\.com\/([^/]+)\/?([^/]+)?/i);if(t){let[,r,o]=t;return Xn(r,o)}if(t=e.match(/^.+?([^/]*gitlab[^/]+)\/(.+?)\/?$/i),t){let[,r,o]=t;return Zn(r,o)}return L}var ja;function Wa(e){return ja||(ja=H(()=>{let t=__md_get("__source",sessionStorage);if(t)return j(t);if(oe("consent").length){let o=__md_get("__consent");if(!(o&&o.github))return L}return ei(e.href).pipe(w(o=>__md_set("__source",o,sessionStorage)))}).pipe(de(()=>L),M(t=>Object.keys(t).length>0),m(t=>({facts:t})),J(1)))}function ti(e){let t=N(":scope > :last-child",e);return H(()=>{let r=new x;return r.subscribe(({facts:o})=>{t.appendChild(un(o)),t.classList.add("md-source__repository--active")}),Wa(e).pipe(w(o=>r.next(o)),A(()=>r.complete()),m(o=>R({ref:e},o)))})}function Ua(e,{viewport$:t,header$:r}){return ye(document.body).pipe(E(()=>ar(e,{header$:r,viewport$:t})),m(({offset:{y:o}})=>({hidden:o>=10})),ee("hidden"))}function ri(e,t){return H(()=>{let r=new x;return r.subscribe({next({hidden:o}){e.hidden=o},complete(){e.hidden=!1}}),(te("navigation.tabs.sticky")?j({hidden:!1}):Ua(e,t)).pipe(w(o=>r.next(o)),A(()=>r.complete()),m(o=>R({ref:e},o)))})}function Na(e,{viewport$:t,header$:r}){let o=new Map,n=q("[href^=\\#]",e);for(let a of n){let c=decodeURIComponent(a.hash.substring(1)),p=se(`[id="${c}"]`);typeof p!="undefined"&&o.set(a,p)}let i=r.pipe(ee("height"),m(({height:a})=>{let c=Ee("main"),p=N(":scope > :first-child",c);return a+.8*(p.offsetTop-c.offsetTop)}),le());return ye(document.body).pipe(ee("height"),E(a=>H(()=>{let c=[];return j([...o].reduce((p,[l,f])=>{for(;c.length&&o.get(c[c.length-1]).tagName>=f.tagName;)c.pop();let u=f.offsetTop;for(;!u&&f.parentElement;)f=f.parentElement,u=f.offsetTop;let d=f.offsetParent;for(;d;d=d.offsetParent)u+=d.offsetTop;return p.set([...c=[...c,l]].reverse(),u)},new Map))}).pipe(m(c=>new Map([...c].sort(([,p],[,l])=>p-l))),Ge(i),E(([c,p])=>t.pipe(kr(([l,f],{offset:{y:u},size:d})=>{let v=u+d.height>=Math.floor(a.height);for(;f.length;){let[,b]=f[0];if(b-p=u&&!v)f=[l.pop(),...f];else break}return[l,f]},[[],[...c]]),X((l,f)=>l[0]===f[0]&&l[1]===f[1])))))).pipe(m(([a,c])=>({prev:a.map(([p])=>p),next:c.map(([p])=>p)})),V({prev:[],next:[]}),Le(2,1),m(([a,c])=>a.prev.length{let i=new x,s=i.pipe(Z(),re(!0));if(i.subscribe(({prev:a,next:c})=>{for(let[p]of c)p.classList.remove("md-nav__link--passed"),p.classList.remove("md-nav__link--active");for(let[p,[l]]of a.entries())l.classList.add("md-nav__link--passed"),l.classList.toggle("md-nav__link--active",p===a.length-1)}),te("toc.follow")){let a=_(t.pipe(ke(1),m(()=>{})),t.pipe(ke(250),m(()=>"smooth")));i.pipe(M(({prev:c})=>c.length>0),Ge(o.pipe(Se(ae))),ne(a)).subscribe(([[{prev:c}],p])=>{let[l]=c[c.length-1];if(l.offsetHeight){let f=zo(l);if(typeof f!="undefined"){let u=l.offsetTop-f.offsetTop,{height:d}=he(f);f.scrollTo({top:u-d/2,behavior:p})}}})}return te("navigation.tracking")&&t.pipe(Y(s),ee("offset"),ke(250),je(1),Y(n.pipe(je(1))),Tt({delay:250}),ne(i)).subscribe(([,{prev:a}])=>{let c=pe(),p=a[a.length-1];if(p&&p.length){let[l]=p,{hash:f}=new URL(l.href);c.hash!==f&&(c.hash=f,history.replaceState({},"",`${c}`))}else c.hash="",history.replaceState({},"",`${c}`)}),Na(e,{viewport$:t,header$:r}).pipe(w(a=>i.next(a)),A(()=>i.complete()),m(a=>R({ref:e},a)))})}function Da(e,{viewport$:t,main$:r,target$:o}){let n=t.pipe(m(({offset:{y:s}})=>s),Le(2,1),m(([s,a])=>s>a&&a>0),X()),i=r.pipe(m(({active:s})=>s));return B([i,n]).pipe(m(([s,a])=>!(s&&a)),X(),Y(o.pipe(je(1))),re(!0),Tt({delay:250}),m(s=>({hidden:s})))}function ni(e,{viewport$:t,header$:r,main$:o,target$:n}){let i=new x,s=i.pipe(Z(),re(!0));return i.subscribe({next({hidden:a}){e.hidden=a,a?(e.setAttribute("tabindex","-1"),e.blur()):e.removeAttribute("tabindex")},complete(){e.style.top="",e.hidden=!0,e.removeAttribute("tabindex")}}),r.pipe(Y(s),ee("height")).subscribe(({height:a})=>{e.style.top=`${a+16}px`}),h(e,"click").subscribe(a=>{a.preventDefault(),window.scrollTo({top:0})}),Da(e,{viewport$:t,main$:o,target$:n}).pipe(w(a=>i.next(a)),A(()=>i.complete()),m(a=>R({ref:e},a)))}function ii({document$:e,tablet$:t}){e.pipe(E(()=>q(".md-toggle--indeterminate")),w(r=>{r.indeterminate=!0,r.checked=!1}),ce(r=>h(r,"change").pipe(Rr(()=>r.classList.contains("md-toggle--indeterminate")),m(()=>r))),ne(t)).subscribe(([r,o])=>{r.classList.remove("md-toggle--indeterminate"),o&&(r.checked=!1)})}function Va(){return/(iPad|iPhone|iPod)/.test(navigator.userAgent)}function ai({document$:e}){e.pipe(E(()=>q("[data-md-scrollfix]")),w(t=>t.removeAttribute("data-md-scrollfix")),M(Va),ce(t=>h(t,"touchstart").pipe(m(()=>t)))).subscribe(t=>{let r=t.scrollTop;r===0?t.scrollTop=1:r+t.offsetHeight===t.scrollHeight&&(t.scrollTop=r-1)})}function si({viewport$:e,tablet$:t}){B([We("search"),t]).pipe(m(([r,o])=>r&&!o),E(r=>j(r).pipe(ze(r?400:100))),ne(e)).subscribe(([r,{offset:{y:o}}])=>{if(r)document.body.setAttribute("data-md-scrolllock",""),document.body.style.top=`-${o}px`;else{let n=-1*parseInt(document.body.style.top,10);document.body.removeAttribute("data-md-scrolllock"),document.body.style.top="",n&&window.scrollTo(0,n)}})}Object.entries||(Object.entries=function(e){let t=[];for(let r of Object.keys(e))t.push([r,e[r]]);return t});Object.values||(Object.values=function(e){let t=[];for(let r of Object.keys(e))t.push(e[r]);return t});typeof Element!="undefined"&&(Element.prototype.scrollTo||(Element.prototype.scrollTo=function(e,t){typeof e=="object"?(this.scrollLeft=e.left,this.scrollTop=e.top):(this.scrollLeft=e,this.scrollTop=t)}),Element.prototype.replaceWith||(Element.prototype.replaceWith=function(...e){let t=this.parentNode;if(t){e.length===0&&t.removeChild(this);for(let r=e.length-1;r>=0;r--){let o=e[r];typeof o=="string"?o=document.createTextNode(o):o.parentNode&&o.parentNode.removeChild(o),r?t.insertBefore(this.previousSibling,o):t.replaceChild(o,this)}}}));function za(){return location.protocol==="file:"?ht(`${new URL("search/search_index.js",Qr.base)}`).pipe(m(()=>__index),J(1)):Ue(new URL("search/search_index.json",Qr.base))}document.documentElement.classList.remove("no-js");document.documentElement.classList.add("js");var nt=Uo(),_t=Bo(),gt=Jo(_t),Yr=Yo(),Te=nn(),lr=Fr("(min-width: 960px)"),pi=Fr("(min-width: 1220px)"),li=Xo(),Qr=me(),mi=document.forms.namedItem("search")?za():Ve,Br=new x;Fn({alert$:Br});var Gr=new x;te("navigation.instant")&&Wn({location$:_t,viewport$:Te,progress$:Gr}).subscribe(nt);var ci;((ci=Qr.version)==null?void 0:ci.provider)==="mike"&&qn({document$:nt});_(_t,gt).pipe(ze(125)).subscribe(()=>{Ke("drawer",!1),Ke("search",!1)});Yr.pipe(M(({mode:e})=>e==="global")).subscribe(e=>{switch(e.type){case"p":case",":let t=se("link[rel=prev]");typeof t!="undefined"&&ot(t);break;case"n":case".":let r=se("link[rel=next]");typeof r!="undefined"&&ot(r);break;case"Enter":let o=Re();o instanceof HTMLLabelElement&&o.click()}});ii({document$:nt,tablet$:lr});ai({document$:nt});si({viewport$:Te,tablet$:lr});var Xe=kn(Ee("header"),{viewport$:Te}),Lt=nt.pipe(m(()=>Ee("main")),E(e=>Rn(e,{viewport$:Te,header$:Xe})),J(1)),qa=_(...oe("consent").map(e=>cn(e,{target$:gt})),...oe("dialog").map(e=>Cn(e,{alert$:Br})),...oe("header").map(e=>Hn(e,{viewport$:Te,header$:Xe,main$:Lt})),...oe("palette").map(e=>Pn(e)),...oe("progress").map(e=>In(e,{progress$:Gr})),...oe("search").map(e=>Gn(e,{index$:mi,keyboard$:Yr})),...oe("source").map(e=>ti(e))),Ka=H(()=>_(...oe("announce").map(e=>sn(e)),...oe("content").map(e=>An(e,{viewport$:Te,target$:gt,print$:li})),...oe("content").map(e=>te("search.highlight")?Jn(e,{index$:mi,location$:_t}):L),...oe("header-title").map(e=>$n(e,{viewport$:Te,header$:Xe})),...oe("sidebar").map(e=>e.getAttribute("data-md-type")==="navigation"?jr(pi,()=>Kr(e,{viewport$:Te,header$:Xe,main$:Lt})):jr(lr,()=>Kr(e,{viewport$:Te,header$:Xe,main$:Lt}))),...oe("tabs").map(e=>ri(e,{viewport$:Te,header$:Xe})),...oe("toc").map(e=>oi(e,{viewport$:Te,header$:Xe,main$:Lt,target$:gt})),...oe("top").map(e=>ni(e,{viewport$:Te,header$:Xe,main$:Lt,target$:gt})))),fi=nt.pipe(E(()=>Ka),qe(qa),J(1));fi.subscribe();window.document$=nt;window.location$=_t;window.target$=gt;window.keyboard$=Yr;window.viewport$=Te;window.tablet$=lr;window.screen$=pi;window.print$=li;window.alert$=Br;window.progress$=Gr;window.component$=fi;})();
+//# sourceMappingURL=bundle.81fa17fe.min.js.map
+
diff --git a/assets/javascripts/bundle.81fa17fe.min.js.map b/assets/javascripts/bundle.81fa17fe.min.js.map
new file mode 100644
index 0000000000..582e525597
--- /dev/null
+++ b/assets/javascripts/bundle.81fa17fe.min.js.map
@@ -0,0 +1,7 @@
+{
+ "version": 3,
+ "sources": ["node_modules/focus-visible/dist/focus-visible.js", "node_modules/clipboard/dist/clipboard.js", "node_modules/escape-html/index.js", "src/templates/assets/javascripts/bundle.ts", "node_modules/rxjs/node_modules/tslib/tslib.es6.js", "node_modules/rxjs/src/internal/util/isFunction.ts", "node_modules/rxjs/src/internal/util/createErrorClass.ts", "node_modules/rxjs/src/internal/util/UnsubscriptionError.ts", "node_modules/rxjs/src/internal/util/arrRemove.ts", "node_modules/rxjs/src/internal/Subscription.ts", "node_modules/rxjs/src/internal/config.ts", "node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts", "node_modules/rxjs/src/internal/util/reportUnhandledError.ts", "node_modules/rxjs/src/internal/util/noop.ts", "node_modules/rxjs/src/internal/NotificationFactories.ts", "node_modules/rxjs/src/internal/util/errorContext.ts", "node_modules/rxjs/src/internal/Subscriber.ts", "node_modules/rxjs/src/internal/symbol/observable.ts", "node_modules/rxjs/src/internal/util/identity.ts", "node_modules/rxjs/src/internal/util/pipe.ts", "node_modules/rxjs/src/internal/Observable.ts", "node_modules/rxjs/src/internal/util/lift.ts", "node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts", "node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts", "node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts", "node_modules/rxjs/src/internal/Subject.ts", "node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts", "node_modules/rxjs/src/internal/ReplaySubject.ts", "node_modules/rxjs/src/internal/scheduler/Action.ts", "node_modules/rxjs/src/internal/scheduler/intervalProvider.ts", "node_modules/rxjs/src/internal/scheduler/AsyncAction.ts", "node_modules/rxjs/src/internal/Scheduler.ts", "node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts", "node_modules/rxjs/src/internal/scheduler/async.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts", "node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts", "node_modules/rxjs/src/internal/scheduler/animationFrame.ts", "node_modules/rxjs/src/internal/observable/empty.ts", "node_modules/rxjs/src/internal/util/isScheduler.ts", "node_modules/rxjs/src/internal/util/args.ts", "node_modules/rxjs/src/internal/util/isArrayLike.ts", "node_modules/rxjs/src/internal/util/isPromise.ts", "node_modules/rxjs/src/internal/util/isInteropObservable.ts", "node_modules/rxjs/src/internal/util/isAsyncIterable.ts", "node_modules/rxjs/src/internal/util/throwUnobservableError.ts", "node_modules/rxjs/src/internal/symbol/iterator.ts", "node_modules/rxjs/src/internal/util/isIterable.ts", "node_modules/rxjs/src/internal/util/isReadableStreamLike.ts", "node_modules/rxjs/src/internal/observable/innerFrom.ts", "node_modules/rxjs/src/internal/util/executeSchedule.ts", "node_modules/rxjs/src/internal/operators/observeOn.ts", "node_modules/rxjs/src/internal/operators/subscribeOn.ts", "node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts", "node_modules/rxjs/src/internal/scheduled/schedulePromise.ts", "node_modules/rxjs/src/internal/scheduled/scheduleArray.ts", "node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts", "node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts", "node_modules/rxjs/src/internal/scheduled/scheduled.ts", "node_modules/rxjs/src/internal/observable/from.ts", "node_modules/rxjs/src/internal/observable/of.ts", "node_modules/rxjs/src/internal/observable/throwError.ts", "node_modules/rxjs/src/internal/util/EmptyError.ts", "node_modules/rxjs/src/internal/util/isDate.ts", "node_modules/rxjs/src/internal/operators/map.ts", "node_modules/rxjs/src/internal/util/mapOneOrManyArgs.ts", "node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts", "node_modules/rxjs/src/internal/util/createObject.ts", "node_modules/rxjs/src/internal/observable/combineLatest.ts", "node_modules/rxjs/src/internal/operators/mergeInternals.ts", "node_modules/rxjs/src/internal/operators/mergeMap.ts", "node_modules/rxjs/src/internal/operators/mergeAll.ts", "node_modules/rxjs/src/internal/operators/concatAll.ts", "node_modules/rxjs/src/internal/observable/concat.ts", "node_modules/rxjs/src/internal/observable/defer.ts", "node_modules/rxjs/src/internal/observable/fromEvent.ts", "node_modules/rxjs/src/internal/observable/fromEventPattern.ts", "node_modules/rxjs/src/internal/observable/timer.ts", "node_modules/rxjs/src/internal/observable/merge.ts", "node_modules/rxjs/src/internal/observable/never.ts", "node_modules/rxjs/src/internal/util/argsOrArgArray.ts", "node_modules/rxjs/src/internal/operators/filter.ts", "node_modules/rxjs/src/internal/observable/zip.ts", "node_modules/rxjs/src/internal/operators/audit.ts", "node_modules/rxjs/src/internal/operators/auditTime.ts", "node_modules/rxjs/src/internal/operators/bufferCount.ts", "node_modules/rxjs/src/internal/operators/catchError.ts", "node_modules/rxjs/src/internal/operators/scanInternals.ts", "node_modules/rxjs/src/internal/operators/combineLatest.ts", "node_modules/rxjs/src/internal/operators/combineLatestWith.ts", "node_modules/rxjs/src/internal/operators/debounceTime.ts", "node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts", "node_modules/rxjs/src/internal/operators/take.ts", "node_modules/rxjs/src/internal/operators/ignoreElements.ts", "node_modules/rxjs/src/internal/operators/mapTo.ts", "node_modules/rxjs/src/internal/operators/delayWhen.ts", "node_modules/rxjs/src/internal/operators/delay.ts", "node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts", "node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts", "node_modules/rxjs/src/internal/operators/throwIfEmpty.ts", "node_modules/rxjs/src/internal/operators/endWith.ts", "node_modules/rxjs/src/internal/operators/finalize.ts", "node_modules/rxjs/src/internal/operators/first.ts", "node_modules/rxjs/src/internal/operators/merge.ts", "node_modules/rxjs/src/internal/operators/mergeWith.ts", "node_modules/rxjs/src/internal/operators/repeat.ts", "node_modules/rxjs/src/internal/operators/sample.ts", "node_modules/rxjs/src/internal/operators/scan.ts", "node_modules/rxjs/src/internal/operators/share.ts", "node_modules/rxjs/src/internal/operators/shareReplay.ts", "node_modules/rxjs/src/internal/operators/skip.ts", "node_modules/rxjs/src/internal/operators/skipUntil.ts", "node_modules/rxjs/src/internal/operators/startWith.ts", "node_modules/rxjs/src/internal/operators/switchMap.ts", "node_modules/rxjs/src/internal/operators/takeUntil.ts", "node_modules/rxjs/src/internal/operators/takeWhile.ts", "node_modules/rxjs/src/internal/operators/tap.ts", "node_modules/rxjs/src/internal/operators/throttle.ts", "node_modules/rxjs/src/internal/operators/throttleTime.ts", "node_modules/rxjs/src/internal/operators/withLatestFrom.ts", "node_modules/rxjs/src/internal/operators/zip.ts", "node_modules/rxjs/src/internal/operators/zipWith.ts", "src/templates/assets/javascripts/browser/document/index.ts", "src/templates/assets/javascripts/browser/element/_/index.ts", "src/templates/assets/javascripts/browser/element/focus/index.ts", "src/templates/assets/javascripts/browser/element/offset/_/index.ts", "src/templates/assets/javascripts/browser/element/offset/content/index.ts", "src/templates/assets/javascripts/utilities/h/index.ts", "src/templates/assets/javascripts/utilities/round/index.ts", "src/templates/assets/javascripts/browser/script/index.ts", "src/templates/assets/javascripts/browser/element/size/_/index.ts", "src/templates/assets/javascripts/browser/element/size/content/index.ts", "src/templates/assets/javascripts/browser/element/visibility/index.ts", "src/templates/assets/javascripts/browser/toggle/index.ts", "src/templates/assets/javascripts/browser/keyboard/index.ts", "src/templates/assets/javascripts/browser/location/_/index.ts", "src/templates/assets/javascripts/browser/location/hash/index.ts", "src/templates/assets/javascripts/browser/media/index.ts", "src/templates/assets/javascripts/browser/request/index.ts", "src/templates/assets/javascripts/browser/viewport/offset/index.ts", "src/templates/assets/javascripts/browser/viewport/size/index.ts", "src/templates/assets/javascripts/browser/viewport/_/index.ts", "src/templates/assets/javascripts/browser/viewport/at/index.ts", "src/templates/assets/javascripts/browser/worker/index.ts", "src/templates/assets/javascripts/_/index.ts", "src/templates/assets/javascripts/components/_/index.ts", "src/templates/assets/javascripts/components/announce/index.ts", "src/templates/assets/javascripts/components/consent/index.ts", "src/templates/assets/javascripts/components/content/annotation/_/index.ts", "src/templates/assets/javascripts/templates/tooltip/index.tsx", "src/templates/assets/javascripts/templates/annotation/index.tsx", "src/templates/assets/javascripts/templates/clipboard/index.tsx", "src/templates/assets/javascripts/templates/search/index.tsx", "src/templates/assets/javascripts/templates/source/index.tsx", "src/templates/assets/javascripts/templates/tabbed/index.tsx", "src/templates/assets/javascripts/templates/table/index.tsx", "src/templates/assets/javascripts/templates/version/index.tsx", "src/templates/assets/javascripts/components/content/annotation/list/index.ts", "src/templates/assets/javascripts/components/content/annotation/block/index.ts", "src/templates/assets/javascripts/components/content/code/_/index.ts", "src/templates/assets/javascripts/components/content/details/index.ts", "src/templates/assets/javascripts/components/content/mermaid/index.css", "src/templates/assets/javascripts/components/content/mermaid/index.ts", "src/templates/assets/javascripts/components/content/table/index.ts", "src/templates/assets/javascripts/components/content/tabs/index.ts", "src/templates/assets/javascripts/components/content/_/index.ts", "src/templates/assets/javascripts/components/dialog/index.ts", "src/templates/assets/javascripts/components/header/_/index.ts", "src/templates/assets/javascripts/components/header/title/index.ts", "src/templates/assets/javascripts/components/main/index.ts", "src/templates/assets/javascripts/components/palette/index.ts", "src/templates/assets/javascripts/components/progress/index.ts", "src/templates/assets/javascripts/integrations/clipboard/index.ts", "src/templates/assets/javascripts/integrations/sitemap/index.ts", "src/templates/assets/javascripts/integrations/instant/index.ts", "src/templates/assets/javascripts/integrations/search/highlighter/index.ts", "src/templates/assets/javascripts/integrations/search/worker/message/index.ts", "src/templates/assets/javascripts/integrations/search/worker/_/index.ts", "src/templates/assets/javascripts/integrations/version/index.ts", "src/templates/assets/javascripts/components/search/query/index.ts", "src/templates/assets/javascripts/components/search/result/index.ts", "src/templates/assets/javascripts/components/search/share/index.ts", "src/templates/assets/javascripts/components/search/suggest/index.ts", "src/templates/assets/javascripts/components/search/_/index.ts", "src/templates/assets/javascripts/components/search/highlight/index.ts", "src/templates/assets/javascripts/components/sidebar/index.ts", "src/templates/assets/javascripts/components/source/facts/github/index.ts", "src/templates/assets/javascripts/components/source/facts/gitlab/index.ts", "src/templates/assets/javascripts/components/source/facts/_/index.ts", "src/templates/assets/javascripts/components/source/_/index.ts", "src/templates/assets/javascripts/components/tabs/index.ts", "src/templates/assets/javascripts/components/toc/index.ts", "src/templates/assets/javascripts/components/top/index.ts", "src/templates/assets/javascripts/patches/indeterminate/index.ts", "src/templates/assets/javascripts/patches/scrollfix/index.ts", "src/templates/assets/javascripts/patches/scrolllock/index.ts", "src/templates/assets/javascripts/polyfills/index.ts"],
+ "sourcesContent": ["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (factory());\n}(this, (function () { 'use strict';\n\n /**\n * Applies the :focus-visible polyfill at the given scope.\n * A scope in this case is either the top-level Document or a Shadow Root.\n *\n * @param {(Document|ShadowRoot)} scope\n * @see https://github.com/WICG/focus-visible\n */\n function applyFocusVisiblePolyfill(scope) {\n var hadKeyboardEvent = true;\n var hadFocusVisibleRecently = false;\n var hadFocusVisibleRecentlyTimeout = null;\n\n var inputTypesAllowlist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n };\n\n /**\n * Helper function for legacy browsers and iframes which sometimes focus\n * elements like document, body, and non-interactive SVG.\n * @param {Element} el\n */\n function isValidFocusTarget(el) {\n if (\n el &&\n el !== document &&\n el.nodeName !== 'HTML' &&\n el.nodeName !== 'BODY' &&\n 'classList' in el &&\n 'contains' in el.classList\n ) {\n return true;\n }\n return false;\n }\n\n /**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} el\n * @return {boolean}\n */\n function focusTriggersKeyboardModality(el) {\n var type = el.type;\n var tagName = el.tagName;\n\n if (tagName === 'INPUT' && inputTypesAllowlist[type] && !el.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !el.readOnly) {\n return true;\n }\n\n if (el.isContentEditable) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Add the `focus-visible` class to the given element if it was not added by\n * the author.\n * @param {Element} el\n */\n function addFocusVisibleClass(el) {\n if (el.classList.contains('focus-visible')) {\n return;\n }\n el.classList.add('focus-visible');\n el.setAttribute('data-focus-visible-added', '');\n }\n\n /**\n * Remove the `focus-visible` class from the given element if it was not\n * originally added by the author.\n * @param {Element} el\n */\n function removeFocusVisibleClass(el) {\n if (!el.hasAttribute('data-focus-visible-added')) {\n return;\n }\n el.classList.remove('focus-visible');\n el.removeAttribute('data-focus-visible-added');\n }\n\n /**\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n * @param {KeyboardEvent} e\n */\n function onKeyDown(e) {\n if (e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n\n if (isValidFocusTarget(scope.activeElement)) {\n addFocusVisibleClass(scope.activeElement);\n }\n\n hadKeyboardEvent = true;\n }\n\n /**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n * @param {Event} e\n */\n function onPointerDown(e) {\n hadKeyboardEvent = false;\n }\n\n /**\n * On `focus`, add the `focus-visible` class to the target if:\n * - the target received focus as a result of keyboard navigation, or\n * - the event target is an element that will likely require interaction\n * via the keyboard (e.g. a text box)\n * @param {Event} e\n */\n function onFocus(e) {\n // Prevent IE from focusing the document or HTML element.\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {\n addFocusVisibleClass(e.target);\n }\n }\n\n /**\n * On `blur`, remove the `focus-visible` class from the target.\n * @param {Event} e\n */\n function onBlur(e) {\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (\n e.target.classList.contains('focus-visible') ||\n e.target.hasAttribute('data-focus-visible-added')\n ) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function() {\n hadFocusVisibleRecently = false;\n }, 100);\n removeFocusVisibleClass(e.target);\n }\n }\n\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had .focus-visible.\n * @param {Event} e\n */\n function onVisibilityChange(e) {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n addInitialPointerMoveListeners();\n }\n }\n\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n * @param {Event} e\n */\n function onInitialPointerMove(e) {\n // Work around a Safari quirk that fires a mousemove on whenever the\n // window blurs, even if you're tabbing out of the page. \u00AF\\_(\u30C4)_/\u00AF\n if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') {\n return;\n }\n\n hadKeyboardEvent = false;\n removeInitialPointerMoveListeners();\n }\n\n // For some kinds of state, we are interested in changes at the global scope\n // only. For example, global pointer input, global key presses and global\n // visibility change should affect the state at every scope:\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n\n addInitialPointerMoveListeners();\n\n // For focus and blur, we specifically care about state changes in the local\n // scope. This is because focus / blur events that originate from within a\n // shadow root are not re-dispatched from the host element if it was already\n // the active element in its own scope:\n scope.addEventListener('focus', onFocus, true);\n scope.addEventListener('blur', onBlur, true);\n\n // We detect that a node is a ShadowRoot by ensuring that it is a\n // DocumentFragment and also has a host property. This check covers native\n // implementation and polyfill implementation transparently. If we only cared\n // about the native implementation, we could just check if the scope was\n // an instance of a ShadowRoot.\n if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) {\n // Since a ShadowRoot is a special kind of DocumentFragment, it does not\n // have a root element to add a class to. So, we add this attribute to the\n // host element instead:\n scope.host.setAttribute('data-js-focus-visible', '');\n } else if (scope.nodeType === Node.DOCUMENT_NODE) {\n document.documentElement.classList.add('js-focus-visible');\n document.documentElement.setAttribute('data-js-focus-visible', '');\n }\n }\n\n // It is important to wrap all references to global window and document in\n // these checks to support server-side rendering use cases\n // @see https://github.com/WICG/focus-visible/issues/199\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n // Make the polyfill helper globally available. This can be used as a signal\n // to interested libraries that wish to coordinate with the polyfill for e.g.,\n // applying the polyfill to a shadow root:\n window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill;\n\n // Notify interested libraries of the polyfill's presence, in case the\n // polyfill was loaded lazily:\n var event;\n\n try {\n event = new CustomEvent('focus-visible-polyfill-ready');\n } catch (error) {\n // IE11 does not support using CustomEvent as a constructor directly:\n event = document.createEvent('CustomEvent');\n event.initCustomEvent('focus-visible-polyfill-ready', false, false, {});\n }\n\n window.dispatchEvent(event);\n }\n\n if (typeof document !== 'undefined') {\n // Apply the polyfill to the global document, so that no JavaScript\n // coordination is required to use the polyfill in the top-level document:\n applyFocusVisiblePolyfill(document);\n }\n\n})));\n", "/*!\n * clipboard.js v2.0.11\n * https://clipboardjs.com/\n *\n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 686:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ clipboard; }\n});\n\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(279);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(370);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(817);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n;// CONCATENATED MODULE: ./src/common/command.js\n/**\n * Executes a given operation type.\n * @param {String} type\n * @return {Boolean}\n */\nfunction command(type) {\n try {\n return document.execCommand(type);\n } catch (err) {\n return false;\n }\n}\n;// CONCATENATED MODULE: ./src/actions/cut.js\n\n\n/**\n * Cut action wrapper.\n * @param {String|HTMLElement} target\n * @return {String}\n */\n\nvar ClipboardActionCut = function ClipboardActionCut(target) {\n var selectedText = select_default()(target);\n command('cut');\n return selectedText;\n};\n\n/* harmony default export */ var actions_cut = (ClipboardActionCut);\n;// CONCATENATED MODULE: ./src/common/create-fake-element.js\n/**\n * Creates a fake textarea element with a value.\n * @param {String} value\n * @return {HTMLElement}\n */\nfunction createFakeElement(value) {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS\n\n fakeElement.style.fontSize = '12pt'; // Reset box model\n\n fakeElement.style.border = '0';\n fakeElement.style.padding = '0';\n fakeElement.style.margin = '0'; // Move element out of screen horizontally\n\n fakeElement.style.position = 'absolute';\n fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElement.style.top = \"\".concat(yPosition, \"px\");\n fakeElement.setAttribute('readonly', '');\n fakeElement.value = value;\n return fakeElement;\n}\n;// CONCATENATED MODULE: ./src/actions/copy.js\n\n\n\n/**\n * Create fake copy action wrapper using a fake element.\n * @param {String} target\n * @param {Object} options\n * @return {String}\n */\n\nvar fakeCopyAction = function fakeCopyAction(value, options) {\n var fakeElement = createFakeElement(value);\n options.container.appendChild(fakeElement);\n var selectedText = select_default()(fakeElement);\n command('copy');\n fakeElement.remove();\n return selectedText;\n};\n/**\n * Copy action wrapper.\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @return {String}\n */\n\n\nvar ClipboardActionCopy = function ClipboardActionCopy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n var selectedText = '';\n\n if (typeof target === 'string') {\n selectedText = fakeCopyAction(target, options);\n } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {\n // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n selectedText = fakeCopyAction(target.value, options);\n } else {\n selectedText = select_default()(target);\n command('copy');\n }\n\n return selectedText;\n};\n\n/* harmony default export */ var actions_copy = (ClipboardActionCopy);\n;// CONCATENATED MODULE: ./src/actions/default.js\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n/**\n * Inner function which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n * @param {Object} options\n */\n\nvar ClipboardActionDefault = function ClipboardActionDefault() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Defines base properties passed from constructor.\n var _options$action = options.action,\n action = _options$action === void 0 ? 'copy' : _options$action,\n container = options.container,\n target = options.target,\n text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.\n\n if (action !== 'copy' && action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n } // Sets the `target` property using an element that will be have its content copied.\n\n\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n } // Define selection strategy based on `text` property.\n\n\n if (text) {\n return actions_copy(text, {\n container: container\n });\n } // Defines which selection strategy based on `target` property.\n\n\n if (target) {\n return action === 'cut' ? actions_cut(target) : actions_copy(target, {\n container: container\n });\n }\n};\n\n/* harmony default export */ var actions_default = (ClipboardActionDefault);\n;// CONCATENATED MODULE: ./src/clipboard.js\nfunction clipboard_typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return clipboard_typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\nfunction getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\nvar Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n var _this;\n\n _classCallCheck(this, Clipboard);\n\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n _createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n var action = this.action(trigger) || 'copy';\n var text = actions_default({\n action: action,\n container: this.container,\n target: this.target(trigger),\n text: this.text(trigger)\n }); // Fires an event based on the copy operation result.\n\n this.emit(text ? 'success' : 'error', {\n action: action,\n text: text,\n trigger: trigger,\n clearSelection: function clearSelection() {\n if (trigger) {\n trigger.focus();\n }\n\n window.getSelection().removeAllRanges();\n }\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Allow fire programmatically a copy action\n * @param {String|HTMLElement} target\n * @param {Object} options\n * @returns Text copied.\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n }\n }], [{\n key: \"copy\",\n value: function copy(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n container: document.body\n };\n return actions_copy(target, options);\n }\n /**\n * Allow fire programmatically a cut action\n * @param {String|HTMLElement} target\n * @returns Text cutted.\n */\n\n }, {\n key: \"cut\",\n value: function cut(target) {\n return actions_cut(target);\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n\n return Clipboard;\n}((tiny_emitter_default()));\n\n/* harmony default export */ var clipboard = (Clipboard);\n\n/***/ }),\n\n/***/ 828:\n/***/ (function(module) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n\n/***/ 438:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar closest = __webpack_require__(828);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n\n/***/ 879:\n/***/ (function(__unused_webpack_module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n\n/***/ 370:\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar is = __webpack_require__(879);\nvar delegate = __webpack_require__(438);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n\n/***/ 817:\n/***/ (function(module) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n\n/***/ 279:\n/***/ (function(module) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(__webpack_module_cache__[moduleId]) {\n/******/ \t\t\treturn __webpack_module_cache__[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t// module exports must be returned from runtime so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(686);\n/******/ })()\n.default;\n});", "/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n", "/*\n * Copyright (c) 2016-2023 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport \"focus-visible\"\n\nimport {\n EMPTY,\n NEVER,\n Observable,\n Subject,\n defer,\n delay,\n filter,\n map,\n merge,\n mergeWith,\n shareReplay,\n switchMap\n} from \"rxjs\"\n\nimport { configuration, feature } from \"./_\"\nimport {\n at,\n getActiveElement,\n getOptionalElement,\n requestJSON,\n setLocation,\n setToggle,\n watchDocument,\n watchKeyboard,\n watchLocation,\n watchLocationTarget,\n watchMedia,\n watchPrint,\n watchScript,\n watchViewport\n} from \"./browser\"\nimport {\n getComponentElement,\n getComponentElements,\n mountAnnounce,\n mountBackToTop,\n mountConsent,\n mountContent,\n mountDialog,\n mountHeader,\n mountHeaderTitle,\n mountPalette,\n mountProgress,\n mountSearch,\n mountSearchHiglight,\n mountSidebar,\n mountSource,\n mountTableOfContents,\n mountTabs,\n watchHeader,\n watchMain\n} from \"./components\"\nimport {\n SearchIndex,\n setupClipboardJS,\n setupInstantNavigation,\n setupVersionSelector\n} from \"./integrations\"\nimport {\n patchIndeterminate,\n patchScrollfix,\n patchScrolllock\n} from \"./patches\"\nimport \"./polyfills\"\n\n/* ----------------------------------------------------------------------------\n * Functions - @todo refactor\n * ------------------------------------------------------------------------- */\n\n/**\n * Fetch search index\n *\n * @returns Search index observable\n */\nfunction fetchSearchIndex(): Observable {\n if (location.protocol === \"file:\") {\n return watchScript(\n `${new URL(\"search/search_index.js\", config.base)}`\n )\n .pipe(\n // @ts-ignore - @todo fix typings\n map(() => __index),\n shareReplay(1)\n )\n } else {\n return requestJSON(\n new URL(\"search/search_index.json\", config.base)\n )\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Application\n * ------------------------------------------------------------------------- */\n\n/* Yay, JavaScript is available */\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\n/* Set up navigation observables and subjects */\nconst document$ = watchDocument()\nconst location$ = watchLocation()\nconst target$ = watchLocationTarget(location$)\nconst keyboard$ = watchKeyboard()\n\n/* Set up media observables */\nconst viewport$ = watchViewport()\nconst tablet$ = watchMedia(\"(min-width: 960px)\")\nconst screen$ = watchMedia(\"(min-width: 1220px)\")\nconst print$ = watchPrint()\n\n/* Retrieve search index, if search is enabled */\nconst config = configuration()\nconst index$ = document.forms.namedItem(\"search\")\n ? fetchSearchIndex()\n : NEVER\n\n/* Set up Clipboard.js integration */\nconst alert$ = new Subject()\nsetupClipboardJS({ alert$ })\n\n/* Set up progress indicator */\nconst progress$ = new Subject()\n\n/* Set up instant navigation, if enabled */\nif (feature(\"navigation.instant\"))\n setupInstantNavigation({ location$, viewport$, progress$ })\n .subscribe(document$)\n\n/* Set up version selector */\nif (config.version?.provider === \"mike\")\n setupVersionSelector({ document$ })\n\n/* Always close drawer and search on navigation */\nmerge(location$, target$)\n .pipe(\n delay(125)\n )\n .subscribe(() => {\n setToggle(\"drawer\", false)\n setToggle(\"search\", false)\n })\n\n/* Set up global keyboard handlers */\nkeyboard$\n .pipe(\n filter(({ mode }) => mode === \"global\")\n )\n .subscribe(key => {\n switch (key.type) {\n\n /* Go to previous page */\n case \"p\":\n case \",\":\n const prev = getOptionalElement(\"link[rel=prev]\")\n if (typeof prev !== \"undefined\")\n setLocation(prev)\n break\n\n /* Go to next page */\n case \"n\":\n case \".\":\n const next = getOptionalElement(\"link[rel=next]\")\n if (typeof next !== \"undefined\")\n setLocation(next)\n break\n\n /* Expand navigation, see https://bit.ly/3ZjG5io */\n case \"Enter\":\n const active = getActiveElement()\n if (active instanceof HTMLLabelElement)\n active.click()\n }\n })\n\n/* Set up patches */\npatchIndeterminate({ document$, tablet$ })\npatchScrollfix({ document$ })\npatchScrolllock({ viewport$, tablet$ })\n\n/* Set up header and main area observable */\nconst header$ = watchHeader(getComponentElement(\"header\"), { viewport$ })\nconst main$ = document$\n .pipe(\n map(() => getComponentElement(\"main\")),\n switchMap(el => watchMain(el, { viewport$, header$ })),\n shareReplay(1)\n )\n\n/* Set up control component observables */\nconst control$ = merge(\n\n /* Consent */\n ...getComponentElements(\"consent\")\n .map(el => mountConsent(el, { target$ })),\n\n /* Dialog */\n ...getComponentElements(\"dialog\")\n .map(el => mountDialog(el, { alert$ })),\n\n /* Header */\n ...getComponentElements(\"header\")\n .map(el => mountHeader(el, { viewport$, header$, main$ })),\n\n /* Color palette */\n ...getComponentElements(\"palette\")\n .map(el => mountPalette(el)),\n\n /* Progress bar */\n ...getComponentElements(\"progress\")\n .map(el => mountProgress(el, { progress$ })),\n\n /* Search */\n ...getComponentElements(\"search\")\n .map(el => mountSearch(el, { index$, keyboard$ })),\n\n /* Repository information */\n ...getComponentElements(\"source\")\n .map(el => mountSource(el))\n)\n\n/* Set up content component observables */\nconst content$ = defer(() => merge(\n\n /* Announcement bar */\n ...getComponentElements(\"announce\")\n .map(el => mountAnnounce(el)),\n\n /* Content */\n ...getComponentElements(\"content\")\n .map(el => mountContent(el, { viewport$, target$, print$ })),\n\n /* Search highlighting */\n ...getComponentElements(\"content\")\n .map(el => feature(\"search.highlight\")\n ? mountSearchHiglight(el, { index$, location$ })\n : EMPTY\n ),\n\n /* Header title */\n ...getComponentElements(\"header-title\")\n .map(el => mountHeaderTitle(el, { viewport$, header$ })),\n\n /* Sidebar */\n ...getComponentElements(\"sidebar\")\n .map(el => el.getAttribute(\"data-md-type\") === \"navigation\"\n ? at(screen$, () => mountSidebar(el, { viewport$, header$, main$ }))\n : at(tablet$, () => mountSidebar(el, { viewport$, header$, main$ }))\n ),\n\n /* Navigation tabs */\n ...getComponentElements(\"tabs\")\n .map(el => mountTabs(el, { viewport$, header$ })),\n\n /* Table of contents */\n ...getComponentElements(\"toc\")\n .map(el => mountTableOfContents(el, {\n viewport$, header$, main$, target$\n })),\n\n /* Back-to-top button */\n ...getComponentElements(\"top\")\n .map(el => mountBackToTop(el, { viewport$, header$, main$, target$ }))\n))\n\n/* Set up component observables */\nconst component$ = document$\n .pipe(\n switchMap(() => content$),\n mergeWith(control$),\n shareReplay(1)\n )\n\n/* Subscribe to all components */\ncomponent$.subscribe()\n\n/* ----------------------------------------------------------------------------\n * Exports\n * ------------------------------------------------------------------------- */\n\nwindow.document$ = document$ /* Document observable */\nwindow.location$ = location$ /* Location subject */\nwindow.target$ = target$ /* Location target observable */\nwindow.keyboard$ = keyboard$ /* Keyboard observable */\nwindow.viewport$ = viewport$ /* Viewport observable */\nwindow.tablet$ = tablet$ /* Media tablet observable */\nwindow.screen$ = screen$ /* Media screen observable */\nwindow.print$ = print$ /* Media print observable */\nwindow.alert$ = alert$ /* Alert subject */\nwindow.progress$ = progress$ /* Progress indicator subject */\nwindow.component$ = component$ /* Component observable */\n", "/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n", "/**\n * Returns true if the object is a function.\n * @param value The value to check\n */\nexport function isFunction(value: any): value is (...args: any[]) => any {\n return typeof value === 'function';\n}\n", "/**\n * Used to create Error subclasses until the community moves away from ES5.\n *\n * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors\n * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123\n *\n * @param createImpl A factory function to create the actual constructor implementation. The returned\n * function should be a named function that calls `_super` internally.\n */\nexport function createErrorClass(createImpl: (_super: any) => any): T {\n const _super = (instance: any) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n", "import { createErrorClass } from './createErrorClass';\n\nexport interface UnsubscriptionError extends Error {\n readonly errors: any[];\n}\n\nexport interface UnsubscriptionErrorCtor {\n /**\n * @deprecated Internal implementation detail. Do not construct error instances.\n * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269\n */\n new (errors: any[]): UnsubscriptionError;\n}\n\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nexport const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass(\n (_super) =>\n function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n }\n);\n", "/**\n * Removes an item from an array, mutating it.\n * @param arr The array to remove the item from\n * @param item The item to remove\n */\nexport function arrRemove(arr: T[] | undefined | null, item: T) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { SubscriptionLike, TeardownLogic, Unsubscribable } from './types';\nimport { arrRemove } from './util/arrRemove';\n\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nexport class Subscription implements SubscriptionLike {\n /** @nocollapse */\n public static EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n */\n public closed = false;\n\n private _parentage: Subscription[] | Subscription | null = null;\n\n /**\n * The list of registered finalizers to execute upon unsubscription. Adding and removing from this\n * list occurs in the {@link #add} and {@link #remove} methods.\n */\n private _finalizers: Exclude[] | null = null;\n\n /**\n * @param initialTeardown A function executed first as part of the finalization\n * process that is kicked off when {@link #unsubscribe} is called.\n */\n constructor(private initialTeardown?: () => void) {}\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let errors: any[] | undefined;\n\n if (!this.closed) {\n this.closed = true;\n\n // Remove this from it's parents.\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors ?? [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n\n /**\n * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called\n * when this subscription is unsubscribed. If this subscription is already {@link #closed},\n * because it has already been unsubscribed, then whatever finalizer is passed to it\n * will automatically be executed (unless the finalizer itself is also a closed subscription).\n *\n * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed\n * subscription to a any subscription will result in no operation. (A noop).\n *\n * Adding a subscription to itself, or adding `null` or `undefined` will not perform any\n * operation at all. (A noop).\n *\n * `Subscription` instances that are added to this instance will automatically remove themselves\n * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove\n * will need to be removed manually with {@link #remove}\n *\n * @param teardown The finalization logic to add to this subscription.\n */\n add(teardown: TeardownLogic): void {\n // Only add the finalizer if it's not undefined\n // and don't add a subscription to itself.\n if (teardown && teardown !== this) {\n if (this.closed) {\n // If this subscription is already closed,\n // execute whatever finalizer is handed to it automatically.\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n // We don't add closed subscriptions, and we don't add the same subscription\n // twice. Subscription unsubscribe is idempotent.\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = this._finalizers ?? []).push(teardown);\n }\n }\n }\n\n /**\n * Checks to see if a this subscription already has a particular parent.\n * This will signal that this subscription has already been added to the parent in question.\n * @param parent the parent to check for\n */\n private _hasParent(parent: Subscription) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n\n /**\n * Adds a parent to this subscription so it can be removed from the parent if it\n * unsubscribes on it's own.\n *\n * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED.\n * @param parent The parent subscription to add\n */\n private _addParent(parent: Subscription) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n\n /**\n * Called on a child when it is removed via {@link #remove}.\n * @param parent The parent to remove\n */\n private _removeParent(parent: Subscription) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n\n /**\n * Removes a finalizer from this subscription that was previously added with the {@link #add} method.\n *\n * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves\n * from every other `Subscription` they have been added to. This means that using the `remove` method\n * is not a common thing and should be used thoughtfully.\n *\n * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance\n * more than once, you will need to call `remove` the same number of times to remove all instances.\n *\n * All finalizer instances are removed to free up memory upon unsubscription.\n *\n * @param teardown The finalizer to remove from this subscription\n */\n remove(teardown: Exclude): void {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\n\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\n\nexport function isSubscription(value: any): value is Subscription {\n return (\n value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))\n );\n}\n\nfunction execFinalizer(finalizer: Unsubscribable | (() => void)) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n", "import { Subscriber } from './Subscriber';\nimport { ObservableNotification } from './types';\n\n/**\n * The {@link GlobalConfig} object for RxJS. It is used to configure things\n * like how to react on unhandled errors.\n */\nexport const config: GlobalConfig = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n\n/**\n * The global configuration object for RxJS, used to configure things\n * like how to react on unhandled errors. Accessible via {@link config}\n * object.\n */\nexport interface GlobalConfig {\n /**\n * A registration point for unhandled errors from RxJS. These are errors that\n * cannot were not handled by consuming code in the usual subscription path. For\n * example, if you have this configured, and you subscribe to an observable without\n * providing an error handler, errors from that subscription will end up here. This\n * will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onUnhandledError: ((err: any) => void) | null;\n\n /**\n * A registration point for notifications that cannot be sent to subscribers because they\n * have completed, errored or have been explicitly unsubscribed. By default, next, complete\n * and error notifications sent to stopped subscribers are noops. However, sometimes callers\n * might want a different behavior. For example, with sources that attempt to report errors\n * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead.\n * This will _always_ be called asynchronously on another job in the runtime. This is because\n * we do not want errors thrown in this user-configured handler to interfere with the\n * behavior of the library.\n */\n onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null;\n\n /**\n * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach}\n * methods.\n *\n * @deprecated As of version 8, RxJS will no longer support this sort of injection of a\n * Promise constructor. If you need a Promise implementation other than native promises,\n * please polyfill/patch Promise as you see appropriate. Will be removed in v8.\n */\n Promise?: PromiseConstructorLike;\n\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME\n * FOR MIGRATION REASONS.\n *\n * @deprecated As of version 8, RxJS will no longer support synchronous throwing\n * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad\n * behaviors described above. Will be removed in v8.\n */\n useDeprecatedSynchronousErrorHandling: boolean;\n\n /**\n * If true, enables an as-of-yet undocumented feature from v5: The ability to access\n * `unsubscribe()` via `this` context in `next` functions created in observers passed\n * to `subscribe`.\n *\n * This is being removed because the performance was severely problematic, and it could also cause\n * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have\n * their `this` context overwritten.\n *\n * @deprecated As of version 8, RxJS will no longer support altering the\n * context of next functions provided as part of an observer to Subscribe. Instead,\n * you will have access to a subscription or a signal or token that will allow you to do things like\n * unsubscribe and test closed status. Will be removed in v8.\n */\n useDeprecatedNextContext: boolean;\n}\n", "import type { TimerHandle } from './timerHandle';\ntype SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle;\ntype ClearTimeoutFunction = (handle: TimerHandle) => void;\n\ninterface TimeoutProvider {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n delegate:\n | {\n setTimeout: SetTimeoutFunction;\n clearTimeout: ClearTimeoutFunction;\n }\n | undefined;\n}\n\nexport const timeoutProvider: TimeoutProvider = {\n // When accessing the delegate, use the variable rather than `this` so that\n // the functions can be called without being bound to the provider.\n setTimeout(handler: () => void, timeout?: number, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate?.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return (delegate?.clearTimeout || clearTimeout)(handle as any);\n },\n delegate: undefined,\n};\n", "import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\n\n/**\n * Handles an error on another job either with the user-configured {@link onUnhandledError},\n * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc.\n *\n * This should be called whenever there is an error that is out-of-band with the subscription\n * or when an error hits a terminal boundary of the subscription and no error handler was provided.\n *\n * @param err the error to report\n */\nexport function reportUnhandledError(err: any) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n // Execute the user-configured error handler.\n onUnhandledError(err);\n } else {\n // Throw so it is picked up by the runtime's uncaught error mechanism.\n throw err;\n }\n });\n}\n", "/* tslint:disable:no-empty */\nexport function noop() { }\n", "import { CompleteNotification, NextNotification, ErrorNotification } from './types';\n\n/**\n * A completion object optimized for memory use and created to be the\n * same \"shape\" as other notifications in v8.\n * @internal\n */\nexport const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)();\n\n/**\n * Internal use only. Creates an optimized error notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function errorNotification(error: any): ErrorNotification {\n return createNotification('E', undefined, error) as any;\n}\n\n/**\n * Internal use only. Creates an optimized next notification that is the same \"shape\"\n * as other notifications.\n * @internal\n */\nexport function nextNotification(value: T) {\n return createNotification('N', value, undefined) as NextNotification;\n}\n\n/**\n * Ensures that all notifications created internally have the same \"shape\" in v8.\n *\n * TODO: This is only exported to support a crazy legacy test in `groupBy`.\n * @internal\n */\nexport function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) {\n return {\n kind,\n value,\n error,\n };\n}\n", "import { config } from '../config';\n\nlet context: { errorThrown: boolean; error: any } | null = null;\n\n/**\n * Handles dealing with errors for super-gross mode. Creates a context, in which\n * any synchronously thrown errors will be passed to {@link captureError}. Which\n * will record the error such that it will be rethrown after the call back is complete.\n * TODO: Remove in v8\n * @param cb An immediately executed function.\n */\nexport function errorContext(cb: () => void) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context!;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n // This is the general non-deprecated path for everyone that\n // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling)\n cb();\n }\n}\n\n/**\n * Captures errors only in super-gross mode.\n * @param err the error to capture\n */\nexport function captureError(err: any) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n", "import { isFunction } from './util/isFunction';\nimport { Observer, ObservableNotification } from './types';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\n\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber\n */\nexport class Subscriber extends Subscription implements Observer {\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param next The `next` callback of an Observer.\n * @param error The `error` callback of an\n * Observer.\n * @param complete The `complete` callback of an\n * Observer.\n * @return A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n * @deprecated Do not use. Will be removed in v8. There is no replacement for this\n * method, and there is no reason to be creating instances of `Subscriber` directly.\n * If you have a specific use case, please file an issue.\n */\n static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber {\n return new SafeSubscriber(next, error, complete);\n }\n\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected isStopped: boolean = false;\n /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */\n protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R)\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.\n */\n constructor(destination?: Subscriber | Observer) {\n super();\n if (destination) {\n this.destination = destination;\n // Automatically chain subscriptions together here.\n // if destination is a Subscription, then it is a Subscriber.\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n next(value?: T): void {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value!);\n }\n }\n\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached `Error`. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n error(err?: any): void {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n complete(): void {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n\n unsubscribe(): void {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null!;\n }\n }\n\n protected _next(value: T): void {\n this.destination.next(value);\n }\n\n protected _error(err: any): void {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n\n protected _complete(): void {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\n\n/**\n * This bind is captured here because we want to be able to have\n * compatibility with monoid libraries that tend to use a method named\n * `bind`. In particular, a library called Monio requires this.\n */\nconst _bind = Function.prototype.bind;\n\nfunction bind any>(fn: Fn, thisArg: any): Fn {\n return _bind.call(fn, thisArg);\n}\n\n/**\n * Internal optimization only, DO NOT EXPOSE.\n * @internal\n */\nclass ConsumerObserver implements Observer {\n constructor(private partialObserver: Partial>) {}\n\n next(value: T): void {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n\n error(err: any): void {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n\n complete(): void {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\n\nexport class SafeSubscriber extends Subscriber {\n constructor(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((e?: any) => void) | null,\n complete?: (() => void) | null\n ) {\n super();\n\n let partialObserver: Partial>;\n if (isFunction(observerOrNext) || !observerOrNext) {\n // The first argument is a function, not an observer. The next\n // two arguments *could* be observers, or they could be empty.\n partialObserver = {\n next: (observerOrNext ?? undefined) as (((value: T) => void) | undefined),\n error: error ?? undefined,\n complete: complete ?? undefined,\n };\n } else {\n // The first argument is a partial observer.\n let context: any;\n if (this && config.useDeprecatedNextContext) {\n // This is a deprecated path that made `this.unsubscribe()` available in\n // next handler functions passed to subscribe. This only exists behind a flag\n // now, as it is *very* slow.\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n } else {\n // The \"normal\" path. Just use the partial observer directly.\n partialObserver = observerOrNext;\n }\n }\n\n // Wrap the partial observer to ensure it's a full observer, and\n // make sure proper error handling is accounted for.\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\n\nfunction handleUnhandledError(error: any) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n // Ideal path, we report this as an unhandled error,\n // which is thrown on a new call stack.\n reportUnhandledError(error);\n }\n}\n\n/**\n * An error handler used when no error handler was supplied\n * to the SafeSubscriber -- meaning no error handler was supplied\n * do the `subscribe` call on our observable.\n * @param err The error to handle\n */\nfunction defaultErrorHandler(err: any) {\n throw err;\n}\n\n/**\n * A handler for notifications that cannot be sent to a stopped subscriber.\n * @param notification The notification being sent\n * @param subscriber The stopped subscriber\n */\nfunction handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\n\n/**\n * The observer used as a stub for subscriptions where the user did not\n * pass any arguments to `subscribe`. Comes with the default error handling\n * behavior.\n */\nexport const EMPTY_OBSERVER: Readonly> & { closed: true } = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n", "/**\n * Symbol.observable or a string \"@@observable\". Used for interop\n *\n * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS.\n * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable\n */\nexport const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n", "/**\n * This function takes one parameter and just returns it. Simply put,\n * this is like `(x: T): T => x`.\n *\n * ## Examples\n *\n * This is useful in some cases when using things like `mergeMap`\n *\n * ```ts\n * import { interval, take, map, range, mergeMap, identity } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(5));\n *\n * const result$ = source$.pipe(\n * map(i => range(i)),\n * mergeMap(identity) // same as mergeMap(x => x)\n * );\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * Or when you want to selectively apply an operator\n *\n * ```ts\n * import { interval, take, identity } from 'rxjs';\n *\n * const shouldLimit = () => Math.random() < 0.5;\n *\n * const source$ = interval(1000);\n *\n * const result$ = source$.pipe(shouldLimit() ? take(5) : identity);\n *\n * result$.subscribe({\n * next: console.log\n * });\n * ```\n *\n * @param x Any value that is returned by this function\n * @returns The value passed as the first parameter to this function\n */\nexport function identity(x: T): T {\n return x;\n}\n", "import { identity } from './identity';\nimport { UnaryFunction } from '../types';\n\nexport function pipe(): typeof identity;\nexport function pipe(fn1: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction;\nexport function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction\n): UnaryFunction;\nexport function pipe(\n fn1: UnaryFunction,\n fn2: UnaryFunction,\n fn3: UnaryFunction,\n fn4: UnaryFunction,\n fn5: UnaryFunction,\n fn6: UnaryFunction,\n fn7: UnaryFunction,\n fn8: UnaryFunction,\n fn9: UnaryFunction,\n ...fns: UnaryFunction[]\n): UnaryFunction;\n\n/**\n * pipe() can be called on one or more functions, each of which can take one argument (\"UnaryFunction\")\n * and uses it to return a value.\n * It returns a function that takes one argument, passes it to the first UnaryFunction, and then\n * passes the result to the next one, passes that result to the next one, and so on. \n */\nexport function pipe(...fns: Array>): UnaryFunction {\n return pipeFromArray(fns);\n}\n\n/** @internal */\nexport function pipeFromArray(fns: Array>): UnaryFunction {\n if (fns.length === 0) {\n return identity as UnaryFunction;\n }\n\n if (fns.length === 1) {\n return fns[0];\n }\n\n return function piped(input: T): R {\n return fns.reduce((prev: any, fn: UnaryFunction) => fn(prev), input as any);\n };\n}\n", "import { Operator } from './Operator';\nimport { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription, Subscription } from './Subscription';\nimport { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\n\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable\n */\nexport class Observable implements Subscribable {\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n source: Observable | undefined;\n\n /**\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n */\n operator: Operator | undefined;\n\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new Observable by calling the Observable constructor\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new observable\n * @nocollapse\n * @deprecated Use `new Observable()` instead. Will be removed in v8.\n */\n static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => {\n return new Observable(subscribe);\n };\n\n /**\n * Creates a new Observable, with this Observable instance as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param operator the operator defining the operation to take on the observable\n * @return a new observable with the Operator applied\n * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.\n * If you have implemented an operator using `lift`, it is recommended that you create an\n * operator by simply returning `new Observable()` directly. See \"Creating new operators from\n * scratch\" section here: https://rxjs.dev/guide/operators\n */\n lift(operator?: Operator): Observable {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n\n subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription;\n /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */\n subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * Use it when you have all these Observables, but still nothing is happening.\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to Observable's constructor, but most of the time it is\n * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means\n * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * the thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * of the following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,\n * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,\n * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or\n * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide\n * an `error` method to avoid missing thrown errors.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent\n * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,\n * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.\n *\n * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events\n * and you also handled emissions internally by using operators (e.g. using `tap`).\n *\n * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a `scheduler`.\n *\n * #### Examples\n *\n * Subscribe with an {@link guide/observer Observer}\n *\n * ```ts\n * import { of } from 'rxjs';\n *\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() {\n * // We actually could just remove this method,\n * // since we do not really care about errors right now.\n * },\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})\n *\n * ```ts\n * import { of } from 'rxjs'\n *\n * let sum = 0;\n *\n * of(1, 2, 3).subscribe(\n * value => {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * () => console.log('Sum equals: ' + sum)\n * );\n *\n * // Logs:\n * // 'Adding: 1'\n * // 'Adding: 2'\n * // 'Adding: 3'\n * // 'Sum equals: 6'\n * ```\n *\n * Cancel a subscription\n *\n * ```ts\n * import { interval } from 'rxjs';\n *\n * const subscription = interval(1000).subscribe({\n * next(num) {\n * console.log(num)\n * },\n * complete() {\n * // Will not be called, even when cancelling subscription.\n * console.log('completed!');\n * }\n * });\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 'unsubscribed!' after 2.5s\n * ```\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown asynchronously as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {Subscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n subscribe(\n observerOrNext?: Partial> | ((value: T) => void) | null,\n error?: ((error: any) => void) | null,\n complete?: (() => void) | null\n ): Subscription {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(\n operator\n ? // We're dealing with a subscription in the\n // operator chain to one of our lifted operators.\n operator.call(subscriber, source)\n : source\n ? // If `source` has a value, but `operator` does not, something that\n // had intimate knowledge of our API, like our `Subject`, must have\n // set it. We're going to just call `_subscribe` directly.\n this._subscribe(subscriber)\n : // In all other cases, we're likely wrapping a user-provided initializer\n // function, so we need to catch errors and handle them appropriately.\n this._trySubscribe(subscriber)\n );\n });\n\n return subscriber;\n }\n\n /** @internal */\n protected _trySubscribe(sink: Subscriber): TeardownLogic {\n try {\n return this._subscribe(sink);\n } catch (err) {\n // We don't need to return anything in this case,\n // because it's just going to try to `add()` to a subscription\n // above.\n sink.error(err);\n }\n }\n\n /**\n * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with\n * APIs that expect promises, like `async/await`. You cannot unsubscribe from this.\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * #### Example\n *\n * ```ts\n * import { interval, take } from 'rxjs';\n *\n * const source$ = interval(1000).pipe(take(4));\n *\n * async function getTotal() {\n * let total = 0;\n *\n * await source$.forEach(value => {\n * total += value;\n * console.log('observable -> ' + value);\n * });\n *\n * return total;\n * }\n *\n * getTotal().then(\n * total => console.log('Total: ' + total)\n * );\n *\n * // Expected:\n * // 'observable -> 0'\n * // 'observable -> 1'\n * // 'observable -> 2'\n * // 'observable -> 3'\n * // 'Total: 6'\n * ```\n *\n * @param next a handler for each value emitted by the observable\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n forEach(next: (value: T) => void): Promise;\n\n /**\n * @param next a handler for each value emitted by the observable\n * @param promiseCtor a constructor function used to instantiate the Promise\n * @return a promise that either resolves on observable completion or\n * rejects with the handled error\n * @deprecated Passing a Promise constructor will no longer be available\n * in upcoming versions of RxJS. This is because it adds weight to the library, for very\n * little benefit. If you need this functionality, it is recommended that you either\n * polyfill Promise, or you create an adapter to convert the returned native promise\n * to whatever promise implementation you wanted. Will be removed in v8.\n */\n forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise;\n\n forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n }) as Promise;\n }\n\n /** @internal */\n protected _subscribe(subscriber: Subscriber): TeardownLogic {\n return this.source?.subscribe(subscriber);\n }\n\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n [Symbol_observable]() {\n return this;\n }\n\n /* tslint:disable:max-line-length */\n pipe(): Observable;\n pipe(op1: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction): Observable;\n pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction\n ): Observable;\n pipe(\n op1: OperatorFunction,\n op2: OperatorFunction,\n op3: OperatorFunction,\n op4: OperatorFunction,\n op5: OperatorFunction,\n op6: OperatorFunction,\n op7: OperatorFunction,\n op8: OperatorFunction,\n op9: OperatorFunction,\n ...operations: OperatorFunction[]\n ): Observable;\n /* tslint:enable:max-line-length */\n\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * ## Example\n *\n * ```ts\n * import { interval, filter, map, scan } from 'rxjs';\n *\n * interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x));\n * ```\n */\n pipe(...operations: OperatorFunction[]): Observable {\n return pipeFromArray(operations)(this);\n }\n\n /* tslint:disable:max-line-length */\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: typeof Promise): Promise;\n /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */\n toPromise(PromiseCtor: PromiseConstructorLike): Promise;\n /* tslint:enable:max-line-length */\n\n /**\n * Subscribe to this Observable and get a Promise resolving on\n * `complete` with the last emission (if any).\n *\n * **WARNING**: Only use this with observables you *know* will complete. If the source\n * observable does not complete, you will end up with a promise that is hung up, and\n * potentially all of the state of an async function hanging out in memory. To avoid\n * this situation, look into adding something like {@link timeout}, {@link take},\n * {@link takeWhile}, or {@link takeUntil} amongst others.\n *\n * @method toPromise\n * @param [promiseCtor] a constructor function used to instantiate\n * the Promise\n * @return A Promise that resolves with the last value emit, or\n * rejects on an error. If there were no emissions, Promise\n * resolves with undefined.\n * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise\n */\n toPromise(promiseCtor?: PromiseConstructorLike): Promise {\n promiseCtor = getPromiseCtor(promiseCtor);\n\n return new promiseCtor((resolve, reject) => {\n let value: T | undefined;\n this.subscribe(\n (x: T) => (value = x),\n (err: any) => reject(err),\n () => resolve(value)\n );\n }) as Promise;\n }\n}\n\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\n */\nfunction getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {\n return promiseCtor ?? config.Promise ?? Promise;\n}\n\nfunction isObserver(value: any): value is Observer {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\n\nfunction isSubscriber(value: any): value is Subscriber {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n", "import { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { OperatorFunction } from '../types';\nimport { isFunction } from './isFunction';\n\n/**\n * Used to determine if an object is an Observable with a lift function.\n */\nexport function hasLift(source: any): source is { lift: InstanceType['lift'] } {\n return isFunction(source?.lift);\n}\n\n/**\n * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way.\n * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription.\n */\nexport function operate(\n init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void\n): OperatorFunction {\n return (source: Observable) => {\n if (hasLift(source)) {\n return source.lift(function (this: Subscriber, liftedSource: Observable) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n", "import { Subscriber } from '../Subscriber';\n\n/**\n * Creates an instance of an `OperatorSubscriber`.\n * @param destination The downstream subscriber.\n * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any\n * error that occurs in this function is caught and sent to the `error` method of this subscriber.\n * @param onError Handles errors from the subscription, any errors that occur in this handler are caught\n * and send to the `destination` error handler.\n * @param onComplete Handles completion notification from the subscription. Any errors that occur in\n * this handler are sent to the `destination` error handler.\n * @param onFinalize Additional teardown logic here. This will only be called on teardown if the\n * subscriber itself is not already closed. This is called after all other teardown logic is executed.\n */\nexport function createOperatorSubscriber(\n destination: Subscriber