Autoware.Auto
Installation and development setup

# Goals

ADE is a modular Docker-based tool to ensure that all developers in a project have a common, consistent development environment. Please confirm the requirements for installing the tool.

# Setup ADE home and project checkout

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.

$mkdir adehome$ cd adehome
$touch .adehome 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.$ cd adehome
$git clone --recurse-submodules git@gitlab.com:autowarefoundation/autoware.auto/AutowareAuto.git$ cd AutowareAuto
$ade start$ ade enter

# How to build

$ade enter ade$ cd AutowareAuto
ade$colcon build ade$ colcon test
ade$colcon test-result # How to use Atom for development The Autoware.Auto ADE image ships with the Atom text editor, and automatically installs some useful Atom packages. Be sure to checkout the Atom Welcome Guide and familiarize with the features and keyboard shortcuts. ## Prepare the workspace To be able to use all Atom features, like gdb debugging, clang autocompletion, and ctags for code navigation, prepare the workspace: # cleanup workspace ade$ cd ~/AutowareAuto
ade$rm -rf .clang_complete build install log # enable compiler wrapper script, needed for clang autocomplete ade$ export CC=$PWD/tools/clang_complete/cc ade$ export CXX=$PWD/tools/clang_complete/g++ # generate tags file for code navigation # be sure to repeat this when it gets out of date ade$ ctags -R .
# build workspace with debugging enabled, building from

## Debug a binary with GDB

To debug a binary during runtime, use the integrated gdb interface to introspect and step through the code.

A simple debug process might look like:

1. Open a source file for the binary
2. Add a breakpoint by clicking the blank space next to the line number
3. Click Launch debugger... in the sidebar on the right side of Atom
4. Go to the Native - GDB tab
5. Enter the binary path as the program path
6. Enter ~ as the current working directory
7. The remaining two entries can be left blank
8. Click Launch to start the binary and pause at the breakpoint
Note
Applications that execute and exit quickly are not seen by the debugger unless a breakpoint is set.

# Cleanup

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 filesytem of stale images.

## Start relevant Docker resources

First, verify that ADE is running:

$cd adehome/AutowareAuto$ ade start

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.

Note
Docker resources that are not started/running will be removed!

## Docker disk usage

To assess the disk usage situation, run the following command: