提交 7a52bb70 编写于 作者: J Jiangtao Hu 提交者: Dong Li

e2e: fix md doc format for github format.

上级 7200a851
# Quick Start Guide
## Train Model
The train model XXX.
The train model
sh run_train.sh
Download the trainsets to the current project. See `./trainsets` directory.
## Model predict
The predict model XXX.
The predict model
sh run_predict.sh path/to/steering_model path/to/acc_model path/to/test_img t/path/to/result
## About
* Data Set Download:<<font color=#ff0000 >#TO DO GET DATA LINKs for the XXX</font>
* Data Set Summary:See [Data Overview]() data_overview.md
* Model Summary:<See [Model Overview]() model_overview.md
* Data Set Summary:See [Data Overview](https://github.com/ApolloAuto/apollo/blob/master/modules/e2e/data_overview.md)
* Model Summary:See [Model Overview](https://github.com/ApolloAuto/apollo/blob/master/modules/e2e/model_overview.md)
# 快速入门
## 训练模型
sh run_train.sh
sh run_train.sh
训练集下载到当前工程./trainsets目录下。
## 模型预测
sh run_predict.sh path/to/steering_model path/to/acc_model path/to/test_img t/path/to/result
sh run_predict.sh path/to/steering_model path/to/acc_model path/to/test_img t/path/to/result
## 关于
* 数据集下载:请参考 <https://console.bce.baidu.com/apollo/task/download#/apollo/home>
* 数据集概览:请参考 data_overview.md
* 数据集下载:请参考 <https://console.bce.baidu.com/apollo/task/download#/apollo/home>
* 数据集概览:请参考 data_overview.md
* 模型概览:请参考 model_overview.md
......@@ -21,7 +21,8 @@
训练集包含图像image和姿态attr两部分数据。image为输入数据,attr为输出数据。其中image文件和attr文件通过文件名一一对应,读取image和attr需要hdf5库支持。
### 训练集格式
* 训练数据按照如下目录结构组织:
```
```
trainsets/ // 训练数据的顶层文件夹
├── image // 包含了训练数据中的图像文件
│   ├── 119.h5
......@@ -30,17 +31,17 @@ trainsets/ // 训练数据的顶层文件夹
└── attr // 包含了与图像文件对应的姿态文件
├── 119.h5
├── ..
└── 123.h5
└── 123.h5
```
* 图像文件:h5文件。key-value格式,以时间戳UTC time为索引检索一幅图像,key:UTC time, value:320 * 320 * 3的图像编码后jpg格式数据。解码示例:
```
with h5py.File(img_file, 'r') as f:
for t in f:
img = cv2.imdecode(f[t][:], 1)
```
* 姿态文件:h5文件。一个时刻的姿态数据以二维数组整体存在hdf5中,第一维为’attrs’,第二维为姿态数据:[t, VEast, VNorth, curv1, curv2, curv3, curv4, curv5, curv6, x, y, heading, tag]。对于图像文件中的一个UTC time的图像,一定存在一行与之对应的姿态数据,每一行有13个数据,类型为64位浮点数。字段说明如下:
......@@ -49,10 +50,23 @@ trainsets/ // 训练数据的顶层文件夹
------------ | ------------- | ------------
01 : t | 十进制(无符号) | 当前UTC time 时间戳
02 : VEast| 米/秒 | 当前车辆朝东的速度
03 : VNorth| 米/秒 | 当前车辆朝北的速度 04 : curv1 | 十进制(有符号) | [t,t+0.125)间曲率1,左拐为正 05 : curv2 | 十进制(有符号) | [t,t+0.125)间曲率2,左拐为正 06 : curv3 | 十进制(有符号) | [t,t+0.125)间曲率3,左拐为正 07 : curv4 | 十进制(有符号) | [t,t+0.125)间曲率4,左拐为正 08 : curv5 | 十进制(有符号) | [t,t+0.125)间曲率5,左拐为正 09 : curv6 | 十进制(有符号) | [t,t+0.125)间曲率6,左拐为正 10 : x | 十进制(无符号) | 与正东向x轴的相对位移 11 : y | 十进制(无符号) | 与正北向y轴的相对位移 12 : heading | 度,十进制浮点数(有符号) | 与北向的顺时针夹角 13 : tag | 十进制(无符号) | 保留的标记位,暂未使用
03 : VNorth| 米/秒 | 当前车辆朝北的速度
04 : curv1 | 十进制(有符号) | [t,t+0.125)间曲率1,左拐为正
05 : curv2 | 十进制(有符号) | [t,t+0.125)间曲率2,左拐为正
06 : curv3 | 十进制(有符号) | [t,t+0.125)间曲率3,左拐为正
07 : curv4 | 十进制(有符号) | [t,t+0.125)间曲率4,左拐为正
08 : curv5 | 十进制(有符号) | [t,t+0.125)间曲率5,左拐为正
09 : curv6 | 十进制(有符号) | [t,t+0.125)间曲率6,左拐为正
10 : x | 十进制(无符号) | 与正东向x轴的相对位移
11 : y | 十进制(无符号) | 与正北向y轴的相对位移
12 : heading | 度,十进制浮点数(有符号) | 与北向的顺时针夹角
13 : tag | 十进制(无符号) | 保留的标记位,暂未使用
# 评测数据格式
* 测试集只包含图像数据,格式同训练集。测试数据按照如下目录结构组织: ``` testsets/ // 测试数据的顶层文件夹
* 测试集只包含图像数据,格式同训练集。测试数据按照如下目录结构组织:
```
testsets/ // 测试数据的顶层文件夹
├── image // 包含了测试数据中的图像文件
│   ├── testfile_part01.h5
│   ├── ..
......@@ -60,9 +74,11 @@ trainsets/ // 训练数据的顶层文件夹
└── attr // 包含了与图像文件对应的姿态文件
├── testfile_part01.h5
├── ..
└── testfile_part04.h5 ```
└── testfile_part04.h5
```
* 使用测试集预测曲率和加速度。预测结果写入.h5文件,二维数组整体存在hdf5中,浮点数存储。
列:变量 | 单位 | 说明
列:变量 | 单位 | 说明
------------ | ------------- | ------------
01 : t | 十进制(无符号) | 当前UTC time 时间戳
02 : curv| 十进制(有符号)| [t,t+0.125)间曲率,左拐为正
......@@ -72,4 +88,4 @@ trainsets/ // 训练数据的顶层文件夹
横纵向模型预测效果使用均方差(MSE)指标来衡量。均方差是指预测值与真实值差值的平方的均值,均方差值越小,效果越好。该指标用来衡量预测的精确性,定义公式如下:
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>
$$ MSE = \frac1{n}\sum_{i=1}^n{(truth- predict )^2} $$
\ No newline at end of file
$$ MSE = \frac1{n}\sum_{i=1}^n{(truth- predict )^2} $$
#模型说明文档
# 模型说明文档
## 横向模型
横向模型即计算曲率模型。
......@@ -15,7 +15,7 @@ def generator_data_steering():
```
def filter(c,v):
return v > 1 and c < 0.5
```
顺序生成数据,因采集的数据含有大量直行(曲率小于等于0.0001)的数据。过滤异常值后,选取10%的直行数据。
......@@ -46,7 +46,7 @@ def generator_data_acc():
```
def filter(c,v):
return v > 1 and c < 0.5
```
顺序读取数据,定义time_step=5,过滤异常数据,选取顺序的五帧图,求得的第五帧图时刻的加速度值作为输入。
每帧图间隔0.125s,第五帧的加速度
......
#Sensor Data Module
# Sensor Data Module
Use the sensor data module to collect the sensor data and vehicle parameters in the ROS of PX2 environment.
#Prerequisites
# Prerequisites
1. Ubuntu 16.04 LTS
2. ROS Kinetic – recommend ros-kinetic-desktop-full.
3. Px2 driveworks0.1 version
......@@ -41,7 +41,7 @@ Use the sensor data module to collect the sensor data and vehicle parameters in
**NOTE:**
An error may appear saying that *msg not found*. If this occurs , compile the `msg` module first, and then compile the rest of the modules.
##Module usage:
## Module usage:
To test:
......
#模块简介
# 模块简介
此模块主要是在PX2 的硬件环境下,在ROS环境中给end to end 系统收集传感器数据以及汽车相关状态参数。
#安装环境
# 安装环境
1. Ubuntu 16.04 LTS
2. ROS Kinetic – 建议 ros-kinetic-desktop-full.
3. Px2 driveworks 的0.1 版本
#编译以及安装此模块
# 编译以及安装此模块
编译和安装此模块都是通过ROS catkin的工具来完成的。
首先应该安装ROS环境,例如安装到`~/ros`目录下面,为了方便起见,可以将下面的代码加入到`~/.bash_profile`,以便每次打开一个新的bash shell都能进入到ROS环境当中去以便使用catkin的编译工具:
......@@ -38,7 +38,7 @@
编译的时候有些模块会报错找不到msg,可以先将msg那个子模块编译出来,然后再将其他的子模块加入到src中进行编译。
#使用模块
# 使用模块
为了进行测试,首先打开一个bash shell,然后开启一个ROS core:
```
......@@ -53,6 +53,6 @@
最后打开另外一个bash shell,打开可视化工具rviz观察是否有image消息发布出来。
#LICENSE
# LICENSE
请看相应的license 文件。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册