Using OpenSCENARIO
Overview
flowchart LR
AWSIM <--ROS2--> Autoware
AWSIM <--ZeroMQ--> ScenarioSimulator
Autoware <--ROS2--> ScenarioSimulator
OpenSCENARIO demo simulation tutorial
1. Preparation
-
Operating System
- Ubuntu 22.04 is required.
- Due to the reliance on ROS 2 Humble, which is officially supported only on Ubuntu 22.04 (Jammy).
- Using other distributions (such as 20.04 or 24.04) may result in unexpected build or runtime issues due to lack of binary support and untested dependencies.
- Ubuntu 22.04 is required.
-
Hardware Requirements
- Memory
- At least 32 GB of RAM is recommended.
- If your system has less than 32 GB, consider the following options to avoid out-of-memory (OOM) errors during the build:
- Enable swap space (at least 16 GB recommended).
- Reduce the number of parallel jobs by adding
MAKEFLAGS="-j1"
or--parallel-workers 1
when building with colcon.
- GPU
- It is recommended to use an NVIDIA GPU with 8 GB of VRAM or more.
- This is important for running AWSIM smoothly and ensuring proper performance of Autoware's perception modules.
- Memory
-
Basic Package Setup
- Before proceeding, make sure the package index is up-to-date and that essential tools like git are installed:
-
Unity Installation
AWSIM runs on the Unity engine, so you need to install Unity Hub and the required Unity Editor version.-
Install Unity Hub
Follow the official guide to install Unity Hub on your platform:
https://docs.unity3d.com/hub/manual/InstallHub.html#install-hub-linux -
Install Unity Editor
Use Unity Hub to install the following version of Unity: - Unity 6000.0.34f1
-
-
To improve the performance and stability of DDS-based communication, it's recommended to apply the following optimizations.
- Set the system optimizations by adding this code to the very bottom of your ~/.bashrc file:
- After editing, apply the changes:
2. Install Autoware with Scenario simulator v2
-
Clone Autoware and move to the directory.
-
Configure the environment.
When you run this script, it will prompt several questions. The recommended answers are:-
Are you sure you want to run setup? [y/N]
→ y- This starts the environment setup process.
-
Install NVIDIA libraries? [y/N]
→ y- This installs GPU driver, CUDA, cuDNN, TensorRT.
- You may choose n if you prefer to install them manually or already have them installed.
-
Download artifacts? [y/N]
→ y- Downloads prebuilt artifacts.
-
-
Confirm the version in
simulator.repos
.
Before importing repositories, check if the version specified insimulator.repos
is the latest.
If it's outdated, update it to the latest stable release to avoid compatibility issues.
At the time of writing, the latest version is16.6.1
.
simulator.repos
: -
Create the
src
directory and clone external dependent repositories into it. -
Download shinjuku_map.zip
-
Unzip it to
src/simulator
directory. -
Install dependent ROS packages.
-
Build the workspace.
3. Running the demo.
-
Use Unity Hub to open the AWSIM2.0 project.
-
Open the
IntegrateScenarioSimulatorDemo
scene.-
In the Project window, open the following scene:
Assets/Scenes/ScenarioSimulatorDemo/IntegrateScenarioSimulatorDemo.unity
-
This scene contains the ScenarioSimulatorClient setup for connecting to ScenarioSimulatorV2.
-
-
Run AWSIM2.0.
- Click the Play button at the top of the Unity Editor to start the simulation.
-
Launch
scenario_test_runner
.source install/setup.bash ros2 launch scenario_test_runner scenario_test_runner.launch.py \ architecture_type:=awf/universe/20250130 record:=false \ scenario:='$(find-pkg-share scenario_test_runner)/scenario/sample_awsim.yaml' \ sensor_model:=awsim_sensor_kit vehicle_model:=sample_vehicle \ launch_simple_sensor_simulator:=false autoware_launch_file:="e2e_simulator.launch.xml" \ initialize_duration:=260 port:=8080