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.
Example:
./bin/esmini --window 60 60 800 400 --osc ./resources/xosc/cut-in.xosc

cut in
replayer

Replay recorded esmini scenarios. Main difference from esmini is the ability to freely move forward and backward in the scenario at various speeds.
Example:
./bin/replayer --window 60 60 800 400 --file sim.dat

replayer gui

See Use cases how to create recordings (.dat files) from esmini and Replay scenario for further details about replaying.

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.
Example:
./bin/odrviewer --window 60 60 800 400 --odr ./resources/xodr/fabriksgatan.xodr

odrviewer
dat2csv

Convert esmini recording (.dat) file to standard .csv format Example:
./bin/dat2csv sim.dat

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

odrplot
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

plot dat
osi2csv.py

Convert OSI trace file (from esmini) to .csv format
Example:
./scripts/osi2csv.py ./ground_truth.osi
will create ground_truth.csv

See Save OSI data how to create OSI groundtruth trace (.osi file) 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 ax will 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

osiviewer

Shared libraries

esminiLib

High level API for running, controlling and monitoring scenarios

esminiRMLib

High level API for parsing and query road networks (only road manager)

See headerfile esminiRMLib.hpp and code example rm-basic