Autoware.Auto
|
|
You need to be inside an ADE container, or have installed the dependencies manually. See Installation.
If you haven't done so already, get the source code with
Optionally, you can choose a DDS implementation other than the default Cyclone DDS: Choosing a DDS Vendor
To build all packages in Autoware.Auto, navigate into the AutowareAuto
directory and run
It's important that you always run colcon build
from the repository root. If everything went well, you should not see "failed" on your screen, although "packages had stderr output" is okay.
By default, this produces a maximally optimized build in order to run the stack as efficiently as possible. For debugging symbols and/or reduced compile times, you can add --cmake-args -DCMAKE_BUILD_TYPE="Debug"
to the command line.
To verify that everything works as expected, see if all tests pass:
The first command will run the tests attached to the packages in your workspace. The second command gives you detailed output from the tests on which ones passed and which failed.
ROS 2 uses the colcon
build system. For more information and details about options and flags, take a look at
and see the colcon documentation. In the following, a few of the most useful options are listed. Note that colcon
options are spelled with an underscore instead of a dash – this is a common cause of typos.
To just build a single package:
Note that this does not automatically also build or rebuild its dependencies recursively. To do that:
These options are also accepted by colcon test
.
To add a compiler flag to all packages, e.g. for enabling the undefined behavior sanitizer:
colcon
isn't very good at being stateless, so when you build, make changes, and build again, you can sometimes end up with a different result than when you build from scratch. To make sure you're getting a fresh build of a package, just do
to remove all build artifacts associated with that package. Alternatively, if you don't want to delete the old binaries, you can specify custom build and install directories:
To see the compiler and linker invocations for a package, use
Most issues with building Autoware.Auto are caused by out-of-date software or old build files. To update ade
and the Docker containers it manages as well as clear old builds, run the following in your adehome/AutowareAuto
folder:
If you are using Autoware.Auto outside of ade
, try updating your system and running the following in your AutowareAuto
folder and re-building (where $ROS_DISTRO
is the current distro, e.g. foxy
):
If you are still having trouble after these commands have been run, please see the Support Guidelines for where to ask questions.