Tools overview
Applications
| esmini |
Play OpenSCENARIO file. Many options, e.g. view on screen, save images to file or just save log data for post processing.
|
| replayer |
Replay recorded esmini scenarios. Main difference from esmini is the ability to freely move forward and backward in the scenario at various speeds.
See Use cases how to create recordings ( |
| odrviewer |
Visualize and verify OpenDRIVE road networks. Draw road features, like reference line and lanes, on top of a 3D model (provided or generated). Optionally populate with random traffic that will randomly find its way through the road network.
|
| dat2csv |
Convert esmini recording (.dat) file to standard .csv format
Example: |
Scripts
esmini comes with a collection of scripts for various purposes, like preprocessing of scenario files and plotting or conversion of simulation output files. The scripts are located in the scripts folder.
The bash scripts (.sh) can be run in any Linux command line. In Windows you can run from Git Bash. Python scripts (*.py) is run
A few examples:
- odrplot
-
Simple 2D plot of OpenDRIVE road lanes with indicated road IDs, in a two step process.
Prerequisites: Python + matplotlib
Example:
./bin/odrplot ./resources/xodr/fabriksgatan.xodr(will create a track.csv file)
python ./EnvironmentSimulator/Applications/odrplot/xodr.py track.csv
- plot_dat
-
Simple 2D plot of scenario data
Prerequisites: Python + matplotlib
Example:
./bin/esmini --headless --osc ./resources/xosc/acc-test.xosc --fixed_timestep 0.05 --record sim.dat(will create the .dat file)
./scripts/plot_dat.py sim.dat --param speed
- osi2csv.py
-
Convert OSI trace file (from esmini) to .csv format
Example:
./scripts/osi2csv.py ./ground_truth.osi
will create ground_truth.csvSee Save OSI data how to create OSI groundtruth trace (
.osifile) from esmini. - plot_csv
-
Simple 2D plot of scenario data, similar to plot_dat
Prerequisites: Python + matplotlib
Example:
./bin/esmini --headless --osc ./resources/xosc/acc-test.xosc --fixed_timestep 0.05 --osi_file sim.osi(will create an osi trace file)
./scripts/osi2csv.py sim.osi(convert to .csv)
./scripts/plot_csv.py sim.csv --param axwill plot the x component of acceleration vector. - move_to_origin.py
-
Translate a scenario to origin. Useful for scenarios with large coordinates causing precision issues. See more info in script.
- xodr_lines2curves.py
-
Smoothen polyline roads by converting them to parametric curves. See more info in script.
- run_schema_comply.py
-
Validate xosc and xodr scenario files for compliance with the XML schema of the corresponding standard. See more info in script and section Run XML schema validation tests.
- compile_osg_apps.sh
-
Compile OSG applications for viewing and converting OpenSceneGraph 3D models. See more info section Get osgconv / Build yourself.
- run_repeat_compare.sh
-
Run a scenario multiple times and compare the results, expected to be identical. See more info in script.
- osiviewer.py
-
Visualize OSI trace files. Only supporting a small, limited subset of OSI content, e.g. lanes, stationary and moving objects.
Example:
./scripts/osiviewer.py ground_truth.osi
Shared libraries
| esminiLib |
High level API for running, controlling and monitoring scenarios See headerfile esminiLib.hpp and Hello World programming tutorial |
| esminiRMLib |
High level API for parsing and query road networks (only road manager) See headerfile esminiRMLib.hpp and code example rm-basic |