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.
sudo apt-get -y update
sudo apt-get -y install git
Note: If you wish to use ROS 2 Galactic on Ubuntu 20.04, refer to installation instruction from galactic branch, but be aware that Galactic version of Autoware might not have latest features.
How to set up a development environment#
-
Clone
autowarefoundation/autowareand move to the directory.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.shIf you encounter any build issues, please consult the Troubleshooting section for assistance.
Info
Before installing NVIDIA libraries, please ensure that you have reviewed and agreed to the licenses.
Note
The following items will be automatically installed. If the ansible script doesn't work or if you already have different versions of dependent libraries installed, please install the following items manually.
- Install ROS 2
- Install ROS 2 Dev Tools
- Install the RMW Implementation
- Install pacmod
- Install Autoware Core dependencies
- Install Autoware Universe dependencies
- Install pre-commit dependencies
- Install Nvidia CUDA
- Install Nvidia cuDNN and TensorRT
If you didn't use ansible script you will need to download some package artifacts as explained in Manual loading of artifacts. Otherwise some packages (mostly from perception) will not be able to run as they need these artifacts for the inference.
How to set up a workspace#
-
Create the
srcdirectory and clone repositories into it.Autoware uses vcstool to construct workspaces.
cd autoware mkdir src vcs import src < autoware.repos -
Install dependent ROS packages.
Autoware requires some ROS 2 packages in addition to the core components. The tool
rosdepallows an automatic search and installation of such dependencies. You might need to runrosdep updatebeforerosdep install.source /opt/ros/humble/setup.bash rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO -
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=ReleaseIf there is any build issue, refer to Troubleshooting.
How to update a workspace#
-
Update the
.reposfile.cd autoware git pull <remote> <your branch><remote>is usuallygit@github.com:autowarefoundation/autoware.git -
Update the repositories.
vcs import src < autoware.repos vcs pull srcFor Git users:
vcs importis similar togit checkout.- Note that it doesn't pull from the remote.
vcs pullis similar togit pull.- Note that it doesn't switch branches.
For more information, refer to the official documentation.
-
Install dependent ROS packages.
source /opt/ros/humble/setup.bash rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO -
Build the workspace.
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release