- About This Guide
- Introduction
- Build the Apollo Kernel
- Access the Apollo Dev Container
- Build the Apollo ROS
- Build Apollo
- Release
The Apollo 1.0 Quick Start for Developers provides the basic instructions to all Developers who want to build the Apollo Kernel, the Robot Operating System (ROS), and Apollo.
The following table lists the conventions that are used in this document:
It is assumed that you have read and performed the instructions in the companion guide, the Apollo 1.0 Quick Start Guide, to set up the basic environment. Use this guide to build your own version of the Apollo Kernel, the ROS, and Apollo. There are also instructions on how to release your own Apollo container to others who might want to build on what you have developed. It is strongly recommended that you build all of the components (Apollo Kernel, ROS, and Apollo) in the Apollo pre-specified dev Docker container.
The Apollo runtime in the vehicle requires the Apollo Kernel. You are strongly recommended to install the pre-built kernel.
You get access and install the pre-built kernel with the following commands.
- Download the release packages from the release section on github
https://github.com/ApolloAuto/apollo-kernel/releases
- Install the kernel After having the release package downloaded:
tar zxvf linux-4.4.32-apollo-1.0.0.tar.gz
cd install
sudo ./install_kernel.sh
- Reboot your system by the
reboot
command - Build the ESD CAN driver source code Now you need to build the ESD CAN driver source code according to ESDCAN-README.md
If have modified the kernel, or the pre-built kernel is not the best for your platform, you can build your own kernel with the following steps.
- Clone the code from repository
git clone https://github.com/ApolloAuto/apollo-kernel.git
cd apollo-kernel
-
Build the ESD CAN driver source code according to ESDCAN-README.md
-
Build the kernel with the following command.
bash build.sh
- Install the kernel the same way as using a pre-built Apollo Kernel.
- Please follow the Quick Start Guide to clone the Apollo source code.
In the following sections, it is assumed that the Apollo directory is located in $APOLLO_HOME
.
- Apollo provides a build environment Docker image:
dev-latest
. Run the following command to start a container with the build image:
cd $APOLLO_HOME
bash docker/scripts/dev_start.sh
- Run the following command to log into the container:
bash docker/scripts/dev_into.sh
In the container, the default directory lives in /apollo
, which contains the mounted source code repo.
Check out Apollo ROS from github source:
git clone https://github.com/ApolloAuto/apollo-platform.git apollo-platform
cd apollo-platform/ros
bash build.sh build
Before your proceed to build, please obtain ESD CAN library according to instructions in ESD CAN README.
Run the following command:
cd $APOLLO_HOME
bash apollo.sh build
Apollo uses Docker images to release packages. For advanced developers: you can generate a new Docker image to test in an actual vehicle. Apollo has set up a base Docker image environment to test the Apollo build.
The image is called: run-env-latest
.
- Run the following command:
bash apollo.sh release
The release command generates a release directory, which contains:
- ROS environment
- Running scripts
- Binaries
- Dependent shared libraries (
.so
files)
- Open a new terminal and run the following command in an Apollo source directory outside of Docker:
cd $APOLLO_HOME
bash apollo_docker.sh gen
The command creates a new Docker image using the release directory.
The release image tag will be named:release-yyyymmdd_hhmm
. The existing release image tag, release-latest
, is always pointing to the most current release.
- Push your release image online using your own Docker registry set up from outside of the container:
cd $APOLLO_HOME
bash apollo_docker.sh push
The command pushes the newly built Docker image to the release Docker registry. To set up a new Docker registry, see this page.