Apollo Development Environment Setup
This article describes how to set up the Baidu Apollo development environment.
Introduction
Apollo is a high performance, flexible architecture which accelerates the development, testing, and deployment of Autonomous Vehicles.
This article was written on July 7, 2025, based on Apollo version 10.0.
Environment
My system environment:
- Intel(R) Core(TM) i9-14900K
- NVIDIA GeForce RTX 2080 Ti
- Ubuntu 22.04.5 LTS
Please install Docker Engine and GPU support yourself. You may refer to the Docker official documentation and Apollo Installation Guide[1].
Install Apollo Environment Manager
Apollo Environment Manager is a command-line tool that helps manage and launch Apollo environments.
1. Install required dependencies
1 |
|
2. Add Apollo software source GPG key and configure source
1 |
|
3. Install aem
1 |
|
After installation, you can use:
1 |
|
Install Example Project
1. Select an example project
Apollo currently provides 3 example projects. You can choose one as needed:
application-core: contains all open-source Apollo packages, suitable for building your own application.
application-pnc: contains only planning and control packages, suitable for users focusing on that area.
application-perception: contains only perception-related packages.
Alternatively, you can use the full Apollo source project: apollo
Note: Starting from Apollo 10.0, both source and package modes use the same build tool. It is recommended to use the unified build commands below. Scripts such as dev_start.sh, dev_into.sh, apollo.sh are no longer recommended.
2. Clone the project
Taking application-core as an example:
1 |
|
3. Start and enter the Apollo environment
1 |
|
Note: In host mode, subsequent operations are the same as in container mode. You can later run aem enter in the project root to enter the environment, either as a docker container or an Apollo bash shell.
4. Install packages
The example project includes a core
directory with core/cyberfile.xml
that describes dependencies to install:
1 |
|
This command builds the core package. Since it contains no source code, this step only installs dependencies from core/cyberfile.xml.
Note: New buildtool versions use –opt –gpu by default (if GPU is available). Use –dbg for gdb debugging.
You might encounter permission errors:
1 |
|
Use sudo chmod 777 tools/proto/proto.bzl
to resolve. Repeat for other files as needed.
5. Select vehicle profile
The profiles/sample
directory provides an official config with 1 radar and 2 cameras. You can create your own vehicle profile based on this. To apply a profile:
1 |
|
6. Play record data
Get the record
1 |
|
Get map for the record
1 |
|
Starting with version 9.0.0-rc-r10, map data is no longer bundled and must be downloaded separately. Use buildtool map list to view all available maps.
Launch Dreamview+
1 |
|
Play record in Dreamview+
After launching Dreamview+, go to localhost:8888
in your browser. You can select Default Mode or other modes. We’ll use Default Mode here.
- Select Default Mode.
- Check Accept the User Agreement and Privacy Policy, then click Enter this Mode.
- On Mode Settings page:
- Under Operations, select Record
- Under Environment Resources > Records, select the desired record
- Under Environment Resources > HDMap, select Sunnyvale Big Loop
- Click the Play button at the bottom
You’ll see the record playback in the Vehicle Visualization panel.
Play record via command line
- Enter docker environment.
- After downloading the record in Dreamview+ > Resource Manager > Records, run:
1 |
|
Tip: Add
-l
to loop playback. Without-l
, it plays once.
Troubleshooting
- If you see a blank page at
localhost:8888
, try clearing your browser cache.