Skip to content

Source installation#

Prerequisites#

  • ROS

    • ROS 2 Humble

    For ROS 2 system dependencies, refer to REP-2000.

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#

  1. Clone autowarefoundation/autoware and move to the directory.

    git clone https://github.com/autowarefoundation/autoware.git
    cd autoware
    
  2. You can install the dependencies either manually or using the provided Ansible script.

Note: Before installing NVIDIA libraries, confirm and agree with the licenses.

Installing dependencies manually#

Installing dependencies using Ansible#

Be very careful with this method. Make sure you read and confirmed all the steps in the Ansible configuration before using it.

If you've manually installed the dependencies, you can skip this section.

./setup-dev-env.sh

How to set up a workspace#

  1. Create the src directory and clone repositories into it.

    Autoware uses vcstool to construct workspaces.

    cd autoware
    mkdir src
    vcs import src < autoware.repos
    
  2. Install dependent ROS packages.

    Autoware requires some ROS 2 packages in addition to the core components. The tool rosdep allows an automatic search and installation of such dependencies. You might need to run rosdep update before rosdep install.

    source /opt/ros/humble/setup.bash
    rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
    
  3. 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
    

    If there is any build issue, refer to Troubleshooting.

How to update a workspace#

  1. Update the .repos file.

    cd autoware
    git pull
    
  2. Update the repositories.

    vcs import src < autoware.repos
    vcs pull src
    

    For Git users:

    • vcs import is similar to git checkout.
      • Note that it doesn't pull from the remote.
    • vcs pull is similar to git pull.
      • Note that it doesn't switch branches.

    For more information, refer to the official documentation.

  3. Install dependent ROS packages.

    source /opt/ros/humble/setup.bash
    rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
    
  4. Build the workspace.

    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release