Docker installation for development#
Prerequisites#
- For NVIDIA Jetson devices, install JetPack >= 5.0
How to set up a development environment#
-
Clone
autowarefoundation/autowareand move to the directory.bash git clone https://github.com/autowarefoundation/autoware.git cd autoware -
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.
bash
./setup-dev-env.sh docker
You might need to log out and log back to make the current user able to use docker.
How to set up a workspace#
Warning
Before proceeding, confirm and agree with the NVIDIA Deep Learning Container license. By pulling and using the Autoware Universe images, you accept the terms and conditions of the license.
-
Create the
autoware_mapdirectory for map data later.bash mkdir ~/autoware_map -
Pull the Docker image
bash docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda -
Launch a Docker container.
-
For amd64 architecture computers with NVIDIA GPU:
bash rocker --nvidia --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
-
If you want to run container without using NVIDIA GPU, or for arm64 architecture computers:
bash rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cudaFor detailed reason could be found here
For more advanced usage, see here.
After that, move to the workspace in the container:
bash cd autoware -
-
Create the
srcdirectory and clone repositories into it.bash mkdir src vcs import src < autoware.repos -
Update dependent ROS packages.
The dependency of Autoware may change after the Docker image was created. In that case, you need to run the following commands to update the dependency.
bash sudo apt update rosdep update rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO -
Build the workspace.
bash 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 Docker image.
bash docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda -
Launch a Docker container.
-
For amd64 architecture computers:
bash rocker --nvidia --x11 --user --volume $HOME/autoware -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
-
If you want to run container without using NVIDIA GPU, or for arm64 architecture computers:
bash rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
-
-
Update the
.reposfile.bash cd autoware git pull -
Update the repositories.
bash vcs import src < autoware.repos vcs pull src -
Build the workspace.
bash colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release