Skip to content

feat: add docker-compose demo for CARLA - #7264

Merged
xmfcx merged 9 commits into
autowarefoundation:mainfrom
mitsudome-r:feat/carla-docker-compose
Aug 31, 2026
Merged

feat: add docker-compose demo for CARLA#7264
xmfcx merged 9 commits into
autowarefoundation:mainfrom
mitsudome-r:feat/carla-docker-compose

Conversation

@mitsudome-r

@mitsudome-r mitsudome-r commented Aug 10, 2026

Copy link
Copy Markdown
Member

Description

#7079

Adds a Docker Compose demo that brings up CARLA and Autoware.

The stack is split into four services:

  • carla-simulatorcarlasim/carla:0.9.16 running CarlaUE4.sh -prefernvidia -quality-level=Low -nosound. Healthy once port 2000 accepts a TCP connection.
  • carla-interfaceautoware:universe-cuda-jazzy running autoware_carla_interface.launch.xml standalone. Healthy once an actor with role_name == ego_vehicle exists in the current CARLA episode.
  • spectator-followautoware:universe-cuda-jazzy running ros2 run autoware_carla_interface spectator_follow, so the CARLA spectator camera chases the ego instead of staying where the simulator window started.
  • autowareautoware:universe-cuda-jazzy running e2e_simulator.launch.xml with simulator_type:=carla and launch_simulator_interface:=false, since the interface has its own container.

Notable points:

  • Services are wired with depends_on: condition: service_healthy, so a cold docker compose up starts CARLA, waits for the server, starts the bridge, waits for the ego to spawn, and only then launches Autoware — no races against the CARLA client connect timeout.
  • The Autoware image does not ship the CARLA Python API. The two services that talk to the CARLA server (carla-interface, spectator-follow) fetch the matching manylinux wheel for the container's Python version into the user site-packages on first run. That bootstrap lives in the x-carla-python-api YAML anchor at the top of the compose file, which is also where the CARLA version (0.9.16) is pinned.
  • Running the bridge in its own container means it can be restarted on its own (e.g. when CARLA changes maps) without tearing down the Autoware stack.
  • Maps and ML models come from the host via a bind mount of ~/autoware_data (create_host_path: false, so a missing directory fails loudly instead of being silently created empty). HOST_UID/HOST_GID default to 1000.
  • traffic light recognition does not work since CARLA map does not encode traffic light information
  • Requires manual download of CARLA Town01 map. I will create a separate PR to make this step simpler so that users can download the map just like planning-simulator maps.

How was this PR tested?

  • docker compose up on a host with an NVIDIA GPU and the NVIDIA Container Toolkit, with Town01 extracted to ~/autoware_data/maps/Town01: the CARLA window comes up, the bridge connects and spawns the ego, RViz shows sensor data, and Init by GNSS → set goal → engage drives the vehicle.

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
@github-actions

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

pre-commit-ci Bot and others added 4 commits August 10, 2026 09:06
Signed-off-by: Ryohsuke Mitsudome <ryoshuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryoshuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryoshuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryoshuke.mitsudome@tier4.jp>
@mitsudome-r mitsudome-r changed the title feat: add docker-compose demo for Carla feat: add docker-compose demo for CARLA Aug 10, 2026
@mitsudome-r mitsudome-r added the run:health-check Run health-check label Aug 10, 2026

@youtalk youtalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that the autoware repository was split off to keep the container simple, specifically into the openadkit repository. Would a pull request directly to the openadkit repository not work for this?

@xmfcx

xmfcx commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This makes use of our existing images and extends the functionality instead of creating a different way of constructing the images like openadkit. I think this compose file + demo is in the right place with this PR 👍

I will review soon.

@xmfcx
xmfcx requested a review from Aysenayilmaz August 20, 2026 12:44
@xmfcx xmfcx mentioned this pull request Aug 21, 2026
26 tasks

@xmfcx xmfcx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I ran this demo end to end on an RTX 3090 host. Used universe-cuda-jazzy-1.9.0 plus model data from the artifacts playbook at tag 1.9.0. The vehicle drove Town01 autonomously and arrived at the goal. On the tag-matched run every node loaded, lidar_centerpoint included. Nice work.

I have some suggestions:

Comment thread docker/examples/demos/carla/docker-compose.yaml Outdated
Comment thread docker/examples/demos/carla/README.md Outdated
Comment thread docker/examples/demos/carla/README.md Outdated
mitsudome-r and others added 3 commits August 31, 2026 17:03
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org>
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org>
Co-authored-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx
xmfcx merged commit 0740cbc into autowarefoundation:main Aug 31, 2026
22 checks passed
@xmfcx xmfcx mentioned this pull request Sep 1, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants