Source installation#
Prerequisites#
- OS
-
ROS
- ROS 2 Humble
For ROS 2 system dependencies, refer to REP-2000.
- Git
-
Registering SSH keys to GitHub is preferable.
-
Before proceeding, make sure your system is up to date and
Git
is installed:
sudo apt-get -y update
sudo apt-get -y install git
How to set up a development environment#
- Clone
autowarefoundation/autoware
and move to the folder:
git clone https://github.com/autowarefoundation/autoware.git
cd autoware
- If you are installing Autoware for the first time, you can automatically install the dependencies by using the provided Ansible script:
./setup-dev-env.sh
How to set up a workspace#
- Create a workspace directory and a
src
folder inside it:
cd autoware
mkdir src
# Note: Make sure to run the following commands locally on your machine (not over remote SSH)
vcs import src < autoware.repos
vcs import src < extra-packages.repos
- Install dependent ROS packages
Before building the workspace, make sure all required ROS dependencies are installed:
source /opt/ros/humble/setup.bash
sudo apt-get update && sudo apt-get upgrade
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
- Install and setup ccache to speed up consecutive builds (optional but recommended)
3.1 Install Ccache:
sudo apt-get install ccache
Create the Ccache configuration folder and file:
mkdir -p ~/.cache/ccache
touch ~/.cache/ccache/ccache.conf
5 GB
, but you can increase it based on your system's available storage. In this example, we set it to 60 GB
:
echo "max_size = 60G" >> ~/.cache/ccache/ccache.conf
To ensure that Ccache is used during compilation, add the following lines to your .bashrc
. This setup redirects gcc
and g++
calls through Ccache:
export CC="/usr/lib/ccache/gcc"
export CXX="/usr/lib/ccache/g++"
export CCACHE_DIR="$HOME/.cache/ccache/"
3.4 Verify Ccache is working
ccache -s
How to build workspace#
- Create a new swapfile (optional but recommended)
Building Autoware is memory-intensive. If your system runs out of memory during the build, it may freeze or crash. To prevent this, it is recommended to configure 16–32 GB of swap space:
sudo swapoff /swapfile
sudo rm /swapfile
32 GB
of swap space improves build performance and helps prevent crashes due to memory exhaustion:
sudo fallocate -l 32G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- Build the workspace:
Autoware uses colcon to build workspaces. For more advanced options, refer to the documentation.
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
[debug]: "-DCMAKE_BUILD_TYPE=Debug"
[min-size-rel]: "-DCMAKE_BUILD_TYPE=MinSizeRel"
[rel-with-deb-info]: "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
[release]: "-DCMAKE_BUILD_TYPE=Release"
colcon build --symlink-install --parallel-workers 1 --cmake-args -DCMAKE_BUILD_TYPE=Release
Autoware Build GUI#
- Install dependencies:
sudo apt install libwebkit2gtk-4.1-0 libjavascriptcoregtk-4.1-0 libsoup-3.0-0 libsoup-3.0-common
Before running the Autoware Build GUI, ensure that both Rust
and Node.js
are installed on your system:
- Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh
rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)
- Install Node.js(version > 14):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 22
node --version
v22.17.0
- It is recommended to install pnpm:
npm install -g pnpm
- Install gtk-3.0:
sudo apt-get install libgtk-3-dev
sudo apt-get install javascriptcoregtk-4.1
sudo apt-get install libsoup-3.0
sudo apt-get install webkit2gtk-4.1
- Run the Build GUI from source:
Clone the repository:
git clone https://github.com/leo-drive/autoware-build-gui.git
cd autoware-build-gui
pnpm i
pnpm tauri dev
Network Configuration#
Enable localhost-only communication 1. Enable multicast on lo
Manually (temporary solution):
sudo ip link set lo multicast on
On startup with a service (permanent solution):
sudo nano /etc/systemd/system/multicast-lo.service
[Unit]
Description=Enable Multicast on Loopback
[Service]
Type=oneshot
ExecStart=/usr/sbin/ip link set lo multicast on
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable multicast-lo.service
sudo systemctl start multicast-lo.service
sudo systemctl status multicast-lo.service
○ multicast-lo.service - Enable Multicast on Loopback
Loaded: loaded (/etc/systemd/system/multicast-lo.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Thu 2025-07-31 06:41:35 EDT; 37min ago
Process: 793 ExecStart=/usr/sbin/ip link set lo multicast on (code=exited, status=0/SUCCESS)
Main PID: 793 (code=exited, status=0/SUCCESS)
CPU: 2ms
Jul 31 06:41:35 afer360-Default-string systemd[1]: Starting Enable Multicast on Loopback...
Jul 31 06:41:35 afer360-Default-string systemd[1]: multicast-lo.service: Deactivated successfully.
Jul 31 06:41:35 afer360-Default-string systemd[1]: Finished Enable Multicast on Loopback.
ip link show lo
1: lo: <LOOPBACK,MULTICAST,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
- Tune DDS settings
For CycloneDDS configuration:
Save the following file as ~/cyclonedds.xml
:
<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
<Domain Id="any">
<General>
<Interfaces>
<NetworkInterface autodetermine="false" name="lo" priority="default" multicast="default" />
</Interfaces>
<AllowMulticast>default</AllowMulticast>
<MaxMessageSize>65500B</MaxMessageSize>
</General>
<Internal>
<SocketReceiveBufferSize min="10MB"/>
<Watermarks>
<WhcHigh>500kB</WhcHigh>
</Watermarks>
</Internal>
<Discovery>
<ParticipantIndex>auto</ParticipantIndex>
<MaxAutoParticipantIndex>100</MaxAutoParticipantIndex>
</Discovery>
</Domain>
</CycloneDDS>
~/.bashrc
file:
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file://absolute/path/to/cyclonedds.xml
# Replace `/absolute/path/to/cyclonedds.xml` with the actual path to the file.
# Example: export CYCLONEDDS_URI=file:///home/user/cyclonedds.xml