Autoware.Auto
|
|
This article demonstrates how to use the Agile Development Environment (ADE) to develop Autoware.Auto applications.
ADE is a modular Docker-based tool to ensure that all developers in a project have a common, consistent development environment.
Follow the install instructions, which are reproduced here for convenience:
ade-cli
projectade
and install it in PATH
. On Ubuntu, /usr/local/bin
is recommended for system-wide installation, otherwise choose e.g. ~/.local/bin
for a local installation that doesn't require sudo
rights.chmod +x ade
ADE needs a directory on the host machine which is mounted as the user's home directory within the container. The directory is populated with dotfiles, and must be different than the user's home directory outside of the container. In the event ADE is used for multiple, projects it is recommended to use dedicated adehome
directories for each project.
ADE looks for a directory containing a file named .adehome
starting with the current working directory and continuing with the parent directories to identify the ADE home directory to be mounted.
For ADE to function, it must be properly configured. Autoware.Auto provides an .aderc file which is expected to exist in the current working directory, or in any parent directory. Additionally, default configuration values can be overridden by setting environment variables. See the ade --help
output for more information about using environment variables to define the configuration.
It might come in handy to share files such as dotfiles or utility programs from your host machine with ADE. If you only have a single adehome
directory, there is a way to do that without duplicating them: move them inside the adehome
directory, then create a symlink in the host system to their regular location. For instance,
It will then appear as ~/.bashrc
to the host system and to ADE.
Another option is to put utility programs into ~/adehome/.local/bin
and symlink. The opposite direction will not work, files in a Docker container can not be symlinks to the outside.
/usr/lib
.To start the default environment:
There are several preconfigured environments to choose from by specifying an ADE rc file. To see what is available, run
Choose one, then launch with:
Congratulations! Now you should have a terminal inside ADE:
The next steps are to proceed to Usage, or to work on the Autoware.Auto code itself as described in Contributor's guide.
Upon entering, ADE outputs the images used to create the environment; e.g.
The images are mounted under /opt
:
The code in /opt/AutowareAuto
is built from a particular version of the master branch of Autoware.Auto. The master branch is built multiple times a day in CI; see the container registry. With ade ... --update
, the latest available version of each image is downloaded.
ADE uses Docker, and over time unused images, containers, and volumes begin to clutter the hard drive. Follow the steps below to clean the Docker file system of stale images.
First, verify that ADE is running:
If ADE is used for more than one project, verify all ADE instances are running; the same rule applies for any other non-ADE Docker containers that should be preserved.
To assess the disk usage situation, run the following command:
Use docker system prune
to remove any Docker items not used for currently running containers:
Here are solutions for a few specific errors:
When starting ade
with GPU support enabled for NVIDIA graphics, you may sometimes receive the following error:
This usually indicates that a new NVIDIA graphics driver has been installed (usually via apt
) but the system has not yet been restarted. A similar message may appear if the graphics driver is not available, for example because of resuming after suspend.
Restart your system after installing the new NVIDIA driver.
If you have an NVIDIA GPU and are using the proprietary NVIDIA GPU driver, you may encounter this error when using the default .aderc
or .aderc-arm64
files. This is due to a decision that was made regarding support for users with and without NVIDIA GPUs and those with and without the proprietary NVIDIA driver. For more information you can review the discussion that lead to this decision in this issue.
To resolve this issue, simply remove the line export ADE_DISABLE_NVIDIA_DOCKER=true
from the .aderc
file that you are using and restart ade
with: