Build Instructions#
These setup instructions guide you through the process of building Scenario Simulator v2, which currently supports ROS 2 Humble Hawksbill.
Setup ROS 2 environment#
- Configure the locale. Ensure that your system is configured with a locale that supports UTF-8.
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
Verify that the locale is properly set:
locale
The expected result after running the
locale
command should look like this, with LANG
set to en_US.UTF-8
by default.
-
Enable the Ubuntu Universe repository.
sudo apt install software-properties-common sudo add-apt-repository universe
-
Add the ROS 2 GPG key.
sudo apt update && sudo apt install curl -y sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
-
Add the ROS 2 repository to the system's package sources list.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
-
Install ROS 2 Humble Desktop.
sudo apt update sudo apt install ros-humble-desktop
Info
For more detailed information, refer to the ROS 2 Humble Installation Guide.
Setup workspace#
-
Create the workspace directory.
mkdir -p ~/scenario_simulator_ws/src cd ~/scenario_simulator_ws/src
-
Clone the Scenario Simulator repository.
git clone https://github.com/tier4/scenario_simulator_v2.git cd scenario_simulator_v2
-
Import Autoware dependencies.
vcs import external < dependency_humble.repos
Install dependencies via rosdep#
-
Move to the workspace directory.
cd ~/scenario_simulator_ws
-
Source the ROS 2 environment.
source /opt/ros/humble/setup.bash
-
Install all required dependencies.
rosdep install -iry --from-paths src/scenario_simulator_v2 --rosdistro humble
Build scenario_simulator_v2#
To build Scenario Simulator v2, run this command:
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
colcon build
command, all packages should be built successfully.