Command Line Interface
A command line interface named scl
is available to interact with SMARTS.
Examples of common usage are as follows.
# Start envision server
$ scl envision start
# Build all scenarios under given directories
$ scl scenario build-all ./scenarios
# Rebuild a single scenario, replacing any existing generated assets
$ scl scenario build --clean scenarios/sumo/loop
# Clean generated scenario artifacts
$ scl scenario clean scenarios/sumo/loop
scl
The SMARTS command line interface. Use –help with each command for further information.
scl [OPTIONS] COMMAND [ARGS]...
benchmark
Utilities for running integrated ML benchmarks. See scl benchmark COMMAND –help for further options.
scl benchmark [OPTIONS] COMMAND [ARGS]...
list
Lists available benchmarks that can be used for scl benchmark run.
scl benchmark list [OPTIONS]
Options
- --benchmark-listing <benchmark_listing>
Directs to a different listing file.
run
This runs a given benchmark.
Use scl benchmark list to see the available benchmarks.
An example use: scl benchmark run –auto-install driving_smarts==0.0 random-relative-target-pose-agent-v0
scl benchmark run [OPTIONS] <benchmark_id> <agent_locator>
Options
- --debug-log
Log the benchmark in
stdout
.
- --benchmark-listing <benchmark_listing>
Directs to a different listing file.
- --auto-install
Attempt to auto install requirements.
Arguments
- <benchmark_id>
Required argument
- <agent_locator>
Required argument
diagnostic
Utilities for diagnosing the simulation performance. See scl diagnostic COMMAND –help for further options.
scl diagnostic [OPTIONS] COMMAND [ARGS]...
run
Run all diagnostics.
scl diagnostic run [OPTIONS] <scenarios>
Arguments
- <scenarios>
Optional argument(s)
envision
Commands to utilize an Envision server. The Envision web server is used for visualization purposes. See scl envision COMMAND –help for further options.
scl envision [OPTIONS] COMMAND [ARGS]...
start
Start an Envision server.
scl envision start [OPTIONS]
Options
- -p, --port <port>
Port Envision will run on.
- -c, --max_capacity <max_capacity>
Max capacity in MB of Envision’s playback buffer. The larger the more contiguous history Envision can store.
run
Run an experiment on a scenario
scl run [OPTIONS] <script> [SCRIPT_ARGS]...
Options
- --envision
Start up Envision server at the specified port when running an experiment
- -p, --envision_port <envision_port>
Port on which Envision will run.
Arguments
- <script>
Required argument
- SCRIPT_ARGS
Optional argument(s)
scenario
Generate, replay or clean scenarios. See scl scenario COMMAND –help for further options.
scl scenario [OPTIONS] COMMAND [ARGS]...
build
Generate a single scenario
scl scenario build [OPTIONS] <scenario>
Options
- --clean
Clean previously generated artifacts first
- --seed <seed>
Set the base seed of the scenario.
Arguments
- <scenario>
Required argument
build-all
Generate all scenarios under the given directories
scl scenario build-all [OPTIONS] <scenarios>
Options
- --clean
Clean previously generated artifacts first
- --seed <seed>
Set the base seed of the scenarios.
Arguments
- <scenarios>
Optional argument(s)
clean
Remove previously generated scenario artifacts.
scl scenario clean [OPTIONS] <scenario>
Arguments
- <scenario>
Required argument
replay
Play saved Envision data files in Envision.
scl scenario replay [OPTIONS]
Options
- -d, --directory <directory>
- -t, --timestep <timestep>
Timestep in seconds
- --endpoint <endpoint>
waymo
Utilities for using the Waymo Motion Dataset with SMARTS. See scl waymo COMMAND –help for further options.
scl waymo [OPTIONS] COMMAND [ARGS]...
export
Export the Waymo scenario to a SMARTS scenario.
scl waymo export [OPTIONS] <tfrecord_file> <scenario_id> <export_folder>
Arguments
- <tfrecord_file>
Required argument
- <scenario_id>
Required argument
- <export_folder>
Required argument
overview
Display summary info for each scenario in the TFRecord file.
scl waymo overview [OPTIONS] <tfrecord_file>
Arguments
- <tfrecord_file>
Required argument
preview
Plot the map and trajectories of the scenario.
scl waymo preview [OPTIONS] <tfrecord_file> <scenario_id>
Options
- --animate
Animate the vehicle trajectories.
- --label_vehicles
Plot the initial positions of all vehicles with their IDs.
Arguments
- <tfrecord_file>
Required argument
- <scenario_id>
Required argument
zoo
Build, install, or instantiate workers.
scl zoo [OPTIONS] COMMAND [ARGS]...
build
Build a policy
scl zoo build [OPTIONS] <policy>
Arguments
- <policy>
Required argument
install
Attempt to install the specified agents from the given URI path.
scl zoo install [OPTIONS] <agent_path>
Arguments
- <agent_path>
Required argument(s)
manager
Start the manager process which instantiates workers. Workers execute remote agents.
scl zoo manager [OPTIONS] [PORT]
Arguments
- PORT
Optional argument