apollo_software_installation_guide.md 5.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
# Overview of Apollo

Apollo has been initiated to provide an open, comprehensive, and reliable software platform for its partners in the automotive and autonomous-driving industries. Partners can use the Apollo software platform and the reference hardware that Apollo has certified as a template to customize in the development of their own autonomous vehicles.

# Apollo Software Installation

This section includes:

- Download the Apollo Release Package
- Set up Docker Support
- Customize Your Release Container

Before getting started, please make sure you have installed the Ubuntu Linux 14.04.3 and the Apollo Kernel following the steps in the [Apollo 1.0 Hardware and System Installation Guide](https://github.com/ApolloAuto/apollo/blob/master/docs/quickstart/apollo_1_0_hardware_system_installation_guide.md#installing-the-software-for-the-ipc).

## Download Apollo Source

1. Download Apollo source code from the [github source](https://github.com/ApolloAuto/apollo/) and check out the correct branch:

    ```
    git clone git@github.com:ApolloAuto/apollo.git
    cd apollo
    git checkout [release_branch_name]
    ```

2. Set up environment variable `APOLLO_HOME` by the following command:

    ```
    echo "export APOLLO_HOME=$(pwd)" >> ~/.bashrc && source ~/.bashrc
    ```

3. Open a new terminal or run `source ~/.bashrc` in an existing terminal.


![tip](images/tip_icon.png) In the following sections, it is assumed that the Apollo directory is located in  `$APOLLO_HOME`.

## Set Up Docker Support

The Docker container is the simplest way to set up the build environment for Apollo.

For more information, see the detailed Docker tutorial [here](https://docs.docker.com/).

42 43
1. Please follow the
[official guide to install the docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu).
44

45 46
Don't forget the
[post-installation steps for Linux](https://docs.docker.com/install/linux/linux-postinstall).
47

48
2. After the installation, log out and then log back into the system to enable Docker.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

3. (Optional) If you already have Docker installed (before you installed the Apollo Kernel), add the following line in `/etc/default/docker`:

    ```
    DOCKER_OPTS = "-s overlay"
    ```

## Use Your Release Container

1. Download and start the Apollo Release docker image by running the following commands:

    ```
    cd $APOLLO_HOME
    bash docker/scripts/release_start.sh
    ```

2. (Optional) If you want to customize your release container, login into the Apollo Release docker image by running the following commands:

    ```
    bash docker/scripts/release_into.sh
    ```

F
fengkaiwen01 已提交
71
3. (Skip this if you only want to do the offline simulation in release docker container) Set up the zone number for the Global Navigation Satellite System (GNSS) Driver by modifying the following line in file `./modules/drivers/gnss/conf/gnss_conf.pb.txt`.
72 73

    ```
F
fengkaiwen01 已提交
74
    proj4_text: "+proj=utm +zone=10 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
75 76 77 78
    ```

    You only have to modify the value `+zone=10` in the above line. Please refer to the [Apollo's Coordinate System](https://github.com/ApolloAuto/apollo/blob/master/docs/specs/coordination.pdf) to find your local zone number. For example, if you are in Beijing, China, you have to set `+zone=50`.

F
fengkaiwen01 已提交
79
4. (Skip this if you only want to do the offline simulation in release docker container) Set up the Real Time Kinematic (RTK) Base Station for the GNSS Driver by modifying the file: `./modules/drivers/gnss/conf/gnss_conf.pb.txt`
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119

    Refer to the following example for a typical RTK setup:

    ```
    rtk_from {
	format: RTCM_V3
		ntrip {
		    address: <provide your own value>
		    port: <provide your own value>
		    mount_point: <provide your own value>
		    user: <provide your own username>
		    password: <provide your own password>
		    timeout_s: <provide your own value, e.g., 5>
	    }
    }
    rtk_to {
	    format: RTCM_V3
	    serial {
		    device: <provide your own value, e.g., "/dev/ttyUSB1">
		    baud_rate: <provide your own value, e.g., 115200>
	    }
    }
    ```

    The `rtk_from` is  used for RTK base station information. The `rtk_to` is used to send the RTK differential data to the receiver.

5. (Skip this if you only want to do the offline simulation in release docker container) Add ESD CAN Support

    Please refer to [ESD CAN README](https://github.com/ApolloAuto/apollo/blob/master/third_party/can_card_library/esd_can/README.md) to install the ESD CAN library.

6. (Skip this if you have NOT customized your release docker container) Follow these steps to persist your local changes:

    ```
    # EXIT DOCKER ENV
    # commit your docker local changes to local docker image.
    exit # exit from docker environment
    cd $APOLLO_HOME
    bash docker/scripts/release_commit.sh
    ```

120 121 122 123 124 125
7. Start your favorite browser (i.e. Chrome) and with URL: http://localhost:8888

## Run Apollo 2.5 in Ubuntu 16

Please refer to
[How to run Apollo 2.5 with Ubuntu 16](https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_run_apollo_2.5_with_ubuntu16.md)