Setup unity project
Info
It is advised to checkout the Quick Start Demo tutorial before reading this section.
1. Environment preparation
Ubuntu OS is required.
- Make sure your machine meets the required hardware specifications.
- NOTE: PC requirements may vary depending on simulation contents which may change as the simulator develops
- Prepare a desktop PC with Ubuntu 22.04 installed.
-
Install nvidia gpu driver (Skip if already installed).
- Add nvidia driver to apt repository.
-
Install the recommended version of the driver.
Info
Version 570 or higher is recommended.
-
Reboot your machine to make the installed driver detected by the system.
-
Open terminal and check if nvidia-smi command is available and outputs summary similar to the one presented below.
Check result.Fri May 2 18:55:24 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.124.06 Driver Version: 570.124.06 CUDA Version: 12.8 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 4090 Off | 00000000:01:00.0 On | Off | | 0% 45C P8 25W / 450W | 5920MiB / 24564MiB | 7% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+
-
Install vulkan graphics library (Skip if already installed).
- Update the environment.
- Install the library.
-
Install git (Skip if already installed).
- Set the ROS 2 middleware and the localhost only mode in
~/.profile
(or, in~/.bash_profile
or~/bash_login
if either of those exists) file: - Set the system optimizations by adding this code to the very bottom of your
~/.bashrc
file: - Restart PC.
AWSIM comes with a standalone flavor of Ros2ForUnity
. This means that, to avoid internal conflicts between different ROS 2 versions, you shouldn't run the Editor or AWSIM binary with ROS 2 sourced.
Warning
Do not run the AWSIM, Unity Hub, or the Editor with ROS 2 sourced.
- Make sure that the terminal which you are using to run Unity Hub, Editor, or AWSIM doesn't have ROS 2sourced.
- It is common to have ROS 2 sourced automatically with
~/.bashrc
or~/.profile
. Make sure it is not obscuring your working environment:- Running Unity Hub from the Ubuntu GUI menu takes the environment configuration from
~/.profile
. - Running Unity Hub from the terminal uses the current terminal configuration from
~/.profile
and~/bashrc
. - Running Unity Editor from the UnityHub inherits the environment setup from the Unity Hub.
- Running Unity Hub from the Ubuntu GUI menu takes the environment configuration from
2. Unity installation
Info
AWSIM's Unity version is currently 6000.0.34f1
- Install UnityHub.
- Download Unity 6000.0.34f1 from the download archive.
3. Open AWSIM project
-
Git clone AWSIM repository.
-
Open AWSIM project.
- Open Unity Hub.
- Add -> Add project from disk.
- Add and Open AWSIM unity project.
Info
If you are launching the Unity Hub from the Ubuntu applications menu (without the terminal), make sure that system optimizations are set. To be sure, run the terminal at least once before running the Unity Hub. This will apply the OS settings.
Warning
If you get the safe mode dialog when starting UnityEditor, you may need to install openssl.
- download libssl
$ wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
- install
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
4. Import external packages
-
Download
Shinjuku.unitypackage
-
In Unity Editor, from the menu bar at the top, select
Assets -> Import Package -> Custom Package...
and navigate theShinjuku.unitypackage
file. -
Shinjuku.unitypackage
package has been successfully imported underAssets\AWSIM\Externals
directory.Info
The
Externals
directory is added to the.gitignore
because the map has a large file size and should not be directly uploaded to the repository.
5. Run the demo in Editor
The following steps describe how to run the demo in Unity Editor:
- Open the
AutowareSimulationDemo.unity
scene placed underAssets/AWSIM/Scenes/
directory. - Run the simulation by clicking
Play
button placed at the top section of Edtior.