2018-04-15 17:16:22 +03:00
|
|
|
|
# 工具 {#guide_tools}
|
|
|
|
|
|
2018-05-11 09:08:53 +03:00
|
|
|
|
工具在 `<sdk>/tools` 目录,其提供一些有用的脚本和程序。
|
2018-04-15 17:16:22 +03:00
|
|
|
|
|
2018-04-25 07:28:06 +03:00
|
|
|
|
## 依赖
|
|
|
|
|
|
|
|
|
|
* [OpenCV](https://opencv.org/),部分工具需要。
|
|
|
|
|
* 编译前,可在系统终端(Windows 命令提示符)里如下指定 OpenCV 路径,其为 `OpenCVConfig.cmake` 目录:
|
2018-04-15 17:16:22 +03:00
|
|
|
|
|
|
|
|
|
```bash
|
2018-04-25 07:28:06 +03:00
|
|
|
|
# Linux, macOS
|
|
|
|
|
export OpenCV_DIR=~/opencv
|
|
|
|
|
|
|
|
|
|
# Windows
|
|
|
|
|
set OpenCV_DIR=C:\opencv
|
|
|
|
|
```
|
2018-04-15 17:16:22 +03:00
|
|
|
|
|
2018-04-25 07:28:06 +03:00
|
|
|
|
* Python 第三方库,脚本需要。
|
|
|
|
|
|
|
|
|
|
```bash
|
2018-04-15 17:16:22 +03:00
|
|
|
|
cd tools/
|
|
|
|
|
sudo pip install -r requirements.txt
|
|
|
|
|
```
|
|
|
|
|
|
2018-04-25 07:28:06 +03:00
|
|
|
|
## 编译
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
make tools
|
|
|
|
|
```
|
|
|
|
|
|
2018-04-15 17:16:22 +03:00
|
|
|
|
## 录制数据集
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
./tools/_output/bin/dataset/record
|
2018-04-25 07:28:06 +03:00
|
|
|
|
|
|
|
|
|
# Windows
|
|
|
|
|
.\tools\_output\bin\dataset\record.bat
|
2018-04-15 17:16:22 +03:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
默认录制进 `dataset` 目录,加参数可指定该目录。
|
|
|
|
|
|
|
|
|
|
## 分析数据集
|
|
|
|
|
|
|
|
|
|
分析 IMU 数据,
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
python tools/analytics/imu_analytics.py -i dataset -c tools/config/mynteye/mynteye_config.yaml \
|
|
|
|
|
-al=-1.2,1.2 -gl= -gdu=d -gsu=d -kl=
|
|
|
|
|
```
|
|
|
|
|
|
2018-04-15 17:34:15 +03:00
|
|
|
|
![imu analytics](imu_analytics.png)
|
|
|
|
|
|
|
|
|
|
\latexonly
|
|
|
|
|
\includegraphics[width=0.6\textwidth,keepaspectratio]{imu_analytics.png}
|
|
|
|
|
\endlatexonly
|
|
|
|
|
|
2018-04-15 17:16:22 +03:00
|
|
|
|
分析图像 & IMU 时间戳,
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
python tools/analytics/stamp_analytics.py -i dataset -c tools/config/mynteye/mynteye_config.yaml
|
|
|
|
|
```
|
|
|
|
|
|
2018-04-15 17:34:15 +03:00
|
|
|
|
![stamp analytics](stamp_analytics.png)
|
|
|
|
|
|
|
|
|
|
\latexonly
|
|
|
|
|
\includegraphics[width=0.6\textwidth,keepaspectratio]{stamp_analytics.png}
|
|
|
|
|
\endlatexonly
|
|
|
|
|
|
2018-04-25 07:28:06 +03:00
|
|
|
|
> 如果用 ROS ,分析脚本也支持 ROS Bag 格式。
|
|
|
|
|
|
2018-04-15 17:16:22 +03:00
|
|
|
|
## 结语
|
|
|
|
|
|
2018-04-25 07:28:06 +03:00
|
|
|
|
设备信息读写、校验码等更多工具的说明,请见 `tools/README.md` 。
|