欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

百度Apollo学习笔记(更新中)

程序员文章站 2022-07-03 18:25:22
...


近期学习百度Apollo,特在此博客作学习笔记来总结相关知识。
因为只关注apollo中定位和激光雷达3d感知部分,大致的学习思路是,首先阅读apollo源码中的帮助文档,学习Cyber RT相关知识以及apollo的3d障碍物感知,定位部分。接着查看部分源码。

首先介绍百度开源代码中文件结构内容

相信大家同我一样,刚开始碰到apollo完全是一筹莫展,所以十分有必要梳理整个源码的结构内容。

Apollo总的索引文档

目录:apollo/docs/README.md
其中quick start guide里面主要讲的是如何安装apollo等教程。

帮助文档,目录:apollo/docs

百度Apollo学习笔记(更新中)

Quick Start Guide

  • A hardware and software guide to setting up Apollo, segregated by versions
  • quidkstart文件夹主要介绍如何安装apollo。

Technical Tutorial

  • Everything you need to know about Apollo. Written as individual versions with links to every document related to that version.
  • 该文件是Apollo5.0教程,推荐按照这个目录进行索引学习。目录:docs/apollo_5.0_technical_tutorial.md

Cyber

该文件夹下主要存放关于Cyber RT计算框架的相关知识文档。关于Cyber RT的总索引文档目录为:apollo/cyber/README.md
Cyber RT:
Apollo Cyber RT是百度自研得无人车计算任务实时并行计算框架,框架核心理念基于组件,通过组件实现有预先设定的“输入”、“输出”。实际上,在框架中,每个组件代表一个专用的算法模块。可以暂且理解为百度研发的升级版ROS。

Apollo Cyber RT is an open source, high performance runtime framework designed specifically for autonomous driving scenarios. Based on a centralized computing model, it is greatly optimized for high concurrency, low latency, and high throughput in autonomous driving.

During the last few years of the development of autonomous driving technologies, we have learned a lot from our previous experience with Apollo. The industry is evolving and so is Apollo. Going forward, Apollo has already moved from development to productization, with volume deployments in the real world, we see the demands for the highest level of robustness and performance. That’s why we spent years building and perfecting Apollo Cyber RT, which addresses that requirements of autonomous driving solutions.

百度Apollo学习笔记(更新中)

  • How to Develop Cyber RT inside Docker Environment on Both x86 and ARM Platform: Official docker image for Cyber RT development, which is easiest way to build and play with Cyber RT. On top of that, we officially support development of Cyber RT on both x86 and ARM platform.文档:CyberRT_Docker.md,介绍如何在Docker环境下build cyber。

  • Apollo Cyber RT Quick Start: Everything you need to know about how to start developing your first application module on top of Apollo Cyber RT.文档:CyberRT_Quick_Start.md,介绍如何简单的开发一个组件。

  • Apollo Cyber RT Developer Tools: Detailed guidance on how to use the developer tools from Apollo Cyber RT.文档:CyberRT_Developer_Tools.md,介绍了三种关于cyber的开发工具。

  • Apollo Cyber RT API for Developers: A comprehensive guide to explore all the APIs of Apollo Cyber RT, with many concrete examples in source code.文档:CyberRT_API_for_Developers.md,关于cyber的详细运用。

  • Apollo Cyber RT FAQs: Answers to the most frequently asked questions about Apollo Cyber RT.文档:CyberRT_FAQs.md,一些常见问题。

  • Apollo Cyber RT Terms: Commonly used terminologies in Cyber RT documentation and code.文档:CyberRT_Terms.md,一些专有名词的解释。

还有other文件,可以自行去查看。
关于Cyber RT的知识,会特意再写一个Blog来介绍。

Specs

  • A Deep dive into Apollo’s Hardware and Software specifications (only recommended for expert level developers that have successfully installed and launched Apollo)
  • 文件夹下存放Apollo软硬件的详细说明,包含一些算法详细说明。

Howto Guides

  • Brief technical solutions to common problems that developers face during the installation and use of the Apollo platform
  • howto文件夹下主要存放一些特定问题的解决方法。可以查看README.md进行索引查找。

demo_guide 运行线下演示

如果你没有车辆及车载硬件, Apollo还提供了一个计算机模拟环境,可用于演示和代码调试。

线下演示首先要Fork并且Clone Apollo在GitHub的代码,然后需要设置docker的release环境,请参照 how_to_build_and_release文档中的Install docker章节。

Apollo演示的安装步骤:

  1. 运行如下命令启动docker的release环境:

    bash docker/scripts/dev_start.sh
    
  2. 运行如下命令进入docker的release环境:

    bash docker/scripts/dev_into.sh
    
  3. 在Docker中编译Apollo:

    bash apollo.sh build
    

    Note: 如果没有GPU,请使用下面的命令

    bash apollo.sh build_cpu
    
  4. 启动DreamView

    bash scripts/bootstrap.sh
    
  5. 下载demo record:

    cd docs/demo_guide/
    python rosbag_helper.py demo_3.5.record
    
  6. 运行如下命令回放record:

    cyber_recorder play -f docs/demo_guide/demo_3.5.record --loop
    

    选项 --loop 用于设置循环回放模式.

  7. 打开Chrome浏览器,在地址栏输入localhost:8888即可访问Apollo Dreamview
    现在你能看到有一辆汽车在模拟器里移动!

Apollo感知模块
Apollo激光雷达-IMU标定
传感器标定

还有许多未写,时间紧迫,未完待续。。。

本文主要参考:
百度开源代码
Apollo开发者社区