docs/02_Quick Start/apollo_1_0_quick_start_developer.md
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:
| Icon | Description |
|---|---|
| Bold | Emphasis |
Mono-space font | Code, typed data |
| Italic | Titles of documents, sections, and headingsTerms used |
| Info Contains information that might be useful. Ignoring the Info icon has no negative consequences. | |
| Tip. Includes helpful hints or a shortcut that might assist you in completing a task. | |
| Online. Provides a link to a particular web site where you can get more information. | |
| Warning. Contains information that must not be ignored or you risk failure when you perform a certain task or step. |
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.
https://github.com/ApolloAuto/apollo-kernel/releases
tar zxvf linux-4.4.32-apollo-1.0.0.tar.gz
cd install
sudo ./install_kernel.sh
reboot commandIf 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.
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
In the following sections, it is assumed that the Apollo directory is located in $APOLLO_HOME.
dev-latest. Run the following command to start a container with the build image:cd $APOLLO_HOME
bash docker/scripts/dev_start.sh
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.
bash apollo.sh release
The release command generates a release directory, which contains:
.so files)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.
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.