Runtime Commands and Targets
Use First Simulation for a complete first run. This page describes command choices and advanced runtime operations.
Repository Setup
Run python setup.py in the CAVISE root, with its Python environment
active. Omitting repository names selects all five repositories. Omitting a
version opens an interactive branch/tag selection. It does not silently
select main. Existing directories are skipped.
Repository |
Version option |
|---|---|
|
|
|
|
|
|
|
|
|
|
For example, clone OpenCDA and OpenCOOD at explicit refs:
python setup.py opencda opencood -o main -O main
Container Lifecycle
Run ./run.sh COMMAND [SERVICES...] from the CAVISE root on Linux/WSL.
Main services are carla, opencda, artery and sumo. Omitting
services selects all main services, including CARLA on Windows. Prefer an
explicit service list for the experiment you are running.
Command |
Behavior |
|---|---|
|
Build images. Does not start containers or simulator processes. |
|
Create/start containers in the background, recreating them when needed. |
|
Start existing stopped containers. Does not apply image/config changes. |
|
Stop containers while retaining them. |
|
Restart existing containers. Does not rebuild images. |
|
Remove containers via Compose. Files outside bind mounts may be lost. |
For example:
./run.sh build opencda-coperception
./run.sh up opencda-coperception
./run.sh stop opencda-coperception
./run.sh start opencda-coperception
Only one OpenCDA target can be selected per invocation. All targets use the
same service and container name, opencda. They are not simultaneous
independent containers.
OpenCDA Image Targets
Target |
OpenCOOD |
Protobuf |
Custom CUDA |
Use |
|---|---|---|---|---|
|
No |
No |
No |
Core CARLA/OpenCDA, optionally SUMO. |
|
No |
Yes |
No |
Artery without cooperative perception. |
|
Yes |
No |
No |
Models that do not require custom CUDA extensions. |
|
Yes |
No |
Yes |
Models requiring custom CUDA extensions, such as FPV-RCNN. |
|
Yes |
Yes |
Yes |
Cooperative perception together with Artery. Default target. |
All targets use the CUDA runtime base. CUDA extensions are a separate build
capability, not the switch that enables GPU computation. opencda-minimal
and opencda-protobuf do not install OpenCOOD.
The default CUDA architecture is 86. Set CUDA_ARCHITECTURES to the
architectures supported by your GPU and the image’s CUDA compiler, for example:
CUDA_ARCHITECTURES="86;89" ./run.sh build opencda-cuda
Rebuild after changing a Dockerfile or dependencies. Rebuild a Protobuf target
after changing a CAPI .proto file, and a CUDA target after changing native
OpenCOOD sources. Use up afterwards: native artifacts are synchronized
into the mounted workspace by the container entrypoint.
Direct Compose Access
run.sh normally selects the target, tag, paths and model directory for
you. For direct Compose use, stay in the CAVISE root and prepare the model
mount before creating a container:
source paths.conf
mkdir -p "$PATH_TO_MODELS"
export OPENCDA_BUILD_TARGET=opencda-protobuf
export OPENCDA_IMAGE_TAG=protobuf
docker compose -f dc-configs/docker-compose.yml --env-file paths.conf build opencda
docker compose -f dc-configs/docker-compose.yml --env-file paths.conf up -d opencda
Target suffixes map to image tags minimal, protobuf, coperception
and cuda. The full target uses local. Set both variables consistently.
To inspect the rendered configuration without starting anything:
docker compose -f dc-configs/docker-compose.yml --env-file paths.conf config
To remove the entire main Compose project:
./run.sh down
Scenario Manager
The web scenario manager uses a separate Compose project and is not included
in an unqualified run.sh up. Run it separately:
./run.sh build scenario-manager
./run.sh up scenario-manager
Open http://localhost if the browser does not open automatically. Stop it
with ./run.sh stop scenario-manager. Keep these invocations separate from
main simulator services because the wrapper forwards service arguments to
the selected Compose projects.
OpenCDA CLI
Inside the OpenCDA container, run:
python opencda.py --help
-t selects a YAML path below opencda/scenario_testing/config_yaml
without its suffix. Nested paths are accepted. --carla-host defaults to
carla. Docker Desktop on Windows uses host.docker.internal in these
guides. --artery-host defaults to artery:7777.
Use SUMO and Artery, Cooperative Perception, AdvCP and Recording and Results for complete launch examples.
Artery Frontends
In the Artery container, from /workspaces/artery, select a Qt frontend:
./tools/run_artery.py -l /cached-build/Debug/run-artery.ini -s scenarios/capi -u Qtenv
Use -u Cmdenv for a terminal frontend. Add -c CONFIG_NAME to select a
configuration declared by the scenario’s omnetpp.ini. Build instructions
and the full startup order are in SUMO and Artery.