Top Related Projects
openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Autoware - the world's leading open-source software project for autonomous driving
Autoware - the world's leading open-source software project for autonomous driving
The Udacity open source self-driving car project
Quick Overview
Apollo is an open-source autonomous driving platform developed by Baidu. It provides a comprehensive, flexible, and reliable solution for autonomous vehicles, including hardware and software integration, cloud services, and a simulation platform for testing and development.
Pros
- Comprehensive solution: Offers a complete stack for autonomous driving, from perception to planning and control
- Open-source: Allows for community contributions and customization
- Regularly updated: Continuously improved with new features and optimizations
- Extensive documentation: Provides detailed guides and API references
Cons
- Steep learning curve: Requires significant expertise in robotics and autonomous driving
- Resource-intensive: Demands powerful hardware for optimal performance
- Complex setup: Initial configuration and environment setup can be challenging
- Limited compatibility: Primarily designed for specific hardware configurations
Code Examples
- Perception module usage:
from modules.perception.production.lib.perception_gflags import *
from modules.perception.production.dag.dag_streaming import DAGStreaming
def run_perception():
dag_config_path = "/apollo/modules/perception/production/conf/perception/perception_dag_streaming.pb.txt"
dag_streaming = DAGStreaming(dag_config_path)
dag_streaming.Start()
# Process perception data
dag_streaming.Stop()
- Planning module integration:
#include "modules/planning/planning.h"
#include "modules/common/adapters/adapter_manager.h"
using apollo::common::adapter::AdapterManager;
void RunPlanning() {
Planning planning;
planning.Init();
AdapterManager::Observe();
auto localization = AdapterManager::GetLocalization()->GetLatestObserved();
auto chassis = AdapterManager::GetChassis()->GetLatestObserved();
planning.RunOnce(localization, chassis);
}
- Control module example:
#include "modules/control/control.h"
#include "modules/common/adapters/adapter_manager.h"
using apollo::common::adapter::AdapterManager;
void ExecuteControl() {
Control control;
control.Init();
AdapterManager::Observe();
auto localization = AdapterManager::GetLocalization()->GetLatestObserved();
auto trajectory = AdapterManager::GetPlanning()->GetLatestObserved();
control.ComputeControlCommand(localization, trajectory);
}
Getting Started
-
Clone the Apollo repository:
git clone https://github.com/ApolloAuto/apollo.git
-
Install dependencies:
cd apollo bash docker/scripts/dev_start.sh
-
Enter the development environment:
bash docker/scripts/dev_into.sh
-
Build Apollo:
./apollo.sh build
-
Launch Dreamview:
bash scripts/bootstrap.sh
-
Access Dreamview in your browser at
http://localhost:8888
Competitor Comparisons
openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Pros of openpilot
- More accessible for consumer vehicles, supporting a wider range of car models
- Simpler codebase, making it easier for individual developers to contribute
- Focuses on vision-based perception, which can be more cost-effective
Cons of openpilot
- Limited to highway driving scenarios, less comprehensive than Apollo
- Lacks support for complex urban environments and multi-modal transportation
- Less extensive sensor suite, potentially reducing overall system robustness
Code Comparison
openpilot (Python):
def update(self):
self.sm.update()
self.state = State.calc_state(self.sm)
self.events = Events()
self.controlsState = ControlsState()
Apollo (C++):
Status PlanningComponent::Proc(
const std::shared_ptr<prediction::PredictionObstacles>& prediction_obstacles,
const std::shared_ptr<canbus::Chassis>& chassis,
const std::shared_ptr<localization::LocalizationEstimate>& localization) {
// Implementation details
}
openpilot's code is more concise and uses Python, making it potentially easier for newcomers to understand and contribute. Apollo's code is in C++ and appears more complex, reflecting its broader scope and more comprehensive feature set.
Autoware - the world's leading open-source software project for autonomous driving
Pros of Autoware
- More modular and flexible architecture, allowing easier customization and integration
- Stronger focus on ROS 2 compatibility, providing better long-term support
- More active community contributions and frequent updates
Cons of Autoware
- Less comprehensive documentation compared to Apollo
- Smaller ecosystem of pre-built modules and tools
- Steeper learning curve for beginners due to its flexibility
Code Comparison
Apollo (C++):
void Planning::RunOnce(const LocalView& local_view,
ADCTrajectory* const trajectory_pb) {
// Planning process implementation
}
Autoware (C++):
void PlanningNode::on_timer() {
// Planning process implementation
}
Both projects use C++ for core functionality, but Autoware tends to follow more modern C++ practices and ROS 2 conventions. Apollo's codebase is more tightly integrated, while Autoware's modular approach allows for easier component replacement and customization.
Autoware's planning process is typically implemented within ROS 2 nodes, utilizing the framework's communication patterns. Apollo's planning is more centralized, with a single Planning class handling the entire process.
Overall, both projects aim to provide comprehensive autonomous driving stacks, but with different approaches to architecture and ecosystem development.
Autoware - the world's leading open-source software project for autonomous driving
Pros of Autoware
- More modular and flexible architecture, allowing easier customization and integration
- Stronger focus on ROS 2 compatibility, providing better long-term support
- More active community contributions and frequent updates
Cons of Autoware
- Less comprehensive documentation compared to Apollo
- Smaller ecosystem of pre-built modules and tools
- Steeper learning curve for beginners due to its flexibility
Code Comparison
Apollo (C++):
void Planning::RunOnce(const LocalView& local_view,
ADCTrajectory* const trajectory_pb) {
// Planning process implementation
}
Autoware (C++):
void PlanningNode::on_timer() {
// Planning process implementation
}
Both projects use C++ for core functionality, but Autoware tends to follow more modern C++ practices and ROS 2 conventions. Apollo's codebase is more tightly integrated, while Autoware's modular approach allows for easier component replacement and customization.
Autoware's planning process is typically implemented within ROS 2 nodes, utilizing the framework's communication patterns. Apollo's planning is more centralized, with a single Planning class handling the entire process.
Overall, both projects aim to provide comprehensive autonomous driving stacks, but with different approaches to architecture and ecosystem development.
The Udacity open source self-driving car project
Pros of self-driving-car
- More accessible for beginners and educational purposes
- Broader range of topics covered, including computer vision and deep learning
- Open-source datasets and challenges for community engagement
Cons of self-driving-car
- Less comprehensive and production-ready compared to apollo
- Limited real-world testing and deployment capabilities
- Lacks advanced features like HD mapping and localization
Code Comparison
apollo:
bool ADCTrajectory::is_replan_triggered() const {
return replan_reason_ != ReplanReason::REPLAN_REASON_NONE;
}
self-driving-car:
def process_image(image):
yuv = cv2.cvtColor(image, cv2.COLOR_BGR2YUV)
blur = cv2.GaussianBlur(yuv, (3,3), 0)
return blur
The apollo repository focuses on C++ implementation for production-level autonomous driving systems, while self-driving-car uses Python for educational purposes and easier understanding of concepts.
apollo provides a more comprehensive and production-ready autonomous driving platform with advanced features, real-world testing capabilities, and integration with various hardware components. self-driving-car, on the other hand, offers a more accessible and educational approach to self-driving car technology, covering a broader range of topics and providing open-source datasets for learning and experimentation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
We choose to go to the moon in this decade and do the other things,
not because they are easy, but because they are hard.
-- John F. Kennedy, 1962
Welcome to Apollo's GitHub page!
Apollo is a high performance, flexible architecture which accelerates the development, testing, and deployment of Autonomous Vehicles.
For business and partnership, please visit our website.
Table of Contents
Introduction
Apollo is loaded with new modules and features but needs to be calibrated and configured perfectly before you take it for a spin. Please review the prerequisites and installation steps in detail to ensure that you are well equipped to build and launch Apollo. You could also check out Apollo's architecture overview for a greater understanding of Apollo's core technology and platforms.
Prerequisites
[New 2021-01] The Apollo platform (stable version) is now upgraded with software packages and library dependencies of newer versions including:
- CUDA upgraded to version 11.1 to support Nvidia Ampere (30x0 series) GPUs, with NVIDIA driver >= 455.32
- LibTorch (both CPU and GPU version) bumped to version 1.7.0 accordingly.
We do not expect a disruption to your current work, but to ease your life of migration, you would need to:
- Update NVIDIA driver on your host to version >= 455.32. (Web link)
- Pull latest code and run the following commands after restarting and logging into Apollo Development container:
# Remove Bazel output of previous builds
rm -rf /apollo/.cache/{bazel,build,repos}
# Re-configure bazelrc.
./apollo.sh config --noninteractive
-
The vehicle equipped with the by-wire system, including but not limited to brake-by-wire, steering-by-wire, throttle-by-wire and shift-by-wire (Apollo is currently tested on Lincoln MKZ)
-
A machine with a 8-core processor and 16GB memory minimum
-
NVIDIA Turing GPU / AMD GFX9/RDNA/CDNA GPU is strongly recommended
-
Ubuntu 18.04
-
NVIDIA driver version 455.32.00 and above (Web link) or ROCm v5.1 and above.
-
Docker-CE version 19.03 and above (Official doc)
-
NVIDIA Container Toolkit (Official doc)
Please note, it is recommended that you install the versions of Apollo in the following order: 1.0 -> whichever version you would like to test out. The reason behind this recommendation is that you need to confirm whether individual hardware components and modules are functioning correctly, and clear various version test cases before progressing to a higher and more capable version for your safety and the safety of those around you.
Individual Versions:
The following diagram highlights the scope and features of each Apollo release:
Apollo 1.0, also referred to as the Automatic GPS Waypoint Following, works in an enclosed venue such as a test track or parking lot. This installation is necessary to ensure that Apollo works perfectly with your vehicle. The diagram below lists the various modules in Apollo 1.0.
Apollo 1.5 is meant for fixed lane cruising. With the addition of LiDAR, vehicles with this version now have better perception of its surroundings and can better map its current position and plan its trajectory for safer maneuvering on its lane. Please note, the modules highlighted in Yellow are additions or upgrades for version 1.5.
Apollo 2.0 supports vehicles autonomously driving on simple urban roads. Vehicles are able to cruise on roads safely, avoid collisions with obstacles, stop at traffic lights, and change lanes if needed to reach their destination. Please note, the modules highlighted in Red are additions or upgrades for version 2.0.
Apollo 2.5 allows the vehicle to autonomously run on geo-fenced highways with a camera for obstacle detection. Vehicles are able to maintain lane control, cruise and avoid collisions with vehicles ahead of them.
Please note, if you need to test Apollo 2.5; for safety purposes, please seek the help of the
Apollo Engineering team. Your safety is our #1 priority,
and we want to ensure Apollo 2.5 was integrated correctly with your vehicle before you hit the road.
Apollo 3.0's primary focus is to provide a platform for developers to build upon in a closed venue low-speed environment. Vehicles are able to maintain lane control, cruise and avoid collisions with vehicles ahead of them.
Apollo 3.5 is capable of navigating through complex driving scenarios such as residential and downtown areas. The car now has 360-degree visibility, along with upgraded perception algorithms to handle the changing conditions of urban roads, making the car more secure and aware. Scenario-based planning can navigate through complex scenarios, including unprotected turns and narrow streets often found in residential areas and roads with stop signs.
Apollo 5.0 is an effort to support volume production for Geo-Fenced Autonomous Driving. The car now has 360-degree visibility, along with upgraded perception deep learning model to handle the changing conditions of complex road scenarios, making the car more secure and aware. Scenario-based planning has been enhanced to support additional scenarios like pull over and crossing bare intersections.
Apollo 5.5 enhances the complex urban road autonomous driving capabilities of previous Apollo releases, by introducing curb-to-curb driving support. With this new addition, Apollo is now a leap closer to fully autonomous urban road driving. The car has complete 360-degree visibility, along with upgraded perception deep learning model and a brand new prediction model to handle the changing conditions of complex road and junction scenarios, making the car more secure and aware.
Apollo 6.0 incorporates new deep learning models to enhance the capabilities for certain Apollo modules. This version works seamlessly with new additions of data pipeline services to better serve Apollo developers. Apollo 6.0 is also the first version to integrate certain features as a demonstration of our continuous exploration and experimentation efforts towards driverless technology.
Apollo 7.0:
Apollo 7.0 incorporates 3 brand new deep learning models to enhance the capabilities for Apollo Perception and Prediction modules. Apollo Studio is introduced in this version, combining with Data Pipeline, to provide a one-stop online development platform to better serve Apollo developers. Apollo 7.0 also publishes the PnC reinforcement learning model training and simulation evaluation service based on previous simulation service.
Apollo 8.0 is an effort to provide an extensible software framework and complete development cycle for Autonomous Driving developer. Apollo 8.0 introduces easily-reused âPackageâ to organize software modules. Apollo 8.0 integrates the whole process of perception development ,by combining model training service, model deployment tool and end-to-end visual validation tool . And another 3 new deep learning models are incorporated in Apollo 8.0 for perception module. Simulation service is upgraded by integrating local simulator in Dreamview to provide powerful debug tool for PnC developer.
Apollo Open Source Platform 9.0 further focuses on enhancing the development and debugging experience, dedicated to provide autonomous driving developers with a unified development tool platform and easy-to-extend PnC and perception software framework interfaces. The new version reshapes the PnC and perception extension development method based on package management. It optimizes component splitting and configuration management according to business logic, simplifying the process of calling. In addition to the component extension method, a more lightweight plugin extension method has been added, simplifying the process of extending. The new version introduces Dreamview Plus, a brand-new developer tool that introduces modes for convenient multi-scenario use, a panel layout customizing visualization, and a resource center providing richer development resources. Furthermore, the LiDAR and Camera detection models in the new version have been upgraded for improved results, and incremental training methods have been opened up for easy extension. At the same time, support for 4D millimeter-wave radar has been added. Finally, the new version is adapted to the ARM architecture, and supports compilation and running on Orin, providing developers with additional device options.
Architecture
- Hardware/ Vehicle Overview
- Hardware Connection Overview
- Software Overview
Installation
- Hardware installation guide
- Software installation_guide - This step is required
Congratulations! You have successfully built out Apollo without Hardware. If you do have a vehicle and hardware setup for a particular version, please pick the Quickstart guide most relevant to your setup:
Quick Starts:
Documents
Questions
You are welcome to submit questions and bug reports as GitHub Issues.
Copyright and License
Apollo is provided under the Apache-2.0 license.
Disclaimer
Apollo open source platform only has the source code for models, algorithms and processes, which will be integrated with cybersecurity defense strategy in the deployment for commercialization and productization.
Please refer to the Disclaimer of Apollo in Apollo's official website.
Connect with us
- Have suggestions for our GitHub page?
- YouTube
- Blog
- Newsletter
- Interested in our turnKey solutions or partnering with us Mail us at: apollopartner@baidu.com
Top Related Projects
openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
Autoware - the world's leading open-source software project for autonomous driving
Autoware - the world's leading open-source software project for autonomous driving
The Udacity open source self-driving car project
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot