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
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg

2. Add Apollo software source GPG key and configure source

1
2
3
4
5
6
7
8
9
10
11
# Add GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://apollo-pkg-beta.cdn.bcebos.com/neo/beta/key/deb.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/apolloauto.gpg
sudo chmod a+r /etc/apt/keyrings/apolloauto.gpg

# Configure source and update
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/apolloauto.gpg] https://apollo-pkg-beta.cdn.bcebos.com/apollo/core"\
$(. /etc/os-release && echo "$VERSION_CODENAME") "main" | \
sudo tee /etc/apt/sources.list.d/apolloauto.list
sudo apt-get update

3. Install aem

1
sudo apt install apollo-neo-env-manager-dev --reinstall

After installation, you can use:

1
aem -h

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
git clone https://github.com/ApolloAuto/application-core.git

3. Start and enter the Apollo environment

1
2
3
4
5
6
7
8
9
10
11
12
# Enter project directory
cd application-core

# Switch environment configuration, will automatically recognize your host environment to switch .env and .workspace.json configuration
# If you use apollo source code, you don't need to perform this step, aem will automatically recognize the starting environment.
bash setup.sh

# Start container
aem start

# If you prefer using host machine instead of docker:
aem start -b host

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
2
3
4
buildtool build -p core

# Or build all code and packages:
buildtool build

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
PermissionError: [Errno 13] Permission denied: 'tools/proto/proto.bzl'

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
2
# Example: apply sample profile
aem profile use sample

6. Play record data

Get the record

1
wget https://apollo-system.cdn.bcebos.com/dataset/6.0_edu/demo_3.5.record -P $HOME/.apollo/resources/records/

Get map for the record

1
buildtool map get sunnyvale

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
aem bootstrap start --plus
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.

Dreamview+ Welcome Page

  1. Select Default Mode.
  2. Check Accept the User Agreement and Privacy Policy, then click Enter this Mode.
  3. On Mode Settings page:
    • Under Operations, select Record
    • Under Environment Resources > Records, select the desired record
    • Under Environment Resources > HDMap, select Sunnyvale Big Loop
  4. Click the Play button at the bottom
    Play Record
    You’ll see the record playback in the Vehicle Visualization panel.
Play record via command line
  1. Enter docker environment.
  2. After downloading the record in Dreamview+ > Resource Manager > Records, run:
1
cyber_recorder play -f ~/.apollo/resources/records/demo_3.5.record

Tip: Add -l to loop playback. Without -l, it plays once.

Troubleshooting

  1. If you see a blank page at localhost:8888, try clearing your browser cache.

References

  1. Baidu. 安装指南. 2024. Archived on 2025-07-07. Retrieved 2025-07-07.

Apollo Development Environment Setup
https://blog.zhanganzhi.com/en/2025/07/34070c5261f0/
Author
Andy Zhang
Posted on
July 7, 2025
Licensed under