Configuration
SMARTS
You can change the behavior of the underlying SMARTS engine.
Configuration of the engine can come from several sources. These locations take precedence as noted:
Individual
SMARTS_
prefixed environment variables (e.g.SMARTS_SENSOR_WORKER_COUNT
)Local directory engine configuration (
./smarts_engine.ini
)Local user engine configuration,
~/.smarts/engine.ini
, if local directory configuration is not found.Global engine configuration,
/etc/smarts/engine.ini
, if local configuration is not found.Package default configuration,
$PYTHON_PATH/smarts/engine.ini
, if global configuration is not found.Code default,
config(section, option, default=4)
, if global configuration is not found.Option default if code default is not given.
Note that configuration files resolve all settings at the first found configuration file (they do not layer.)
Options
- All settings demonstrated as environment variables are formatted to
UPPERCASE
and prefixed withSMARTS_
(e.g.
[core] logging
can be configured withSMARTS_CORE_LOGGING
).
Below is a comparison of valid approaches to changing an engine configuration value:
; Example configuration file
; For syntax see https://docs.python.org/3/library/configparser.html#supported-ini-file-structure
[assets]
default_agent_vehicle = passenger
$ # Another way to apply the value
$ export SMARTS_ASSETS_DEFAULT_AGENT_VEHICLE=passenger
YAML resources
YAML files resolve as PyYAML.safe_load() <https://pyyaml.org/wiki/PyYAMLDocumentation> allows with a few extensions.
Dynamic module resolution
The benchmark configuration directory can be dynamically found through
python using an evaluation syntax ${{}}
. This is experimental and
open to change but the following resolves the python module location in
loaded configuration files:
somewhere_path: ${{module.to.resolve}}/file.txt # resolves to <path>/module/to/resolve/file.txt
This avoids loading the module into python but resolves to the first path that matches the module.
Environment variable resolution
Resolving SMARTS engine configuration.
The engine configuration resolves by referencing the setting through
the evaluation syntax ${}
. This is restricted to "SMARTS_"
prefixed environment variables.
is_debug: ${SMARTS_CORE_DEBUG} # literal environment variable or engine setting `[core] debug`
Engine settings
The current list of engine settings are as follows:
Setting |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Section |
assets |
assets |
assets |
core |
core |
core |
core |
core |
physics |
ray |
ray |
ray |
sumo |
sumo |
sumo |
visdom |
visdom |
visdom |
Type |
string |
string |
string |
boolean |
integer |
integer |
integer |
string |
integer |
integer|``None`` |
integer|``None`` |
boolean |
string |
string |
integer |
boolean |
string |
integer |
Default |
|
|
|
|
32 |
0 |
0 |
|
240 |
|
0 |
|
8619 |
|
|
False |
|
8097 |
Values |
Any existing path (not recommended to change) |
Any defined vehicle name. |
Any existing |
True|False |
0 or greater |
0 or greater (0 disables parallelization) |
0 or greater |
[ |
1 or greater (240 highly recommended) |
0 or greater | None |
0 or greater | None |
True|False |
[ |
[ |
As dictated by OS. |
True|False |
[ |
As dictated by OS. |
Description |
The path to SMARTS package assets. |
This uses a vehicle from those defined in the |
The path to a vehicle definition file. See vehicle defaults for more information. |
Enables additional debugging information from SMARTS. |
Reserves that number of custom image sensors for an individual vehicle. |
Determines how many workers SMARTS will use when generating observations. 0 disables parallelization. |
Increasing this value gives more attempts for SMARTS to reset to a valid initial state. This can be used to bypass edge case engine errors. |
Selects the parallelization backing for SMARTS sensors and observation generation. |
WARNING change at peril. Configures pybullet’s frequency. |
Configures how many CPU’s that |
Configures how many GPU’s that |
Enables |
If |
If |
The |
If to enable visdom visualization. |
The host name for the |
The port of the |