Skip to content

Commit

Permalink
Robot: Remove trailing spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxq authored and Capri2014 committed May 22, 2019
1 parent 7b18c4c commit 1de6bd0
Show file tree
Hide file tree
Showing 21 changed files with 86 additions and 86 deletions.
6 changes: 3 additions & 3 deletions docs/FAQs/Perception_FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## How many typer of sensors calibrations are present?

There are 5 types of calibration:
* Camera - Camera
* Camera - Camera
* Camera - LiDAR
* Radar - Camera
* LiDAR - GNSS
* Radar - Camera
* LiDAR - GNSS
* IMU - Vehicle

For additional information on Sensor Calibration, please refer to our [calibration guide](https://github.com/ApolloAuto/apollo/blob/master/docs/quickstart/apollo_2_0_sensor_calibration_guide.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

## Cyber

[README](cyber/README.md) - All you need to know about Apollo Cyber
[README](cyber/README.md) - All you need to know about Apollo Cyber

## Specs

[README](specs/README.md) - A Deep dive into Apollo's Hardware and Software specifications (only recommended for expert level developers that have successfully installed and launched Apollo)
[README](specs/README.md) - A Deep dive into Apollo's Hardware and Software specifications (only recommended for expert level developers that have successfully installed and launched Apollo)

## Howto Guides

[README](howto/README.md) - Brief technical solutions to common problems that developers face during the installation and use of the Apollo platform
[README](howto/README.md) - Brief technical solutions to common problems that developers face during the installation and use of the Apollo platform

## FAQs

Expand Down
6 changes: 3 additions & 3 deletions docs/cyber/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Key benefits of using Apollo Cyber RT:
+ The default open source runtime framework
+ Building blocks specifically designed for autonomous driving
+ Plug and play your own AD system


* [Apollo Cyber RT Quick Start](CyberRT_Quick_Start.md): Everything you need to know about how to start developing your first application module on top of Apollo Cyber RT.

* [Apollo Cyber RT Developer Tools](CyberRT_Developer_Tools.md): Detailed guidance on how to use the developer tools from Apollo Cyber RT.
* [Apollo Cyber RT Quick Start](CyberRT_Quick_Start.md): Everything you need to know about how to start developing your first application module on top of Apollo Cyber RT.

* [Apollo Cyber RT Developer Tools](CyberRT_Developer_Tools.md): Detailed guidance on how to use the developer tools from Apollo Cyber RT.

* [Apollo Cyber RT API for Developers](CyberRT_API_for_Developers.md): A comprehensive guide to explore all the APIs of Apollo Cyber RT, with many concrete examples in source code.

Expand Down
20 changes: 10 additions & 10 deletions docs/howto/how_to_add_a_new_can_card.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ class ExampleCanClient : public CanClient {
To register the New CAN Card in CanClientFactory,
add the following code to `CanClientFactory`:
```cpp
void CanClientFactory::RegisterCanClients() {
Register(CANCardParameter::ESD_CAN,
[]() -> CanClient* { return new can::EsdCanClient(); });
// register the new CAN card here.
Register(CANCardParameter::EXAMPLE_CAN,
[]() -> CanClient* { return new can::ExampleCanClient(); });
}
void CanClientFactory::RegisterCanClients() {
Register(CANCardParameter::ESD_CAN,
[]() -> CanClient* { return new can::EsdCanClient(); });
// register the new CAN card here.
Register(CANCardParameter::EXAMPLE_CAN,
[]() -> CanClient* { return new can::ExampleCanClient(); });
}
```

### Step 3
Expand All @@ -128,13 +128,13 @@ message CANCardParameter {
ESD_CAN = 1;
EXAMPLE_CAN = 2; // add new CAN card here.
}
... ...
... ...
}
```
Update `/modules/canbus/conf/canbus_conf.pb.txt`

```txt
... ...
... ...
can_card_parameter {
brand:EXAMPLE_CAN
type: PCI_CARD // suppose the new can card is PCI_CARD
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how_to_build_your_own_kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ cd apollo-kernel
2. Add the ESD CAN driver source code according to [ESDCAN-README.md](https://github.com/ApolloAuto/apollo-kernel/blob/master/linux/ESDCAN-README.md).
3. Build the kernel with the following command:
```bash build.sh```
4. Install the kernel the same way as using a pre-built [Apollo Kernel](https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_install_apollo_kernel.md).
4. Install the kernel the same way as using a pre-built [Apollo Kernel](https://github.com/ApolloAuto/apollo/blob/master/docs/howto/how_to_install_apollo_kernel.md).
4 changes: 2 additions & 2 deletions docs/howto/how_to_generate_and_push_docker_images.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## How to Generate and Push Docker Images

This How to will walk you through the basic steps of generating and pushing images through to your docker hub.

### Generate release image
Expand All @@ -10,7 +10,7 @@
```bash
bash apollo_docker.sh gen
```
This will create a new docker image with the release directory. The release image will be named as *release-yyyymmdd_hhmm*. Meanwhile, your most recent built image will be tagged as *release-latest*.
This will create a new docker image with the release directory. The release image will be named as *release-yyyymmdd_hhmm*. Meanwhile, your most recent built image will be tagged as *release-latest*.

### Push docker images
By default, the images will be pushed to Apolloauto/apollo Docker hub when you run the following command:
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how_to_launch_Apollo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to Launch and Run Apollo
# How to Launch and Run Apollo
First check and make sure you are in development docker container before you proceed. Now you will need to build from the source. If you want to run the entire system, make sure you have an
nVidia GPU and that you have installed the Linux nVidia drivers.
You could still proceed with the next few steps even if you are missing the Linux nVidia drivers, as the system will run but with the CUDA-based perception and other modules.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## Setup docker image in CentOS based system

ApolloAuto uses Ubuntu partially because of the Linux distribution dependency of ROS indigo. There is a script
`${apollo\_root}/docker/scripts/install\_dcoker.sh` inside the docker image involved. Most cloud based servers have already installed docker, hence you can just go ahead without touching it.
`${apollo\_root}/docker/scripts/install\_dcoker.sh` inside the docker image involved. Most cloud based servers have already installed docker, hence you can just go ahead without touching it.

In CentOS, to install docker
you can either follow [this installation guide](https://docs.docker.com/engine/installation/linux/docker-ce/centos/#os-requirements)
you can either follow [this installation guide](https://docs.docker.com/engine/installation/linux/docker-ce/centos/#os-requirements)
to install Docker- CE for CentOS or you could write the following:

> sudo yum update && sudo yum install -y docker
Expand All @@ -19,26 +19,26 @@ Check its health status by

> sudo systemctl status docker
As a matter of the fact, we recommend you to install `nvidia-docker`. `Nvidia-docker2` is currently
under `alpha` verision, and should not be used in production environment.
As a matter of the fact, we recommend you to install `nvidia-docker`. `Nvidia-docker2` is currently
under `alpha` verision, and should not be used in production environment.

As typically sugggested by Docker, you should add your name to the docker group

> sudo usermod -aG docker $(whoami)
You can then build out Apollo based on the steps in the installation guide.

Before executing `dev_start.sh` to build or pull an image from apolloauto for CentOS, you have to
Before executing `dev_start.sh` to build or pull an image from apolloauto for CentOS, you have to
modify ${apollo\_auto}/scripts/docker\_adduser.sh first by adding `--force-badname` in line 21.

> adduser --force-badname --disable-password ...
## GPU enabled container for perception research

#### Update driver in host
#### Update driver in host

This part is much more tricky because you have to install an nvidia driver in docker container as the same
version of that in your host machine and stop "nvidia.uvm" relevant modules.
This part is much more tricky because you have to install an nvidia driver in docker container as the same
version of that in your host machine and stop "nvidia.uvm" relevant modules.

If you are using `VirtualBox`, whether the virtual graphic adapter \(VGA\) can pass through hardware depends
on your nvidia driver and gpu versions. Some developlers suggest KVM, VMWare and Xen where hardware passthrough to VM
Expand All @@ -58,11 +58,11 @@ Although you can succeed in the above solution, it is not recommended as it is t

A better way is to apply for operation time and update Baidu's driver inside docker. The following problems may arise:

1. gcc version confliction with NVIDIA driver:
1. gcc version confliction with NVIDIA driver:
- baidu uses gcc-4.8.4, it is old, check `install_nvidia_driver.sh` to see how to update
2. bazel dependency: after installation of the driver, you would have to roll back the default gcc version to build apollo
3. resintall cuda: it will cost you roughly 2GB, please scale the container to proper size by adjusting paremters in `docker run` statement
- inspect mounted disk inside docker, `df -h`, replace the directory which you think good in `reinstall_cuda.sh`
- inspect mounted disk inside docker, `df -h`, replace the directory which you think good in `reinstall_cuda.sh`
keyword `--tmpdir`

After installation you, can check the situation by issuing
Expand All @@ -86,7 +86,7 @@ You can refer to my [DockerHub](https://hub.docker.com/r/yiakwy/apolloautocentos

## Troubleshooting

What if you committed incorrect `\*.pd.txt` files and cannot rebase to the latest developer branch? Try the
What if you committed incorrect `\*.pd.txt` files and cannot rebase to the latest developer branch? Try the
following commands:

```
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/how_to_tune_control_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The controllers include a lateral controller that manages the steering commands
#### Lateral Controller
The lateral controller is an LQR-Based Optimal Controller. The dynamic model of this controller is a simple bicycle model with side slip. It is divided into two categories, including a closed loop and an open loop.

- The closed loop provides discrete feedback LQR controller with 4 states:
- The closed loop provides discrete feedback LQR controller with 4 states:
- Lateral Error
- Lateral Error Rate
- Heading Error
Expand Down
44 changes: 22 additions & 22 deletions docs/howto/how_to_understand_architecture_and_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ HOW TO UNDERSTAND ARCHITECTURE AND WORKFLOW
## Fundamentals to understand AplloAuto - core

Autonomous vehicles \(AV\) dynamics controlled by planning engine through Controller Area Network bus \(CAN bus\). Software reads data from
hardware registers and writes them back just like we did in Assembly language. To compute concisely, Location Module, Perception Module, Planning Module as independent
hardware registers and writes them back just like we did in Assembly language. To compute concisely, Location Module, Perception Module, Planning Module as independent
input sources and output sources work together though Peer2Peer. P2P supported by RPC networks application.

ApolloAuto uses ROS1 as the underlying network which means that ApolloAuto borrows Master-Nodes framework from ROS1. Since xmlRPC from ROS1 is really old \(compared
to the recent brpc and [grpc](https://yiakwy.github.io/blog/2017/10/01/gRPC-C-CORE)\), Baidu develops its own protobuf version of RPC.
to the recent brpc and [grpc](https://yiakwy.github.io/blog/2017/10/01/gRPC-C-CORE)\), Baidu develops its own protobuf version of RPC.

In Baidu ApolloAuto, three stages of development have already been described

1. Offline Simulation Engine Dreamviewer & ApolloAuto core software module
- Get a first taste on how the algorithms work for a car
- We don't need to touch a real car or hardware and start development immediately
2. Core modules Integration:
2. Core modules Integration:
- Location
- Perception \(support third parties' solution like Mobileye ES4 chip based camera for L2 development\) process point cloud data from `Lidar` and return segmented objects info on request
- Perception \(support third parties' solution like Mobileye ES4 chip based camera for L2 development\) process point cloud data from `Lidar` and return segmented objects info on request
- Planning: compute the fine-tuned path, car dynamic controlling info for path segments from route service
- Routine: local implementation of finding path segments through `Navigator` interface; Using A\*star algorithm.
3. HD Maps. One of the key differences from L2 level AV development. L4 AV machine needs Hdmap. Since a robot \(an autonomous vehicle \) needs to rebuild
- Routine: local implementation of finding path segments through `Navigator` interface; Using A\*star algorithm.
3. HD Maps. One of the key differences from L2 level AV development. L4 AV machine needs Hdmap. Since a robot \(an autonomous vehicle \) needs to rebuild
3d world \(please check OpenCV [SLAM]() chapter\) in its microcomputer, reference object coordinates play a great role in relocating AV both in the map and the real world.
4. Cloud-based Online Simulation Drive Scenario Engine and Data Center.
4. Cloud-based Online Simulation Drive Scenario Engine and Data Center.
- As a partner of Baidu, you will be granted docker credentials to commit new images and replay the algorithm you developed on the cloud.
- Create and manage complex scenarios to simulate real-world driving experiences

Expand All @@ -31,18 +31,18 @@ In Baidu ApolloAuto, three stages of development have already been described

#### ROS underlying Subscription and Publication mechanism

So how does ROS1 based system communicate with each other and how does ApolloAuto make use of it? ROS has [tutorials](http://wiki.ros.org/ROS/Tutorials), and I will explain it
So how does ROS1 based system communicate with each other and how does ApolloAuto make use of it? ROS has [tutorials](http://wiki.ros.org/ROS/Tutorials), and I will explain it
quickly before we analyze ApolloAuto modules structure.

ROS is a software, currently exclusively well supported by Ubuntu series. It has master roscore.
ROS is a software, currently exclusively well supported by Ubuntu series. It has master roscore.

> printenv | grep ROS
default ros master uri is "http://localhost:11311. One can create an independent binary by performing ros::init and start it by performing ros::spin \(some kind of Linux event loop\)
default ros master uri is "http://localhost:11311. One can create an independent binary by performing ros::init and start it by performing ros::spin \(some kind of Linux event loop\)
using c++ or python. The binary behind the freshly created package is called ***ROS node***. The node will register its name and IP address in Master in case of other nodes querying. Nodes communicate
with each by directly constructing a TCP connection.

If a node wants to read data from others, we call it subscriber. The typical format is
If a node wants to read data from others, we call it subscriber. The typical format is

```
... bla bla bla
Expand All @@ -51,7 +51,7 @@ ros::Subscriber sub = h.subscribe("topic_name", q_size, cb)
.. bla bla bla
```

If a node wants to provide data for subscribers to read, we call it a publisher. The typical format is
If a node wants to provide data for subscribers to read, we call it a publisher. The typical format is

```
... bla bla bla
Expand All @@ -65,33 +65,33 @@ module structures before diving deep into core modules implementation.

#### apolloauto modules structure

I have conducted full research about it but I cannot show you all of them. ApolloAuto modules/common/ provide basic micros to control ros::spin for each
I have conducted full research about it but I cannot show you all of them. ApolloAuto modules/common/ provide basic micros to control ros::spin for each
module and /modules/common/adaptor contains the most information on how a topic is registered. Every module will be registered from the [point](https://github.com/yiakwy/apollo/blob/master/modules/common/adapters/adapter_manager.cc#L50)
. By reading configuration file defined ${MODULE_NAME}/conf, we can get basic information about topics a module subscribe and publish.

Each module starts by firing "Init" interface and register callbacks. If you want to step by step debug ApolloAuto in gdb, make sure you have added breakpoints in those back. This also
Each module starts by firing "Init" interface and register callbacks. If you want to step by step debug ApolloAuto in gdb, make sure you have added breakpoints in those back. This also
demonstrate that if you don't like what implemented by Baidu, just override the callback.

## Data preprocessing and Extended Kalman Filter

Kalman Filter is mathematical interactive methods to converge to real estimation without knowing the whole real\-time input sequence. No matter what kind of data you need to process, you can
rely on Kalman Filter. Extended Kalman Filter is used for 3d rigid movements in a matrix format. It is not hard. I recommend you a series tutorial from United States F15 director
Kalman Filter is mathematical interactive methods to converge to real estimation without knowing the whole real\-time input sequence. No matter what kind of data you need to process, you can
rely on Kalman Filter. Extended Kalman Filter is used for 3d rigid movements in a matrix format. It is not hard. I recommend you a series tutorial from United States F15 director
[Michel van Biezen](https://www.youtube.com/watch?v=CaCcOwJPytQ).

Since it is used in input data preprocessing, you might see it in HD Maps, perception, planning and so on so forth.

## Selected modules analysis

#### HMI & Dreamviewer

There is not too much about hmi interface and dreamviewer but it is a good place to visualize the topics parameters.
There is not too much about hmi interface and dreamviewer but it is a good place to visualize the topics parameters.

HMI is a simply simple python application based on Flask.
Instead of using HTTP, it uses web socket to query ROS modules application. If you have experience on asynchronous HTTP downloaders, it is easy to understand, that an HTTP connection is just a
Instead of using HTTP, it uses web socket to query ROS modules application. If you have experience on asynchronous HTTP downloaders, it is easy to understand, that an HTTP connection is just a
socket connection file descriptor which we have already write HTTP headers, methods into that buffer. Once hmi flask backend receives a command, it will execute a subprocess
to execute the corresponding binary.

Dreamviewer, in contrast, works a little bit like frontend app written in React, Webpack, and Threejs \( WebGL, see /dreamview/backend/simulation_world, /dreamview/frontend/src/render \),
Dreamviewer, in contrast, works a little bit like frontend app written in React, Webpack, and Threejs \( WebGL, see /dreamview/backend/simulation_world, /dreamview/frontend/src/render \),
techniques. It subscribes to messages from ROS nodes and draws it a frame after a frame.

#### Perception
Expand All @@ -114,8 +114,8 @@ different parallel locations, which consists of *Lidar, Radar, Traffic lights an
- Objects Tracker

3. Probability Fusion\(New in Apollo 1.5!\):
- As far as I can understand, fusion system in ApolloAuto
- It is typically one of most important parts: collects all the info and makes a final combination of information from sensors on the motherboard
- As far as I can understand, fusion system in ApolloAuto
- It is typically one of most important parts: collects all the info and makes a final combination of information from sensors on the motherboard
for track lists and rule-based cognitive engine
- The major process is the association, hence HM algorithms here is used again as a bipartite graph.
- Tracklists are maintained along timestamps and each list will be updated based on a probabilistic rules engine
2 changes: 1 addition & 1 deletion docs/howto/how_to_update_vehicle_calibration.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ After preparation, complete the following task sequence from `modules/tools/vehi
- Convert results to `protobuf`.

### Collect Data

1. Run `python data_collector.py` for different commands, commands like x y z, where x is acceleration command, y is speed limit(mps), z is decceleration command,Positive number for throttle and negative number for brake.Run each command multiple times.
2. Adjust the command script based on the vehicle response.
3. Run `python plot_data.py ` to open recorded data and visualize collected data.
Expand Down
Loading

0 comments on commit 1de6bd0

Please sign in to comment.