Command reference
About options and config files
esmini, replayer and odrviewer can be controlled and configured by options. Even the input file (e.g. OpenSCENARIO file) is specified as an option.
Available options are listed later in this section, grouped by application.
Certain options, such as path, supports multiple values, denoted by '…' in the command help. For those options the values can be specified sequentially. Example:
--path /tmp/models /tmp/kalles_models
Other options supports only one value. For those options the last parsed occurrence wins. Example:
--logfile_path my_log.txt --logfile_path kalles_log.txt
will create 'kalles_log.txt'
Options can be specified three ways:
-
From command line as application arguments, for example:
esmini --osc my_scenario.xosc --disable_stdout -
By API function SE_SetOption(), see Program Options
-
In config file, see more info below
Config file
The config file is basically a container for option presets. It can be used to apply common settings for esmini applications. For example, if you often use a specific window size, e.g. --window 60 60 800 400, then you can put it in a config file. Configuration file is structured with the application name as the root, followed by option-value pairs. Custom configuration file can be named and placed as needed.
Settings in config files can be overridden, both by other config files or by options specified on command line. Option files are parsed in order of appearance, last parsed option occurrence wins.
From version 2.46.0 esmini comes with a default config.yml located in esmini root folder. It contains just a few settings, e.g. default window position and size (60 60 800 400). Launching esmini from esmini root folder as:
./bin/esmini --osc ./resources/xosc/cut-in.xosc
will then show cut-in scenario in a 800x400 window.
Exact content of the config.yml will vary over time, but initial version looks like this:
esmini:
window: 60 60 800 400
replayer:
window: 60 60 800 400
res_path: ./resources
file: sim.dat
odrviewer:
window: 60 60 800 400
If you want another size of the window you have at least three options:
-
Edit the config.yml
-
Provide the
windowoption values at command line, example:./esmini --window 50 100 1400 500 -
Create a custom config file, e.g. my_config.yml, including your preferred values
Example of my_config.yml:
esmini:
window: 50 100 1400 500
logfile_path: my_log.txt
Similarly, the scenario file can also be made part of default config file by adding osc: ./resources/xosc/cut-in.xosc to the config.yml. Or you can add it your custom config file above, like following:
esmini:
window: 50 100 1400 500
logfile_path: my_log.txt
osc: ./resources/xosc/cut-in.xosc
Any number of config files can be specified as an option (config_file_path), either from another config file or at command line.
Example how to incorporate a custom config file on top of the default one:
./esmini --config_file_path my_config.yml
You can also add an entry in the default config.yml, example:
esmini:
window: 50 100 1400 500
logfile_path: my_log.txt
config_file_path: my_config.yml
Now, running:
./bin/esmini
will load cut-in.xosc, using the one specified in default config. Window will be 50 100 1400 500 as specified in my_config, overriding the values in the default config.yml. The log file will be named my_log.txt as specified in my_config, overriding esmini default log file path.
Custom configuration file paths can be defined in the ESMINI_CONFIG_FILE environment variable. Multiple paths, delimited by ';' (Windows) or ':' (Linux/macOS), are permitted, which is particularly useful in Docker or similar environments.
Default config file is always parsed first, then the ones specified in the environment variable, and finally the ones specified on command line.
Note:
The default 'config.yml' is applied automatically, while other config files needs to be specified explicitly.
Hence, although legit to add any setting to the default 'config.yml' file, it’s recommended to separate basic common settings from temporary ones.
For example, create a 'my_settings.yml' for temporary preferences while putting permanent settings into 'config.yml'.
./bin/esmini --osc ./resources/xosc/cut-in.xosc
will apply basic settings only, while
./bin/esmini --osc ./resources/xosc/cut-in.xosc --config_file_path my_settings.yml
will also apply additional settings from the custom file.
This strategy avoids unexpected forgotten settings from a previous session being applied automatically.
Whitespace support
In option values any space will result in separation in multiple arguments.
Bad example:
esmini:
path: ./resources/my scenarios /tmp
./resources/my, scenarios, /tmp is added as separate search paths. Probably not intended.
If space is needed, e.g. for file or directory paths, just enclose in quotes "".
Good example:
esmini:
path: "./resources/my scenarios" /tmp
./resources/my scenarios, /tmp is added as separate search paths
Precedence
As mentioned, options that supports multiple values will store and access values according to order of appearance. Example:
--path /tmp/my_car_models --path /tmp/kalles_car_models
esmini will look in kalles_car_models first, and only if referred model is not found there it will continue looking in my_car_models.
Illustrative example:
Mutual exclusion
Dependencies exists among some options. Examples:
'headless' and 'window'
'headless' overrides any preceding 'window' arguments, no rendering will happen. Conversely, 'window' following 'headless' results in an invisible window for off-screen rendering (e.g. saving images to file or grab pixels via API).
Examples:
./bin/esmini --window 60 60 800 400 --headless --fixed_timestep 0.05 --osc ./resources/xosc/cut-in.xosc
no window will be created and no rendering performed, execution will be fast.
./bin/esmini --headless --window 60 60 800 400 --fixed_timestep 0.05 --osc ./resources/xosc/cut-in.xosc
off-screen window will be created and rendered to, execution will be slower.
'osc' and 'osc_str'
The last specified option prevails.
Config file usage example 1: Easy replaying
Without config
The typical procedure to create and replay a scenario recording (DAT file) is as follows:
Create DAT file:
./bin/esmini --headless --fixed_timestep 0.05 --record sim.dat --osc ./resources/xosc/cut-in.xosc
Play DAT file:
./bin/replayer --window 60 60 800 400 --res_path ./resources --file sim.dat
With config
Create cfg_dat.yml in esmini root as:
esmini:
headless: true
record: sim.dat
fixed_timestep: 0.05
replayer:
window: 60 60 800 400
res_path: ./resources
file: sim.dat
Create DAT file:
./bin/esmini --config_file_path ./cfg_dat.yml --osc ./resources/xosc/cut-in.xosc
Play DAT file:
./bin/replayer --config_file_path ./cfg_dat.yml
Config file usage example 2: Easy video creation
Without config
The typical procedure to create a video clip from a scenario is as follows:
Create image files:
./bin/esmini --headless --window 0 0 1920 1080 --fixed_timestep 0.016667 --screen_capture --osc ./resources/xosc/cut-in.xosc
A series of TGA images (screen_shot_00000.tga, screen_shot_00001.tga …) is created in current folder. Resolution in this case is 1920x1080 (HD). Timestep 0.016668 correlates to 60 fps.
There are many ways to convert the images into a video clip. Example using ffmpeg:
ffmpeg -f image2 -framerate 60 -i screen_shot_%5d.tga -c:v libx264 -vf format=yuv420p -crf 15 out.mp4
See Create video clip of a scenario for more info on ffmpeg.
With config
It’s a bit tricky to remember resolution and timestep settings for esmini. Now you can create config files for favorite settings. For example:
Create cfg_hd.yml in esmini root as:
esmini:
headless: true
window: 0 0 1920 1080
fixed_timestep: 0.016667
capture_screen: true
and cfg_sd.yml as:
esmini:
headless: true
window: 0 0 720 480
fixed_timestep: 0.033333
capture_screen: true
Create images for HD/60fps:
./bin/esmini --config_file_path ./cfg_hd.yml --osc ./resources/xosc/cut-in.xosc
and SD/30fps:
./bin/esmini --config_file_path ./cfg_sd.yml --osc ./resources/xosc/cut-in.xosc
You still need to supply corresponding framerate argument to ffmpeg:
ffmpeg -f image2 -framerate 60 -i screen_shot_%5d.tga -c:v libx264 -vf format=yuv420p -crf 15 out.mp4
and
ffmpeg -f image2 -framerate 30 -i screen_shot_%5d.tga -c:v libx264 -vf format=yuv420p -crf 15 out.mp4
respectively.
esmini
Launch commands
Usage: esmini [options]
Options:
[--osc] <filename>
OpenSCENARIO filename (required) - if path includes spaces, enclose with ""
--aa_mode [mode] (default if value omitted: 4)
Anti-alias mode=number of multisamples (subsamples, 0=off)
--axis_indicator <mode>
0:off 1:on 2:xray, cycle key 'x'
--align_routepositions
Align t-axis of route positions to the direction of the route
--bounding_boxes
Show entities as bounding boxes. Toggle key ','
--capture_screen
Continuous screen capture. Warning: Many jpeg files will be created
--camera_mode [mode] (default if option or value omitted: orbit)
Initial camera mode ("orbit", "fixed", "flex", "flex-orbit", "top", "driver", "custom"). Toggle key 'k'
--csv_logger [csv_filename] (default if value omitted: log.csv)
Log data for each vehicle in ASCII csv format
--collision
Enable global collision detection, potentially reducing performance
--config_file_path [path]... (default if value omitted: config.yml)
Configuration file path/filename, e.g. "../my_config.txt"
--custom_camera <position>...
Additional custom camera position <x,y,z>[,h,p]
--custom_fixed_camera <position and optional orientation>...
Additional custom fixed camera position <x,y,z>[,h,p]
--custom_fixed_top_camera <position and rotation>...
Additional custom top camera <x,y,z,rot>
--custom_light <position and intensity>...
Additional custom light source <x,y,z,intensity> intensity range 0..1
--disable_controllers
Disable controllers
--disable_log
Prevent logfile from being created
--disable_stdout
Prevent messages to stdout
--enforce_generate_model
Generate road 3D model even if SceneGraphFile is specified
--fixed_timestep <timestep>
Run simulation decoupled from realtime, with specified timesteps
--follow_object <object index (0, 1, 2..., ALL, ROAD)>
Set index of initial object for camera to follow (change with Tab/shift-Tab)
--generate_no_road_objects
Do not generate any OpenDRIVE road objects (e.g. when part of referred 3D model)
--generate_without_textures
Do not apply textures on any generated road model (set colors instead as for missing textures)
--ghost_trail_dt [dt] (default if value omitted: 0.200000)
Ghost trail sample delta time
--ground_plane [mode] (default if option or value omitted: auto)
Add a large flat ground surface. Modes: on, off, auto
--headless
Run without viewer window
--help
Show this help message (-h works as well)
--hide_route_waypoints
Disable route waypoint visualization. Toggle key 'R'
--hide_trajectories
Hide trajectories from start. Toggle key 'n'
--hide_ghost
Do not visualize ghost
--hide_obj_outline
Hide any object 2D shape outlines (toggle key ';')
--ignore_heading_for_traj_motion
Ignore heading when deciding motion direction along trajectory
--ignore_odr_offset
Ignore any offset specified in the OpenDRIVE file header
--ignore_z
Ignore provided z values from OSC file and place vehicle relative to road
--ignore_p
Ignore provided pitch values from OSC file and place vehicle relative to road
--ignore_r
Ignore provided roll values from OSC file and place vehicle relative to road
--info_text [mode] (default if option or value omitted: 1)
Show on-screen info text. Modes: 0=None 1=current 2=per_object 3=both. Toggle key 'i'
--light_mode [mode] (default if option or value omitted: auto)
Show lights for light state actions. Modes: on, off, auto. Toggle key 'L'
--log_append
Log all scenarios in the same txt file
--logfile_path [path] (default if option or value omitted: log.txt)
Logfile path/filename, e.g. "../my_log.txt"
--log_meta_data
Log file name, function name and line number
--log_level [mode] (default if option or value omitted: info)
Log level debug, info, warn, error
--log_only_modules <modulename(s)>
Log from only these modules. Overrides log_skip_modules. See User guide for more info
--log_skip_modules <modulename(s)>
Skip log from these modules, all remaining modules will be logged. See User guide for more info
--osc_str <string>
OpenSCENARIO XML string
--osg_screenshot_event_handler
Revert to OSG default jpg images ('c'/'C' keys handler)
--osi_crop_dynamic <id,radius>...
Crop the dynamic osi data around the given object id with given radius
--osi_exclude_ghost
Excludes ghost from osi dynamic osi ground truth
--osi_file [filename] (default if value omitted: ground_truth.osi)
Save osi trace file
--osi_freq <frequency>
Decrease OSI file entries, e.g. --osi_freq 2 -> OSI written every two simulation steps
--osi_lines
Show OSI road lines. Toggle key 'u'
--osi_points
Show OSI road points. Toggle key 'y'
--osi_receiver_ip [IP address] (default if value omitted: 127.0.0.1)
IP address where to send OSI UDP packages
--osi_static_reporting [mode] (default if value omitted: 0)
Decide how the static data should be reported, 0=Default (first frame), 1=API (expose on API) 2=API_AND_LOG (Always log)
--param_dist <filename>
Run variations of the scenario according to specified parameter distribution file
--param_permutation <index>
Run specific permutation of parameter distribution, index in range (0 .. NumberOfPermutations-1)
--pause
Pause simulation after initialization
--path <path>...
Search path prefix for assets, e.g. OpenDRIVE files.
--player_server
Launch UDP server for action/command injection
--plot [mode] (default if value omitted: asynchronous)
Show window with line-plots of interesting data. Modes: asynchronous, synchronous
--pline_interpolation <mode>
Interpolate orientation ("segment", "corner", "off")
--record [filename] (default if value omitted: sim.dat)
Record position data into a file for later replay
--road_features [mode] (default if value omitted: on)
Show OpenDRIVE road features. Modes: on, off. Toggle key 'o'
--return_nr_permutations
Return number of permutations without executing the scenario (-1 = error)
--save_generated_model
Save generated 3D model (n/a when a scenegraph is loaded)
--save_xosc [mode] (default if value omitted: continue)
Save OpenSCENARIO file with any populated parameter values (from distribution). Modes: quit, continue.
--seed <number>
Specify seed number for random generator
--sensors
Show sensor frustums. Toggle key 'r'
--server
Launch server to receive state of external Ego simulator
--text_scale [size factor] (default if option or value omitted: 1.0)
Scale screen overlay text
--threads
Run viewer in a separate thread, parallel to scenario engine
--trail_mode [mode] (default if value omitted: 0)
Show trail lines and/or dots. Modes: 0=None 1=lines 2=dots 3=both. Toggle key 'j'
--traj_filter [radius] (default if option or value omitted: 0.1)
Simple filter merging close points. Set 0.0 to disable
--tunnel_transparency [transparency] (default if value omitted: 0.0)
Set level of transparency for generated tunnels [0:1]
--use_signs_in_external_model
When external scenegraph 3D model is loaded, skip creating signs from OpenDRIVE
--vehicle_dynamics [<pitch,roll,tension>[,damping]]... (default if value omitted: 2,5,25)
Visualize simple vehicle dynamics
--version
Show version and quit
--view_mode <view_mode>
Entity visualization: "model"(default)/"boundingbox"/"both"/"filled_boundingbox" toggle key ','
--wireframe
Global wireframe mode, toggle key 'w'
Additional OSG graphics options:
--clear-color <color> Set the background color of the viewer in the form "r,g,b[,a]"
--screen <num> Set the screen to use when multiple screens are present
--window <x y w h> Set the position x, y and size w, h of the viewer window. -1 -1 -1 -1 for fullscreen.
--borderless-window <x y w h> Set the position x, y and size w, h of a borderless viewer window. -1 -1 -1 -1 for fullscreen.
--SingleThreaded Run application and all graphics tasks in one single thread.
--lodScale <LOD scalefactor> Adjust Level Of Detail 1=default >1 decrease fidelity <1 increase fidelity
For a complete list of OSG options and environment variables, see here:
https://github.com/esmini/esmini/blob/master/docs/osg_options_and_env_variables.txt
Runtime key shortcut commands
Key shortcuts
H (shift + h): Print this help text to console
Space: Toggle pause/play simulation
Return: Step simulation (one timestep) then pause
TAB: Move camera to next entity (0, 1, 2..., ALL, ROAD)
Shift + TAB: Move camera to previous entity
Delete: Same as above (Shift + TAB)
o: Toggle show / hide OpenDRIVE road feature lines
O: Toggle show / hide odr signal bounding boxes
u: Toggle show / hide OSI road lines
y: Toggle show / hide OSI road points
p: Toggle show / hide environment 3D model
r: Toggle show / hide sensor view frustums
R: Toggle route waypoint visualization
i: Toggle on-screen info text modes
j: Toggle show trails after vehicles(4 modes: none / dots / lines / both)
n: Toggle show active trajectories
, (comma): Switch entity view : Model only / Bounding box / Model + Bounding box / None
K: Print current camera position and orientation to console
x: Cycle axis indicator view mode (off, on, xray)
ESC: quit
Arrow keys is used to drive externally controlled Ego vehicle:
Up: Accelerate
Down: Brake
Left: Steer left
Right: Steer right
1 - 9: Camera models according to :
1: Custom camera model
2: Flight
3: Drive
4: Terrain
5: Orbit
6: FirstPerson
7: Spherical
8: NodeTracker
9: Trackball
When custom camera model(1) is activated
k: Switch between the following sub models:
- Orbit (camera facing vehicle, rotating around it)
- Fixed (fix rotation, always straight behind vehicle)
- Flex (imagine the camera attached to vehicle via an elastic string)
- Flex - orbit (Like flex but allows for rotation around vehicle)
- Top (top view, fixed rotation, always straight above vehicle)
- Driver ("driver" view, fixed at center of vehicle)
Viewer options
f: Toggle full screen mode
t: Toggle textures
s: Rendering statistics
l: Toggle light
w: Toggle geometry mode(shading, wireframe, dots)
c: Save screenshot in JPEG format - in the folder where the application was started from
C: Toggle continuous screen capture (e.g for video creation)
h: Help
Mouse control
Left: Rotate
Right: Zoom
Middle: Pan
This is typical, exact behaviour depends on active camera model.
replayer
Usage: replayer [options]
Options:
[--file] <filename>
Simulation recording data file (.dat)
--aa_mode [mode] (default if value omitted: 4)
Anti-alias mode=number of multisamples (subsamples, 0=off)
--axis_indicator <mode>
0:off 1:on 2:xray, cycle key 'x'
--camera_mode [mode] (default if option or value omitted: orbit)
Initial camera mode ("orbit", "fixed", "flex", "flex-orbit", "top", "driver", "custom"). Toggle key 'k'
--capture_screen
Continuous screen capture. Warning: Many jpeg files will be created
--collision [mode] (default if value omitted: pause)
Detect collisions and optionally pauses the replay <pause/continue> (pause is default)
--config_file_path [path]... (default if option or value omitted: config.yml)
Configuration file path/filename, e.g. "../my_config.txt"
--custom_camera <position>...
Additional custom camera position <x,y,z>[,h,p]
--custom_fixed_camera <position and optional orientation>...
Additional custom fixed camera position <x,y,z>[,h,p]
--custom_fixed_top_camera <position and rotation>...
Additional custom top camera <x,y,z,rot>
--dir <path>
Directory containing replays to overlay, pair with "file" argument, where "file" is .dat filename match substring
--fixed_timestep <s>
Use fixed timestep for the replay
--ground_plane [mode] (default if option or value omitted: auto)
Add a large flat ground surface. Modes: on, off, auto
--generate_without_textures
Do not apply textures on any generated road model (set colors instead as for missing textures)
--gui [mode] (default if option or value omitted: on)
Show gui overlay on graphics window. Modes: on, off
--headless
Run without viewer window
--help
Show this help message (-h works as well)
--hide_trajectories
Hide trajectories from start (toggle with key 'n')
--hide_obj_outline
Hide any object 2D shape outlines (toggle key ';')
--info_text [mode] (default if option or value omitted: 1)
Show on-screen info text. Modes: 0=None 1=current 2=per_object 3=both. Toggle key 'i'
--light_mode [mode] (default if option or value omitted: auto)
Show lights for light state actions. Modes: on, off, auto. Toggle key 'L'
--logfile_path [path] (default if option or value omitted: replayer_log.txt)
Logfile path/filename, e.g. "../my_log.txt"
--log_level [mode] (default if option or value omitted: info)
Log level debug, info, warn, error
--no_ghost
Remove ghost entities
--no_ghost_model
Remove only ghost model, show trajectory (toggle with key 'g')
--osg_screenshot_event_handler
Revert to OSG default jpg images ('c'/'C' keys handler)
--path <path>...
Search path prefix for assets, e.g. OpenDRIVE files.
--quit_at_end
Quit application when reaching end of scenario
--remove_object <id>
Remove object(s). Multiple ids separated by comma, e.g. 2,3,4.
--repeat
loop scenario
--res_path <path>
Path to resources root folder - relative or absolut
--road_features [mode] (default if value omitted: on)
Show OpenDRIVE road features. Modes: on, off. Toggle key 'o'
--save_merged <filename>
Save merged data into one dat file, instead of viewing
--start_time <ms>
Start playing at timestamp
--stop_time <ms>
Stop playing at timestamp (set equal to time_start for single frame)
--text_scale [size factor] (default if option or value omitted: 1.0)
Scale screen overlay text
--time_scale <factor>
Playback speed scale factor (1.0 == normal)
--tunnel_transparency [transparency] (default if value omitted: 0.0)
Set level of transparency for generated tunnels [0:1]
--use_signs_in_external_model
When external scenegraph 3D model is loaded, skip creating signs from OpenDRIVE
--version
Show version and quit
--view_ghost_restart
Ghost restarts will be shown with separate ghosts
--view_mode <view_mode>
Entity visualization: "model"(default)/"boundingbox"/"both"/"filled_boundingbox" toggle key ','
--wireframe
Global wireframe mode, toggle key 'w'
Additional OSG graphics options:
--clear-color <color> Set the background color of the viewer in the form "r,g,b[,a]"
--screen <num> Set the screen to use when multiple screens are present
--window <x y w h> Set the position x, y and size w, h of the viewer window. -1 -1 -1 -1 for fullscreen.
--borderless-window <x y w h> Set the position x, y and size w, h of a borderless viewer window. -1 -1 -1 -1 for fullscreen.
--SingleThreaded Run application and all graphics tasks in one single thread.
--lodScale <LOD scalefactor> Adjust Level Of Detail 1=default >1 decrease fidelity <1 increase fidelity
Key shortcuts
H (shift + h): Print this help text to console
TAB: Move camera to next entity (0, 1, 2..., ALL, ROAD)
Shift + TAB: Move camera to previous entity
Delete: Same as above (Shift + TAB)
Space: Toggle pause / play
g: Toggle show / hide ghost models
o: Toggle show / hide OpenDRIVE road feature lines
u: Toggle show / hide OSI road lines
y: Toggle show / hide OSI road points
p: Toggle show / hide environment 3D model
i: Toggle on-screen info text modes
Shift + i: Toggle show / hide on-screen GUI
n: Toggle show active trajectories
, (comma): Switch entity view : Model only / Bounding box / Model + Bounding box / None
; (shift + ,): Toggle show/hide object outlines
K: Print current camera position and orientation to console
x: Cycle axis indicator view mode (off, on, xray)
ESC: quit
Arrow keys
Left: Pause and move to previous frame(+Shift to skip 10 frames)
Right: Pause and move to next frame(+Shift to skip 10 frames)
Shift + Left: Pause and jump 0.1s back
Shift + Right: Pause and jump 0.1s forward
Shift + Ctrl Left: Pause and jump 1.0s back
Shift + Ctrl Right: Pause and jump 1.0s forward
Ctrl + Left: Pause and jump to beginning
Ctrl + Right: Pause and jump to end
Up: Increase timeScale(play faster)
Down: Decrease timeScale(play slower)
1 - 9: Camera models according to :
1: Custom camera model
2: Flight
3: Drive
4: Terrain
5: Orbit
6: FirstPerson
7: Spherical
8: NodeTracker
9: Trackball
When custom camera model(1) is activated
k: Switch between the following sub models:
- Orbit (camera facing vehicle, rotating around it)
- Fixed (fix rotation, always straight behind vehicle)
- Flex (imagine the camera attached to vehicle via an elastic string)
- Flex - orbit (Like flex but allows for rotation around vehicle)
- Top (top view, fixed rotation, always straight above vehicle)
- Driver ("driver" view, fixed at center of vehicle)
Viewer options
f: Toggle full screen mode
t: Toggle textures
s: Rendering statistics
l: Toggle light
w: Toggle geometry mode(shading, wireframe, dots)
c: Save screenshot in JPEG format - in the folder where the application was started from
C: Toggle continuous screen capture (e.g for video creation)
h: Help
Mouse control
Left: Rotate
Right: Zoom
Middle: Pan
This is typical, exact behaviour depends on active camera model.
Recommended usage:
Run esmini headless (fast without viewer) and produce a .dat file. Then launch replayer to view it. Example in Windows PowerShell, starting from esmini/bin folder:
.\esmini --osc ..\resources\xosc\cut-in.xosc --record sim.dat --headless --fixed_timestep 0.01 ; .\replayer --file sim.dat --window 60 60 800 400 --res_path ..\resources --repeat
odrviewer
Usage: odrviewer [options]
Options:
--path <path>...
Search path prefix for assets, e.g. OpenDRIVE files.
--help
Show this help message (-h works as well)
[--odr] <odr_filename>
OpenDRIVE filename (required)
--aa_mode [mode] (default if value omitted: 4)
Anti-alias mode=number of multisamples (subsamples, 0=off)
--axis_indicator <mode>
0:off 1:on 2:xray, cycle key 'x'
--capture_screen
Continuous screen capture. Warning: Many .tga files will be created
--config_file_path [path]... (default if option or value omitted: config.yml)
Configuration file path/filename, e.g. "../my_config.txt"
--custom_fixed_camera <position and optional orientation>...
Additional custom camera position <x,y,z>[,h,p]
--custom_fixed_top_camera <position and rotation>...
Additional custom top camera <x,y,z,rot>
--density [density] (default if value omitted: 1.000000)
density (cars / 100 m)
--enforce_generate_model
Generate road 3D model even if --model is specified
--disable_log
Prevent logfile from being created
--disable_off_screen
Disable esmini off-screen rendering, revert to OSG viewer default handling
--disable_stdout
Prevent messages to stdout
--duration <duration>
Quit automatically after specified time (seconds, floating point)
--fixed_timestep <timestep>
Run simulation decoupled from realtime, with specified timesteps
--generate_no_road_objects
Do not generate any OpenDRIVE road objects (e.g. when part of referred 3D model)
--generate_without_textures
Do not apply textures on any generated road model (set colors instead as for missing textures)
--ground_plane [mode] (default if option or value omitted: auto)
Add a large flat ground surface. Modes: on, off, auto
--headless
Run without viewer window
--log_append
Log all scenarios in the same txt file
--logfile_path [path] (default if value omitted: odrviewer_log.txt)
Logfile path/filename, e.g. "../my_log.txt"
--log_meta_data
Log file name, function name and line number
--log_level [mode] (default if option or value omitted: info)
Log level debug, info, warn, error
--log_only_modules <modulename(s)>
Log from only these modules. Overrides log_skip_modules. See User guide for more info
--log_skip_modules <modulename(s)>
Skip log from these modules, all remaining modules will be logged. See User guide for more info
--model <model_filename>
3D Model filename
--osg_screenshot_event_handler
Revert to OSG default jpg images ('c'/'C' keys handler)
--osi_lines
Show OSI road lines. Toggle key 'u'
--osi_points
Show OSI road points. Toggle key 'y'
--path <path>...
Search path prefix for assets, e.g. OpenDRIVE files.
--pause
Pause simulation after initialization. Press 'space' to start.
--road_features [mode] (default if value omitted: on)
Show OpenDRIVE road features. Modes: on, off. Toggle key 'o'
--save_generated_model
Save generated 3D model (n/a when a scenegraph is loaded)
--seed <number>
Specify seed number for random generator
--speed_factor [speed_factor] (default if value omitted: 1.000000)
speed_factor <number>
--stop_at_end_of_road
Instead of respawning elsewhere, stop when no connection exists
--text_scale [size factor] (default if option or value omitted: 1.0)
Scale screen overlay text
--traffic_rule <rule (right/left)>
Enforce left or right hand traffic, regardless OpenDRIVE rule attribute (default: right)
--tunnel_transparency [transparency] (default if value omitted: 0.0)
Set level of transparency for generated tunnels [0:1]
--use_signs_in_external_model
When external scenegraph 3D model is loaded, skip creating signs from OpenDRIVE
--version
Show version and quit
--wireframe
Global wireframe mode, toggle key 'w'
Additional OSG graphics options:
--clear-color <color> Set the background color of the viewer in the form "r,g,b[,a]"
--screen <num> Set the screen to use when multiple screens are present
--window <x y w h> Set the position x, y and size w, h of the viewer window. -1 -1 -1 -1 for fullscreen.
--borderless-window <x y w h> Set the position x, y and size w, h of a borderless viewer window. -1 -1 -1 -1 for fullscreen.
--SingleThreaded Run application and all graphics tasks in one single thread.
--lodScale <LOD scalefactor> Adjust Level Of Detail 1=default >1 decrease fidelity <1 increase fidelity
Examples:
1. View the ODR file and some random traffic on a 3D model, window mode 1000 x 500:
odrviewer --odr xodr\e6mini.xodr --model models\e6mini.osgb --window 60 60 1000 500
2. Just ODR, fullscreen
odrviewer --odr xodr\e6mini.xodr
3. Remove traffic
odrviewer --odr xodr\e6mini.xodr --model models\e6mini.osgb --density 0 --window 60 60 1000 500
4. Sparse traffic (about 0.5 vehicle per 100 meter = 1 per 200 m)
odrviewer --odr xodr\e6mini.xodr --model models\e6mini.osgb --density 0.5 --window 60 60 1000 500
Key shortcuts
H (shift + h): Print this help text to console
Space: Toggle pause/play simulation
Return: Step simulation(one timestep) then pause
TAB: Move camera to next entity (0, 1, 2..., ALL, ROAD)
Shift + TAB: Move camera to previous entity
Delete: Same as above (Shift + TAB)
o: Toggle show / hide OpenDRIVE road feature lines
u: Toggle show / hide OSI road lines
y: Toggle show / hide OSI road points
p: Toggle show / hide environment 3D model
i: Toggle info text showing time and speed
, (comma): Switch entity view : Model only / Bounding box / Model + Bounding box / None
K: Print current camera position and orientation to console
x: Cycle axis indicator view mode (off, on, xray)
ESC: quit
1 - 9: Camera models according to :
1: Custom camera model
2: Flight
3: Drive
4: Terrain
5: Orbit
6: FirstPerson
7: Spherical
8: NodeTracker
9: Trackball
When custom camera model(1) is activated
k: Switch between the following sub models:
- Orbit (camera facing vehicle, rotating around it)
- Fixed (fix rotation, always straight behind vehicle)
- Flex (imagine the camera attached to vehicle via an elastic string)
- Flex - orbit (Like flex but allows for rotation around vehicle)
- Top (top view, fixed rotation, always straight above vehicle)
- Driver ("driver" view, fixed at center of vehicle)
Viewer options
f: Toggle full screen mode
t: Toggle textures
s: Rendering statistics
l: Toggle light
w: Toggle geometry mode(shading, wireframe, dots)
c: Save screenshot in JPEG format - in the folder where the application was started from
C: Toggle continuous screen capture
h: Help
Mouse control
Left: Rotate
Right: Zoom
Middle: Pan
This is typical, exact behaviour depends on active camera model.
plot_dat.py
usage: plot_dat.py [-h] [--x_axis X_AXIS] [--equal_axis_aspect] [--derive] [--dots] (--list_params | --param PARAM) <filename>
positional arguments:
filename dat filename
optional arguments:
-h, --help show this help message and exit
--x_axis X_AXIS x-axis parameter
--equal_axis_aspect lock aspect ratio = 1:1
--derive derive values wrt x, i.e. dy/dx
--dots add dots
--list_params list available parameters in given file
--param PARAM parameter to plot (can be specified multiple times)
Note: In addition to <filename> one of the arguments --list_params and --param <PARAM> is required