Skip to content

feat: add scenario simulation demo#7072

Open
mitsudome-r wants to merge 1 commit intoautowarefoundation:mainfrom
mitsudome-r:feat/add-scenario-simulation-demo
Open

feat: add scenario simulation demo#7072
mitsudome-r wants to merge 1 commit intoautowarefoundation:mainfrom
mitsudome-r:feat/add-scenario-simulation-demo

Conversation

@mitsudome-r
Copy link
Copy Markdown
Member

@mitsudome-r mitsudome-r commented Apr 28, 2026

Description

Related Issue

#7031

Summary

  • Adds a new Docker Compose demo under docker/examples/demos/scenario-simulator/ that pairs the scenario_test_runner from scenario_simulator_v2 with the Autoware planning stack (planning_simulator.launch.xml with scenario_simulation:=true).
  • Both services run with network_mode: host and share a generated cyclonedds.xml via a named volume so ROS 2 discovery works between containers.
  • The scenario-simulator service waits for the autoware service to become healthy (probed by checking for the /api/operation_mode/state topic) before launching the scenario.

Files changed

  • docker/examples/demos/scenario-simulator/docker-compose.yaml — two-service compose stack (autoware + scenario-simulator) with healthcheck-gated startup.
  • docker/examples/demos/scenario-simulator/README.md — prerequisites, run instructions (split-terminal and compose up), and a launch-command reference.

Notes / follow-ups

  • The scenario-simulator image is pinned to ghcr.io/tier4/scenario_simulator_v2:humble-25.0.17-runtime; there's a TODO in the compose file to switch to a jazzy image once it's published.

How was this PR tested?

  • docker compose up from the demo directory brings both services up and the scenario runs to completion against rviz.
  • Split-terminal flow (docker compose run --rm autoware + docker compose run --rm scenario-simulator) works as documented.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Thank you for contributing to the Autoware project!

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

Please ensure:

@mitsudome-r mitsudome-r force-pushed the feat/add-scenario-simulation-demo branch from 99031d4 to b734410 Compare April 28, 2026 06:40
@mitsudome-r mitsudome-r added the run:health-check Run health-check label Apr 28, 2026
@mitsudome-r mitsudome-r force-pushed the feat/add-scenario-simulation-demo branch from 685fa71 to 3ba57e2 Compare April 28, 2026 13:31
@mitsudome-r mitsudome-r changed the title Feat/add scenario simulation demo feat: add scenario simulation demo Apr 28, 2026
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
@mitsudome-r mitsudome-r force-pushed the feat/add-scenario-simulation-demo branch from 3ba57e2 to 6f9388c Compare April 28, 2026 13:37
@mitsudome-r
Copy link
Copy Markdown
Member Author

I've done run the instructions in the readme and confirmed that it works.
I noticed that MRM state flickers once in a while just like we saw with AWSIM demo, but I think we can solve that in the future.

image

@mitsudome-r mitsudome-r marked this pull request as ready for review April 28, 2026 14:30
Comment on lines +59 to +88
Edit the `command:` block in `docker-compose.yaml` to change launch arguments — for example, point `scenario:=` at a different YAML under `~/sample_scenario/`, or flip `launch_rviz:=true` on the scenario-simulator side to watch the run.

## Launch command reference

`autoware`:

```bash
ros2 launch autoware_launch planning_simulator.launch.xml \
map_path:=/sample_scenario/sample-map-planning \
vehicle_model:=sample_vehicle \
sensor_model:=sample_sensor_kit \
scenario_simulation:=true
```

`scenario-simulator`:

```bash
ros2 launch scenario_test_runner scenario_test_runner.launch.py \
architecture_type:=awf/universe/20250130 \
record:=false \
scenario:=/home/aw/sample_scenario/sample-scenario.yaml \
use_custom_centerline:=true \
launch_rviz:=false \
launch_autoware:=false
```

Paths above are container paths. They map back to the host via the `volumes:` block:

- `~/sample_scenario` → `/sample_scenario` (autoware) and `/home/aw/sample_scenario` (scenario-simulator)
- The shared `cyclonedds-config` volume is populated by the `autoware` service on startup and mounted read-only into the scenario-simulator at `/home/aw/cyclonedds.xml`, which is what `CYCLONEDDS_URI` points at.
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.

~/sample_scenario needs to be replaced with ~/autoware_scenario/ to be consistent within the file.

Clone the sample scenarios repository to `~/autoware_scenario/`:

```bash
git clone https://github.com/autowarefoundation/autoware_sample_scenarios.git ~/autoware_scenario
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.

I don't like downloading the repository under that name.

I'd prefer at least downloading under ~/autoware_scenario/autoware_sample_scenarios style.

@xmfcx
Copy link
Copy Markdown
Contributor

xmfcx commented Apr 28, 2026

I ran it, it worked well, it passed the scenario. I also dropped some comments about the scenario locations.

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.

2 participants