diff --git a/20230906事故分析.md b/20230906事故分析.md new file mode 100644 index 0000000..42fee23 --- /dev/null +++ b/20230906事故分析.md @@ -0,0 +1,15 @@ + +任务ID 5032 +自检成功,task_run 执行成功,但是没响应,任务执行接口也没有调。导致一直没关库 + +任务执行完成返航,没调任务结束接口,所以还可以正常接收远程控制指令 + +由于没走任务结束流程,飞机未收到降落请求,飞机悬停在机库上方20米高度 等待5分钟超时 +超时时间未到之前,远程控制发送了一键返航指令。飞机开始降落,初步判断由于app 推流打开导致崩溃重启。 + +重启之后之前的大部分状态都丢失了,还是可以接收远程控制指令,一系列操作之后远程控制恢复任务,由于本地有5020的未执行完成的任务数据,恢复了5020的任务。 + +5020执行过程中远程控制,返航降落都正常。在视觉降落过程中由于未考虑到凌晨的情况,夜航灯没开,降落超时,前往备降点。由于执行了太多操作,电量不足,最后强制降落在了机库旁边,未能正常前往备降点。 + + + diff --git a/2024-10-28-艾航-四维图新-激光雷达竣工验收会议总结.md b/2024-10-28-艾航-四维图新-激光雷达竣工验收会议总结.md new file mode 100644 index 0000000..c3c5b7b --- /dev/null +++ b/2024-10-28-艾航-四维图新-激光雷达竣工验收会议总结.md @@ -0,0 +1,11 @@ +## 背景条件 +* 根据已知的绝缘子数据 应用场景要求的测量误差需要小于等于1cm +* 当前富锐的激光雷达 标称测量误差为2cm +* 博尔芯预计今天发货的激光雷达 标称测量误差1cm +* 最终测量精度 = 无人机定位误差(1cm)+ 激光雷达测量误差 + IMU 传感器误差 + 云台结构的误差 + 重建算法误差 +* 通过软件上的工作,可以减少定位误差和重建算法误差。但是雷达和IMU 误差无法消除 +* 通过目前的测试结果,大疆L2 是满足不了当前的应用场景需求的。 +## 结论 +* 艾航-富锐开发的点云重建软件效果一般,四维图新有能力优化算法,但是算法不能提高雷达硬件本身的测量精度。最理想的效果也就和雷达标称的测量精度一个水平。 + +* 市面上现有的产品大疆L2(官方售价9.5W)是综合下来性价比最高的选择。如果L2还不能满足要求,继续提高精度,一个是价格上会比较贵,一个是体积可能太大,无人机带不动。 diff --git a/20240516激光雷达.md b/20240516激光雷达.md new file mode 100644 index 0000000..b79fcb2 --- /dev/null +++ b/20240516激光雷达.md @@ -0,0 +1,16 @@ + +## 三款雷达 +最佳R2E0-02G +小绝缘子 误差3厘米 +不同颜色反射率不一样 +单点测量5次,一个杆测量2次。 + +云台匀速扫描 正负5° +三层 +出光点,落在俯仰轴上 + +顺带测量杆塔真实位置。 +多次测量 + + +数据带时间戳 \ No newline at end of file diff --git a/C++ 标准库常用头文件.md b/C++ 标准库常用头文件.md new file mode 100644 index 0000000..2e55174 --- /dev/null +++ b/C++ 标准库常用头文件.md @@ -0,0 +1,206 @@ + +C++标准库提供了丰富的头文件,用于包含各种功能和数据结构。以下是一些常用的C++标准库头文件及其主要作用: + +1. **iostream**:输入和输出流操作,包括`cin`、`cout`、`cerr`、`clog`等。 + + cppCopy code + + `#include ` + +2. **iomanip**:输入输出流格式化操作,如`setw`、`setprecision`等。 + + cppCopy code + + `#include ` + +3. **fstream**:文件输入和输出流操作,用于文件的读写。 + + cppCopy code + + `#include ` + +4. **string**:字符串操作,提供了丰富的字符串处理函数和类。 + + cppCopy code + + `#include ` + +5. **vector**:动态数组,提供了可变大小的数组容器。 + + cppCopy code + + `#include ` + +6. **list**:双向链表容器。 + + cppCopy code + + `#include ` + +7. **deque**:双端队列容器。 + + cppCopy code + + `#include ` + +8. **queue**:队列容器,通常基于deque实现。 + + cppCopy code + + `#include ` + +9. **stack**:栈容器,通常基于deque实现。 + + cppCopy code + + `#include ` + +10. **map**:关联容器,实现键-值对的有序映射。 + + cppCopy code + + `#include ` + +11. **set**:关联容器,实现有序集合。 + + cppCopy code + + `#include ` + +12. **algorithm**:提供了各种常见算法,如排序、查找等。 + + cppCopy code + + `#include ` + +13. **numeric**:数值算法,提供了一些对数值进行操作的函数。 + + cppCopy code + + `#include ` + +14. **cmath**:数学函数库,提供了数学运算函数。 + + cppCopy code + + `#include ` + +15. **ctime**:时间和日期操作,提供了与时间相关的函数。 + + cppCopy code + + `#include ` + +16. **cstdlib**:通用工具函数,提供了一些通用的功能,如`atoi`、`rand`等。 + + cppCopy code + + `#include ` + +17. **cassert**:断言,用于在程序中插入调试断言。 + + cppCopy code + + `#include `C++标准库提供了丰富的头文件,用于包含各种功能和数据结构。以下是一些常用的C++标准库头文件及其主要作用: + +1. **iostream**:输入和输出流操作,包括`cin`、`cout`、`cerr`、`clog`等。 + + cppCopy code + + `#include ` + +2. **iomanip**:输入输出流格式化操作,如`setw`、`setprecision`等。 + + cppCopy code + + `#include ` + +3. **fstream**:文件输入和输出流操作,用于文件的读写。 + + cppCopy code + + `#include ` + +4. **string**:字符串操作,提供了丰富的字符串处理函数和类。 + + cppCopy code + + `#include ` + +5. **vector**:动态数组,提供了可变大小的数组容器。 + + cppCopy code + + `#include ` + +6. **list**:双向链表容器。 + + cppCopy code + + `#include ` + +7. **deque**:双端队列容器。 + + cppCopy code + + `#include ` + +8. **queue**:队列容器,通常基于deque实现。 + + cppCopy code + + `#include ` + +9. **stack**:栈容器,通常基于deque实现。 + + cppCopy code + + `#include ` + +10. **map**:关联容器,实现键-值对的有序映射。 + + cppCopy code + + `#include ` + +11. **set**:关联容器,实现有序集合。 + + cppCopy code + + `#include ` + +12. **algorithm**:提供了各种常见算法,如排序、查找等。 + + cppCopy code + + `#include ` + +13. **numeric**:数值算法,提供了一些对数值进行操作的函数。 + + cppCopy code + + `#include ` + +14. **cmath**:数学函数库,提供了数学运算函数。 + + cppCopy code + + `#include ` + +15. **ctime**:时间和日期操作,提供了与时间相关的函数。 + + cppCopy code + + `#include ` + +16. **cstdlib**:通用工具函数,提供了一些通用的功能,如`atoi`、`rand`等。 + + cppCopy code + + `#include ` + +17. **cassert**:断言,用于在程序中插入调试断言。 + + cppCopy code + + `#include ` \ No newline at end of file diff --git a/Linux(Ubuntu个人常用软件安装).md b/Linux(Ubuntu个人常用软件安装).md index 519d302..6d2283f 100644 --- a/Linux(Ubuntu个人常用软件安装).md +++ b/Linux(Ubuntu个人常用软件安装).md @@ -95,7 +95,6 @@ sudo update-alternatives --config gcc #### pyenv install 报错解决 -``` ```bash sudo apt update @@ -118,5 +117,3 @@ sudo apt install \ xz-utils \ zlib1g-dev ``` - -``` diff --git a/Ubuntu16 build and install python3.8.md b/Ubuntu16 build and install python3.8.md index 4fc104f..73ca507 100644 --- a/Ubuntu16 build and install python3.8.md +++ b/Ubuntu16 build and install python3.8.md @@ -14,6 +14,7 @@ sudo echo "libssl path" > /etc/id.so.conf sudo ldconfig openssl version +sudo echo "/usr/local/lib/libssl.so.1.1" > /etc/id.so.conf ``` @@ -21,7 +22,7 @@ openssl version ```bash sudo apt update sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev -wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz +wget https://mirrors.huaweicloud.com/python/3.8.9/Python-3.8.9.tgz tar -xf Python-3.8.9.tgz cd Python-3.8.9 ./configure --enable-optimizations diff --git a/clang-format.md b/clang-format.md new file mode 100644 index 0000000..45a79ca --- /dev/null +++ b/clang-format.md @@ -0,0 +1,12 @@ +clang-format -style=可选格式名 -dump-config > .clang-format + + +LLVM A style complying with the LLVM coding standards +Google A style complying with Google’s C++ style guide +Chromium A style complying with Chromium’s style guide +Mozilla A style complying with Mozilla’s style guide +WebKit A style complying with WebKit’s style guide +Microsoft A style complying with Microsoft’s style guide +GNU A style complying with the GNU coding standards + +ColumnLimit:     160 限制每行最大160列 \ No newline at end of file diff --git a/cmake 集成PROJ.md b/cmake 集成PROJ.md new file mode 100644 index 0000000..76c3fb2 --- /dev/null +++ b/cmake 集成PROJ.md @@ -0,0 +1,18 @@ + +```sh +git clone +mkdir build && cd build +cmake .. +make -j +sudo make install + +``` + + +```cmake + +find_package(PROJ REQUIRED CONFIG) +include_directories(${PROJ_INCLUDE_DIRS}) +target_link_libraries(MyApp ${PROJ_LIBRARIES} ) +target_link_libraries(MyApp PRIVATE PROJ::proj) +``` \ No newline at end of file diff --git a/cmake.md b/cmake.md new file mode 100644 index 0000000..507a718 --- /dev/null +++ b/cmake.md @@ -0,0 +1,12 @@ + +## message + +```cmake +# **_mode_** 的值包括 **FATAL_ERROR**、**WARNING**、**AUTHOR_WARNING**、**STATUS**、**VERBOSE**等。我主要使用其中的 2 个——**FATAL_ERROR**、**STATUS**。 + +# **FATAL_ERROR**:产生 CMake Error,**会停止编译系统的构建过程**; + +# **STATUS**:最常用的命令,常用于查看变量值,类似于编程语言中的 DEBUG 级别信息。 + +message(STATUS "result:${RET}") +``` diff --git a/docker.md b/docker.md index 5571854..983b13f 100644 --- a/docker.md +++ b/docker.md @@ -1,7 +1,17 @@ -## 容器开机自启 +**容器开机自启** ``` docker ps -qa docker update --restart=always 容器ID/容器名 docker update --restart=always 56f0b18af626 +``` + +**设置网络代理** + +```sh +sudo mkdir -p /etc/systemd/system/docker.service.d +sudo touch /etc/systemd/system/docker.service.d/proxy.conf +[Service] +Environment="HTTP_PROXY=http://127.0.0.1:7890/" +Environment="HTTPS_PROXY=http://127.0.0.1:7890/" ``` \ No newline at end of file diff --git a/ffmpeg 常用指令.md b/ffmpeg 常用指令.md new file mode 100644 index 0000000..f64a8ab --- /dev/null +++ b/ffmpeg 常用指令.md @@ -0,0 +1,23 @@ + +### 低延迟拉流播放 +```bash +ffplay -fflags nobuffer -flags low_delay -i "rtmp://120.26.0.57:1935/live/osdk_" +``` +### 拉流保存 +```bash +ffmpeg -i "rtmp://120.26.0.57:1935/live/osdk_" -c copy lynxi_ai.mp4 +``` +### 视频截取 +``` bash +# 00:00:30 开始时间,20 截取长度 +ffmpeg -ss 00:00:30 -i example.mp4 -t 20 -c copy output.mp4 +``` + +### 视频抽帧 + +```sh +# i input_video.mp4:指定输入视频文件。 +# -vf "fps=1":使用视频过滤器 (vf),以 1 帧每秒的速率抽取帧。 +# output_%04d.png:输出文件名格式,`%04d` 会生成四位数字的序号,例如 output_0001.png +ffmpeg -i input_video.mp4 -vf "fps=1" output_%04d.png +``` diff --git a/img/IMG_0470.HEIC.jpg b/img/IMG_0470.HEIC.jpg new file mode 100644 index 0000000..68575c4 Binary files /dev/null and b/img/IMG_0470.HEIC.jpg differ diff --git a/img/Pasted image 20231113152736.png b/img/Pasted image 20231113152736.png new file mode 100644 index 0000000..f6de1d6 Binary files /dev/null and b/img/Pasted image 20231113152736.png differ diff --git a/img/Pasted image 20240419134421.png b/img/Pasted image 20240419134421.png new file mode 100644 index 0000000..63d76b4 Binary files /dev/null and b/img/Pasted image 20240419134421.png differ diff --git a/img/Pasted image 20241108140251.png b/img/Pasted image 20241108140251.png new file mode 100644 index 0000000..c25a0ba Binary files /dev/null and b/img/Pasted image 20241108140251.png differ diff --git a/img/Pasted image 20241108140342.png b/img/Pasted image 20241108140342.png new file mode 100644 index 0000000..9de3c66 Binary files /dev/null and b/img/Pasted image 20241108140342.png differ diff --git a/img/Pasted image 20241108141440.png b/img/Pasted image 20241108141440.png new file mode 100644 index 0000000..6cebe28 Binary files /dev/null and b/img/Pasted image 20241108141440.png differ diff --git a/img/Pasted image 20241108144110.png b/img/Pasted image 20241108144110.png new file mode 100644 index 0000000..c250db4 Binary files /dev/null and b/img/Pasted image 20241108144110.png differ diff --git a/img/Pasted image 20241108151954.png b/img/Pasted image 20241108151954.png new file mode 100644 index 0000000..cf74b20 Binary files /dev/null and b/img/Pasted image 20241108151954.png differ diff --git a/img/Pasted image 20241108152104.png b/img/Pasted image 20241108152104.png new file mode 100644 index 0000000..1311ed2 Binary files /dev/null and b/img/Pasted image 20241108152104.png differ diff --git a/img/Screenshot_20240425-101537[1].png b/img/Screenshot_20240425-101537[1].png new file mode 100644 index 0000000..d3dabee Binary files /dev/null and b/img/Screenshot_20240425-101537[1].png differ diff --git a/img/cdc-acm.ko b/img/cdc-acm.ko new file mode 100644 index 0000000..f4da812 Binary files /dev/null and b/img/cdc-acm.ko differ diff --git a/img/cdc_ether.ko b/img/cdc_ether.ko new file mode 100644 index 0000000..e315e06 Binary files /dev/null and b/img/cdc_ether.ko differ diff --git a/img/rndis_host.ko b/img/rndis_host.ko new file mode 100644 index 0000000..3f60c50 Binary files /dev/null and b/img/rndis_host.ko differ diff --git a/img/uart_port.png b/img/uart_port.png new file mode 100644 index 0000000..304fe4f Binary files /dev/null and b/img/uart_port.png differ diff --git a/img/灵汐测试.png b/img/灵汐测试.png new file mode 100644 index 0000000..7a60ff7 Binary files /dev/null and b/img/灵汐测试.png differ diff --git a/img/灵汐软件运行.png b/img/灵汐软件运行.png new file mode 100644 index 0000000..9a0407f Binary files /dev/null and b/img/灵汐软件运行.png differ diff --git a/linux 自动加载ko驱动.md b/linux 自动加载ko驱动.md new file mode 100644 index 0000000..5c8ca5d --- /dev/null +++ b/linux 自动加载ko驱动.md @@ -0,0 +1,30 @@ + +要在Ubuntu 20上实现开机自动加载内核模块(.ko驱动),可以按照以下步骤进行操作: + +1. 确保你已经编译好了你的内核模块,并且拥有一个.ko文件。 + +2. 打开终端,使用以下命令将.ko文件复制到/lib/modules//目录下,其中是你当前正在使用的内核版本号: + + ``` + sudo cp your_module.ko /lib/modules/$(uname -r)/ + ``` + +3. 运行以下命令,将你的模块的信息添加到modules.dep文件中: + + ``` + sudo depmod + ``` + +4. 创建一个新的文件,以在系统启动时加载模块。在终端中运行以下命令: + + ``` + sudo nano /etc/modules-load.d/.conf + ``` + + 这里的是你想要加载的模块的名称。 + +5. 在打开的文件中,输入你的模块的名称,保存并关闭文件。 + +6. 重启你的系统。你的模块应该会在启动时自动加载。 + +这样,你的.ko驱动模块应该会在Ubuntu 20的启动时自动加载。请确保你的模块编译正确,并且与你的内核版本兼容。如果你的模块依赖其他模块,你也需要确保这些模块已正确加载。 \ No newline at end of file diff --git a/linux常用指令.md b/linux常用指令.md index 65a9016..21be201 100644 --- a/linux常用指令.md +++ b/linux常用指令.md @@ -1,5 +1,3 @@ -# linux 常用指令 - ### 基础指令 #### 查找并杀死进程 @@ -42,10 +40,10 @@ ssh-keygen -t rsa -C "yewuya0206@gmail.com" #生成密钥 #### 设置代理 ```sh +git config --global http.proxy http://127.0.0.1:7890 git config --global https.proxy http://127.0.0.1:7890 -git config --global https.proxy https://127.0.0.1:7890 -git config --global http.proxy 'socks5://127.0.0.1:7890' -git config --global https.proxy 'socks5://127.0.0.1:7890' +git config --global http.proxy 'http://192.168.110.159:7980' +git config --global https.proxy 'http://192.168.110.159:7980' ``` #### 修改已提交的commit @@ -86,4 +84,36 @@ curl -d "zoom=1" "http://192.168.5.14/api/v1/zoom" ``` stty -F /dev/ttySWK0 speed 115200 设置串口波特率 cat /dey/ttyUSB0 查看串口输出 +``` +#### 设置串口登录 +``` sh +sudo systemctl enable serial-getty@ttyS0.service +sudo systemctl start serial-getty@ttyS0.service +``` +#### ubuntu 20 配置静态IP + + +```yaml + +network: + version: 2 + renderer: NetworkManager + ethernets: + eth0: # 网卡名称 + dhcp4: no # 关闭dhcp + dhcp6: no + addresses: [192.168.110.12/24] # 静态ip + gateway4: 192.168.110.1 # 网关 + nameservers: + addresses: [8.8.8.8, 114.114.114.114] #dns + +``` + +## 串口操作 + +### 配置串口登录 + +```sh +sudo systemctl enable serial-getty@ttyS0.service +sudo systemctl start serial-getty@ttyS0.service ``` \ No newline at end of file diff --git a/nvidia jetson 部署torch和torchvision.md b/nvidia jetson 部署torch和torchvision.md new file mode 100644 index 0000000..052fa21 --- /dev/null +++ b/nvidia jetson 部署torch和torchvision.md @@ -0,0 +1,35 @@ +## 当前部署环境 +Jetpack 4.6 +Python 3.6.9 +cuda 10.2 + +## 安装版本 +torch 1.8.0 +torchvision 0.9.0 + +## 部署步骤 + +### 资源下载 +参考链接 +https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 +### 实际操作 + +```sh +sudo apt-get install python3-pip libopenblas-base libopenmpi-dev libomp-dev +sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libopenblas-dev libavcodec-dev libavformat-dev libswscale-dev + +pip3 install -U pip -i https://mirrors.aliyun.com/pypi/simple/ # 换源 +pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/ + +pip3 install Cython scipy uff protobuf tqdm Pillow numpy==1.19.4 seaborn==0.9.1 +pip3 install -U scipy +pip3 install torch-1.8.0-cp36-cp36m-linux_aarch64.whl # 安装torch +cd torchvision # 编译安装torchvision +export BUILD_VERSION=0.9.0 +python3 setup.py install --user +mkdir ~/.config/Ultralytics/ # 安装字体 +cp yolov5-6.1/fonts/* ~/.config/Ultralytics/ + +cd yolov5-6.1/ # 测试 +python3 detect_rectify.py +``` \ No newline at end of file diff --git a/opencv opencv-contrib build.md b/opencv opencv-contrib build.md new file mode 100644 index 0000000..2d17644 --- /dev/null +++ b/opencv opencv-contrib build.md @@ -0,0 +1,26 @@ + + ```bash +mkdir opencv_build +cd opencv_build +wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.3.zip +wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.3.zip +unzip opencv.zip +unzip opencv_contrib.zip +mkdir build +cd build +cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.5.3/modules/aruco/ ../opencv-4.5.3 +make -j +sudo make install +sudo ldconfig + +``` + + + +cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.5.3/modules/aruco/ ../opencv-4.5.3/ + + + + + + diff --git a/opencv 编译打包为静态库.md b/opencv 编译打包为静态库.md new file mode 100644 index 0000000..e88bb2f --- /dev/null +++ b/opencv 编译打包为静态库.md @@ -0,0 +1,17 @@ + + +```bash + +mkdir opencv_build +cd opencv_build +wget -O opencv.zip https://github.com/opencv/opencv_contrib/archive/4.8.1.zip +wget -O opencv_contrib.zip https://github.com/opencv/opencv/archive/4.8.1.zip +uzip opencv.zip +uzip opencv_contrib.zip +mkdir build && cd build + +cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.8.1/modules/aruco ../opencv-4.8.1/ +make -j4 +make install DESTDIR=./install + +``` diff --git a/rk3568开发问题.md b/rk3568开发问题.md new file mode 100644 index 0000000..1c9323f --- /dev/null +++ b/rk3568开发问题.md @@ -0,0 +1,36 @@ + +## 设备环境 + +系统Ubuntu20.04 Linux 内核 5.10.198 +只使用了核心板的uart 和两个网口。其他都用不到。 +调整了dts 文件。关闭了一些不需要用的设备,然后重新编译固件用厂家提供的工具刷入。 + +## 开发板 + +现在在开发板上是网口串口都正常的。 +## 自制底板 + +### 网口 +网口正常识别,使用netplan 配置静态IP 成功,但是使用网口和另一个设备直连无法ping通设备,两个设备都在同一个网段。 + +```yaml +network: + version: 2 + renderer: NetworkManager + ethernets: + eth0: # 网卡名称 + dhcp4: no # 关闭dhcp + dhcp6: no + addresses: [192.168.110.12/24] # 静态ip + gateway4: 192.168.110.1 # 网关 + nameservers: + addresses: [8.8.8.8, 114.114.114.114] #dns + +``` +### uart + +整体上应该通了,但是和其他设备使用高波特率(921600)通信时不稳定。会报错 +```log +tyS3: Frame error! +ttyS3: maybe rx pin is low or baudrate is not correct! +``` \ No newline at end of file diff --git a/切换cmake和gcc版本.md b/切换cmake和gcc版本.md index 871dc06..1f2ec37 100644 --- a/切换cmake和gcc版本.md +++ b/切换cmake和gcc版本.md @@ -34,6 +34,10 @@ export PATH=$CMAKE_HOME:$PATH ```shell sudo apt-get install -y gcc-7 g++-7 +sudo add-apt-repository ppa:ubuntu-toolchain-r/test +sudo apt update +sudo apt-get install gcc-11 +sudo apt-get install g++-11 ``` 查看已安装的版本 @@ -48,6 +52,13 @@ ls /usr/bin/gcc* sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 --slave /usr/bin/g++ g++ /usr/bin/g++-5 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 10 --slave /usr/bin/g++ g++ /usr/bin/g++-7 sudo update-alternatives --config gcc + + + + +sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 +sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 70 + ``` ## clang ### 安装 diff --git a/卡尔曼滤波.md b/卡尔曼滤波.md new file mode 100644 index 0000000..f69e36e --- /dev/null +++ b/卡尔曼滤波.md @@ -0,0 +1,50 @@ +已知四旋翼无人机如下条件 +1,GPS位置5hz频率刷新 +2,机体坐标系下xyz轴速度50hz频率刷新 +3,机体坐标系下xyz轴加速度50hz频率刷新 +4,无人机的姿态四元数50hz频率刷新 +要求考虑姿态四元数对速度和加速度在全局坐标系中的影响,并使用卡尔曼滤波器作为融合算法,如何调整下面代码 +``` +t_gps = 0:0.2:10; % 5Hz GPS时间向量 +t_imu = 0:0.02:10; % 50Hz IMU时间向量(速度和加速度) +% 假设数据已经准备好,并且已经加载到MATLAB中 +gpsData = [t_gps, gps_x, gps_y, gps_z]; +imuData = [t_imu, imu_vx, imu_vy, imu_vz, imu_ax, imu_ay, imu_az]; +quaternionsData[t_imu, w, x, y, z]; +% 初始化位置 +predicted_positions = zeros(length(t_imu), 3); + +% 假设初始位置为第一个GPS读数 +predicted_positions(1, :) = gpsData(1, 2:4); + +% 对速度和加速度进行积分以估计位置 +for i = 2:length(t_imu) + dt = t_imu(i) - t_imu(i - 1); + vel = imuData(i - 1, 2:4); + acc = imuData(i - 1, 5:7); + + % 前向欧拉积分来更新速度 + new_vel = vel + acc * dt; + + % 更新位置 + predicted_positions(i, :) = predicted_positions(i - 1, :) + new_vel * dt; + + % 如果当前时间是GPS更新时间,则进行调整 + if ismember(t_imu(i), t_gps) + gps_index = find(t_gps == t_imu(i)); + actual_position = gpsData(gps_index, 2:4); + % 这里可以添加一个融合算法来调整位置,例如简单的取平均 + predicted_positions(i, :) = (predicted_positions(i, :) + actual_position) / 2; + end +end + +% 绘制结果 +figure; +plot3(gpsData(:,2), gpsData(:,3), gpsData(:,4), 'r.'); +hold on; +plot3(predicted_positions(:,1), predicted_positions(:,2), predicted_positions(:,3), 'b-'); +legend('Actual GPS', 'Predicted Position'); +xlabel('X'); ylabel('Y'); zlabel('Z'); +title('GPS Position Estimation'); +grid on; +``` \ No newline at end of file diff --git a/大疆机库使用指北.md b/大疆机库使用指北.md new file mode 100644 index 0000000..81b2310 --- /dev/null +++ b/大疆机库使用指北.md @@ -0,0 +1,79 @@ +* 用数据线连接机库和遥控器进行配置。按照遥控器上的操作指引操作(接领航选择第三方服务,不要使选司空) +* 空旷的无遮挡的地方进行机库位置标定,环境条件满足的情况下一直无法定位要检测下电离层活跃情况,需要等到电离层平静期重新标定,一般早上和傍晚都是比较平静的。 +* 机库备降点设置 +* 确保机库和无人机对频,再遥控器切到B控,遥控器和无人机对频(可选) +* 机库要接220V市电,只有机库自身UPS是无法执行任务的 +* 下任务之前要关库、断开遥控器和机库的数据线连接、关闭配电柜门 + +第三方服务配置截图,下图是领航测试服的,正式服或者以后其他独立部署的服务地址需要联系研发 +![[Screenshot_20240425-101537[1].png]] + + + +```json +{ + "bid": "21c0f053-53f0-4e12-bcfc-eab208f04b48", + "tid": "c3b76b2a-49d6-48b2-82db-bcf69e24d1d8", + "timestamp": 1714372584862, + "method": "ota_create", + "data": { + "devices": [ + { + "file_name": "M3DT_10.01.16.04_pro.zip", + "file_size": 407771084, + "file_url": "https://terra-1-g.djicdn.com/cbcd35598c6a46819472eb8801a4c29e/Offline%20firmware/EA220/M3DT_10.01.16.04_pro.zip", + "firmware_upgrade_type": 3, + "md5": "8103298f6a525409f072349332740b05", + "product_version": "10.01.16.04", + "sn": "1581F6Q8D242U00CKHC0" + } + ] + } +} +``` + + +```json +{ + "bid": "c3b76b2a-49d6-48b2-82db-bcf69e24d1d8", + "data": { + "devices": [ + + ] + }, + "tid": "21c0f053-53f0-4e12-bcfc-eab208f04b48", + "timestamp": 1723459212599, + "method": "ota_create" +} +``` + +```json +{ + "bid": "21c0f053-53f0-4e12-bcfc-eab208f04b48", + "tid": "c3b76b2a-49d6-48b2-82db-bcf69e24d1d8", + "timestamp": 1714372584862, + "method": "ota_create", + "data": { + "devices": [ + { + "file_name": "M3DT_10.01.16.04_pro.zip", + "file_size": 407771084, + "file_url": "https://terra-1-g.djicdn.com/cbcd35598c6a46819472eb8801a4c29e/Offline%20firmware/EA220/M3DT_10.01.16.04_pro.zip", + "firmware_upgrade_type": 3, + "md5": "8103298f6a525409f072349332740b05", + "product_version": "10.01.16.04", + "sn": "1581F6Q83245600BE086" + }, + { + "file_name": "DOCK2_10.01.16.04_pro.zip", + "file_size": 485804702, + "file_url": "https://terra-1-g.djicdn.com/cbcd35598c6a46819472eb8801a4c29e/Offline%20firmware/EA220/DOCK2_10.01.16.04_pro.zip", + "firmware_upgrade_type": 3, + "md5": "64a085646fdc597e5edb750e79ff8d80", + "product_version": "10.01.16.04", + "sn": "7CTDM1D00B50B2" + } + ] + } +} +``` \ No newline at end of file diff --git a/大疆机库统计.md b/大疆机库统计.md new file mode 100644 index 0000000..ac6892e --- /dev/null +++ b/大疆机库统计.md @@ -0,0 +1,17 @@ + +| 名称 | 机库序列号 | 无人机序列号 | 位置 | +| :--------- | -------------: | :------------------: | --- | +| 青山玫瑰园 | 7CTDM6L00B8337 | 1581F6Q8D246J00G40BR | 临安 | +| 锦北中队 | 7CTDM6L00BFW4H | 1581F6Q8D246J00G2ZJP | 临安 | +| 森林湖中队 | 7CTDM6800BX03S | 1581F6Q8D246J00GG8PZ | 临安 | +| 湖光山社 | 7CTDM6F00BPE12 | 1581F6Q8D246J00G94M4 | 临安 | +| 青山社区卫生服务中心 | 7CTDM6L00BLEDX | 1581F6Q8D246J00GVTBK | 临安 | +| 执法中心 | 7CTDM1D00B50B2 | 1581F6Q83245600BE086 | 宁波 | +| 新碶 | 7CTDM1D00B2YK6 | 1581F6Q8D242U00CKHC0 | 宁波 | +| 高塘 | 7CTDM1L00B1N1P | 1581F6Q8D242U00CQ97P | 宁波 | +| 米兰 | 7CTDM1D00BPZWQ | 1581F6Q8D242S00CPTP4 | 宁波 | +| 测试 | 7CTDM3800BC412 | 1581F6Q8D244100C7KNP | 楼顶 | +| 云翔政务 | 7CTDM6M00B2GU1 | 1581F6Q8D245M00EJ082 | 台州 | +| 中岩数字 | 7CTDM5900B6PN2 | 1581F6Q8D245R00G2B24 | 台州 | +| 宁波珞珈 | 7CTDM3500BQ9D9 | 1581F6Q8D244M00CUT94 | 下沙 | + diff --git a/工作/艾航/Ubuntu20 ROS安装使用.md b/工作/艾航/Ubuntu20 ROS安装使用.md new file mode 100644 index 0000000..2796406 --- /dev/null +++ b/工作/艾航/Ubuntu20 ROS安装使用.md @@ -0,0 +1,54 @@ + +## 安装 + +```bash +sudo echo "deb https://mirrors.bfsu.edu.cn/ros/ubuntu/ focal main" >> /etc/apt/sources.list.d/ros-latest.list +sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 +sudo apt update +sudo apt install ros-noetic-desktop +sudo apt install ros-noetic-sensor-msgs +sudo apt install libusb-1.0-0-dev +sudo apt install libsdl2-dev +sudo apt install ffmpeg +sudo apt install libcurlpp-dev +#include +echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc +source ~/.bashrc + +``` +## 编译 + +```bash +mkdir -p catkin_ws/src #创建工作空间 +mv rospkg catkin_ws/src/ # 将ros包移动到工作空间中 +catkin_make # 编译 +``` +## 运行 + +需要开启三个终端 +#### 终端1 +```bash +roscore # 启动ros核心节点 +``` +#### 终端2 +```bash +cd catkin_ws +source devel/setup.sh # 使环境生效 +rosrun rospkg_name 执行文件 # rospkg_name 是包名 执行文件是cmake中的执行文件名称 +``` + +#### 终端3 +```bash +cd catkin_ws +source devel/setup.sh # 使环境生效 +rosbag play bag.bag # 发送ros消息 +``` + + + +``` + +/usr/include/aarch64-linux-gnu +/usr/lib/aarch64-linux-gnu/ + +``` \ No newline at end of file diff --git a/工作/艾航/linux openvpn 配置.md b/工作/艾航/linux openvpn 配置.md new file mode 100644 index 0000000..3fa891a --- /dev/null +++ b/工作/艾航/linux openvpn 配置.md @@ -0,0 +1,6 @@ + + +```sh +sudo cp yourfile.ovpn /etc/openvpn/yourfile.conf +sudo systemctl enable openvpn@yourfile +``` \ No newline at end of file diff --git a/工作/艾航/opencv aruco 目标检测.md b/工作/艾航/opencv aruco 目标检测.md index fd5d6d8..cefa853 100644 --- a/工作/艾航/opencv aruco 目标检测.md +++ b/工作/艾航/opencv aruco 目标检测.md @@ -5,5 +5,3 @@ ![image-20210630103122631](https://yewuyadeimagewall.oss-cn-hangzhou.aliyuncs.com/image-20210630103122631.png) ![image-20210630103210404](https://yewuyadeimagewall.oss-cn-hangzhou.aliyuncs.com/image-20210630103210404.png) - -262mm \ No newline at end of file diff --git a/工作/艾航/osdk 环境配置.md b/工作/艾航/osdk 环境配置.md new file mode 100644 index 0000000..24a8894 --- /dev/null +++ b/工作/艾航/osdk 环境配置.md @@ -0,0 +1,121 @@ + + + + + + +``` +sudo vi /etc/udev/rules.d/DJIDevice.rules + +SUBSYSTEM=="usb", ATTRS{idVendor}=="2ca3", MODE="0666" + +sudo usermod -a -G dialout $USER + +echo "deb https://mirrors.bfsu.edu.cn/ros/ubuntu/ focal main" >> /etc/apt/sources.list.d/ros-latest.list + +sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 + +echo "SUBSYSTEM=="usb", ATTRS{idVendor}=="2ca3", MODE="0666"" >> /etc/udev/rules.d/DJIDevice.rules +``` + + + +``` +sudo usermod -a -G dialout $USER + +echo "deb https://mirrors.bfsu.edu.cn/ros/ubuntu/ bionic main" >> /etc/apt/sources.list.d/ros-latest.list + +sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 + +echo "SUBSYSTEM=="usb", ATTRS{idVendor}=="2ca3", MODE="0666"" >> /etc/udev/rules.d/DJIDevice.rules + +sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.bfsu.edu.cn@g" /etc/apt/sources.list +sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.bfsu.edu.cn@g" /etc/apt/sources.list + +sudo apt update +sudo apt install ros-melodic-desktop-full +sudo apt install libsdl2-dev ros-melodic-nmea-comms libcrypto++-dev +sudo apt install libexosip2-dev + +echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc +source ~/.bashrc + +``` + +## 允许root 登录 +编辑sshd_config +sudo vim /etc/ssh/sshd_config +找到PermitRootLogin 取消注释 然后改为yes +重启ssh 服务 +service sshd restart + +``` +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +``` + + +## frp 配置 + +service 文件编写 +sudo vi /etc/systemed/system/frpc.service + +```shell + +[Unit] +# 服务名称,可自定义 +Description = frpcs server +After = network.target syslog.target +Wants = network.target + +[Service] +Type = simple +Restart=on-failure +RestartSec=5s +# 启动frps的命令,需修改为您的frps的安装路径 +ExecStart = /root/ah/frp_0.45.0_linux_arm64/frpc -c /root/ah/frp_0.45.0_linux_arm64/frpc.ini +ExecReload= /root/ah/frp_0.45.0_linux_arm64/frpc reload -c /root/ah/frp_0.45.0_linux_arm64/frpc.ini + +[Install] +WantedBy = multi-user.target +``` +开机自启 + +```shell +sudo systemctl daemon-reload # 刷新配置 +sudo systemctl start frpc # 启动clash.service +sudo systemctl enable frpc # 设置开机启动 +sudo systemctl status frpc +``` + + + +## crontab 开机自启 + +```shell + +@reboot sleep 2;bash shell.sh +``` +## ubuntu 文件系统修复 + +```shell +fsck -y /dev/sda1 # /dev/sda1 要修复的硬盘路径 +``` + + + + +### ros代码开机自启 + + +```shell +sudo apt-get install ros-melodic-robot-upstart #安装依赖 +rosrun robot_upstart install ah_psdk_ros/launch/main.launch #设置ros服务 +sudo systemctl daemon-reload && sudo systemctl start dji #启动ros 服务 +rosrun robot_upstart uninstall dji #删除开机自启服务 + +``` \ No newline at end of file diff --git a/工作/艾航/在做项目.md b/工作/艾航/在做项目.md new file mode 100644 index 0000000..de79ac7 --- /dev/null +++ b/工作/艾航/在做项目.md @@ -0,0 +1,6 @@ + + +| 项目编号 | 项目名称 | +| -------- | ------------------------ | +| AHXM0202 | (2023年)研发项目-星基RTK无人机适配研发 | +| AHXM0001 | (2024年)研发项目-激光雷达项目 | diff --git a/工作/艾航/机器狗.md b/工作/艾航/机器狗.md new file mode 100644 index 0000000..facae6f --- /dev/null +++ b/工作/艾航/机器狗.md @@ -0,0 +1,17 @@ + + +# 后端接口 +## http +### 添加航线 + +### 任务执行 +### 任务执行成功 +### 图片上传 + + +# mqtt + + + + +添加航线 \ No newline at end of file diff --git a/星基产品技术指标发展阶段要求和后续规划.md b/星基产品技术指标发展阶段要求和后续规划.md new file mode 100644 index 0000000..110a357 --- /dev/null +++ b/星基产品技术指标发展阶段要求和后续规划.md @@ -0,0 +1,23 @@ +**作者:** 吴金辉 **日期:** 2024-03-27 +## 技术指标发展阶段 + +| 技术指标 | 初期阶段 | 中期阶段 | 成熟阶段(参考的大疆参数) | 现阶段 | +| --------------- | ------------------ | ------------------- | ------------------- | --------------------------- | +| 飞控软件的航点飞行定位精度 | 比较平稳的到达目标点,误差在1m左右 | 无风或者微风情况下定位精度达到0.5m | 大部分天气情况下达到0.1m的定位精度 | 无风微风环境下航点定位误差0.2m~1m不等 | +| 飞控软件的各种安全措施 | 有办法及时手动获取飞机控制权即可 | 常见异常情况需要处理 | 能想到的情况都要有对应的处理逻辑 | 只有通过遥控器切档可以夺取控制权 | +| 不同天气情况下的飞控稳定性测试 | 无风天气测试 | 各种常见天气情况测试通过 | 极端天气测试通过 | 只进行了无风天气测试 | +| 星基板卡的RTK定位稳定性 | 电离层平静期可以连接RTK | 电离层不是非常活跃的时也可以连上 | 大部分情况都可以稳定连接 | 电离层活跃期很难连上。电离层平静期也不是100%连上。 | +| 对接领航平台的业务逻辑实现 | | | | 现有规划业务逻辑实现了,预计下周测试 | +| 封装SDK | | | | 还不确定以什么样的形式 | +### 注释 +- 对于飞控软件的航点飞行定位精度,这里使用的是无人机自身的RTK数据不是星基板卡的RTK数据。 +- 对于星基板卡的RTK定位稳定性,这里指满足板卡的要求的现场环境(卫星方位角20米无遮挡)之后的连接测试 +- 飞控软件的各种安全措施,主要是触发避障时,RTK连接断开时,低电量等情况的处理 +## 下一步的计划 +### 飞控算法 +现在版本的飞控算法流程跑通了,整体效果比最初版本好不少,如果底层算法不改的情况下,后续就是花大量时间调参优化效果。不过我个人认为现在这套算法的上限比较低,想达到大疆那种级别应该是不行的。后续想换成MPC(模型预测控制)不过需要先学习一段时间才行。 +### 星基板卡 +* 千寻的意思是整个星基服务受太阳和电离层活跃程度影响的,在比较活跃的情况下是很难连上RTK的,但是也可以换个别的厂家的板卡试试看 +* 根据我们自己简单测试的情况,底板的供电电路,无人机,都会产生电磁辐射影响星基板卡天线的搜星质量,不过缺乏专业检测仪器无法量化这个指标。这方面后续也要调整下。 +### 完善飞控细节 +* 异常安全措施,航线任务断点续飞,对外开放接口等功能也还需要花时间完善。 \ No newline at end of file diff --git a/星基产品说明.md b/星基产品说明.md new file mode 100644 index 0000000..0a814e4 --- /dev/null +++ b/星基产品说明.md @@ -0,0 +1,16 @@ +## 商品描述 +星基飞控,使用基于北斗高精定位技术并使用高精定位补偿技术,在无网络环境无地面站的环境下,实现高精度定位。同时基于高精度定位数据实现了一套航点飞行算法。用于满足山区等无网络环境地区的高精度巡检需求。 + +![[Pasted image 20240419134421.png]] +## 技术参数 + +| 型号 | 星基 | | +| ----------------- | -------------------- | --- | +| 悬停精度(无风或者微风环境) | 0.1m | | +| 位置数据精度(在高精度定位生效时) | 3厘米+ 1ppm | | +| 最大可承受风速 | 10m/s | | +| 电源电压 | 24V | | +| 功率 | 20w | | +| 适配机型 | 大疆行业系列无人机(需支持PSDK挂载) | | +| IP防护等级 | | | +| 工作环境温度 | - -20°C 至 50°C | | diff --git a/星基使用说明书.md b/星基使用说明书.md new file mode 100644 index 0000000..6b2223a --- /dev/null +++ b/星基使用说明书.md @@ -0,0 +1,30 @@ +## 硬件安装 + + + + + + + + +## 配套app使用 + +### 无网络环境下航线采集及复飞 + +#### 航线采集 +#### 航线复飞 +### 有网络环境下保存云端航线,无网络环境下复飞 +#### 航线创建 +#### 航线下载 +#### 航线复飞 + + + + + +## 常见问题 + + +## 调试方法 + + diff --git a/激光点云需求.md b/激光点云需求.md new file mode 100644 index 0000000..c310b42 --- /dev/null +++ b/激光点云需求.md @@ -0,0 +1,20 @@ + +### 点云重建 +根据雷达采集回来的数据进行三维重建。数据包含 点云数据、IMU数据、GPS数据 +### 点云分割 +根据重建后的点云,识别分割出点云中的配网杆塔,绝缘子,横担 +### 点云测量 +自动测量分割出来的横担的长度,绝缘子直径和高度 + +2024-10-28-艾航-四维图新-激光雷达竣工验收会议总结 + +背景条件 +雷达测量精度目标1cm +最终测量精度 = 无人机定位误差(1cm) + 激光雷达测量误差 + 重建算法误差 + IMU 传感器误差 +通过软件上的工作,可以减少定位误差和重建算法误差。但是雷达和IMU 误差无法消除 + +结论 +* 艾航-富锐开发的点云重建软件效果一般,四维图新有能力优化算法,但是算法不能提高雷达硬件本身的测量精度。最理想的效果也就和雷达标称的测量精度一个水平。 + +* 市面上现有的产品大疆L2(官方售价9.5W)是综合下来性价比最高的选择。如果L2还不能满足要求,继续提高精度,一个是价格上会贵,一个是体积可能太大,无人机带不动。 + diff --git a/激光雷达会议纪要——20230321.md b/激光雷达会议纪要——20230321.md new file mode 100644 index 0000000..c07b6ad --- /dev/null +++ b/激光雷达会议纪要——20230321.md @@ -0,0 +1,18 @@ + +## 需要提供的东西 +* 实物设备送去实验室测试。(绝缘子,横担,电线,水泥杆,每个类型的多种款式,比如多种材质的绝缘子) +* 不同杆塔的技术规范指标,最好是有案例图片吧。 +* 需要测试下飞机RTK的定位数据噪声范围,噪声过大需要滤波处理。 +* 目前需要数据,RTK定位信息,飞机的姿态和速度信息(都支持)。 +* 推动国网电科院制定竣工验收 激光雷达相关标准并做认证。 +## 他们提供的信息 +* 激光雷达在10M 距离下的精度是1cm 5M距离是0.5cm。 +* 应该是不做实时处理。只负责采数据,后续放服务器之类的慢慢处理。 +* 和激光雷达通信使用网口通信(现有的NX支持) +* 会根据算法需求设计一个适合的飞行路径。 +## 时间节点 +* 激光雷达根据送过去的设备做调整和测试,如果只是现有做调整半年左右,全新要一年。所以基本上明年才会有成熟一点的产品。 +* 争取4月定好技术规范书,之后开始干活 +## 特殊点 +* 可能要国产化替代,不使用英伟达的机载电脑。 +* 如果自动识别难度比较高可能先做高精度点云建模后手动测算。 \ No newline at end of file diff --git a/激光雷达开发环境配置.md b/激光雷达开发环境配置.md new file mode 100644 index 0000000..0401ba9 --- /dev/null +++ b/激光雷达开发环境配置.md @@ -0,0 +1,5 @@ +```sh + sudo apt install build-essential ccache python3-pip libpcl-dev libsdl2-dev libusb-1.0-0-dev ros-noetic-ros-base ros-noetic-sensor-msgs ros-noetic-nmea-msgs ros-noetic-tf fireflydev +sudo apt install tmux tldr screen git ros-noetic-robot-upstart +``` + diff --git a/激光雷达数据导出方式对比.md b/激光雷达数据导出方式对比.md new file mode 100644 index 0000000..8442fab --- /dev/null +++ b/激光雷达数据导出方式对比.md @@ -0,0 +1,40 @@ +## 现状 +数据采集使用大疆 pilot 完成 +采集完成后,需要将我们自制的雷达转接板卡取下来,再通过开发板上的操作将数据导出。 +导出的数据再提供给富锐的Windows 端测量软件使用 +## 方案一 +还是使用pilot 完成采集,但是现有雷达转接板卡需要改一版,增加一个SD卡槽,后续采集数据存入SD卡中。 +采集结束后将SD卡内的数据导入Windows 端测量软件使用。 +### 工作量 +* 软件(吴金辉),为板卡增加SD卡驱动,修改文件保存路径 +* 嵌入式(邹志学),在原有的基础上,通过加大板子面积或者厚度的方式,腾出空间放SD卡槽 +### 优点 +* 不需要MSDK 端开发,全部操作都在pilot 上完成。 +* 软件上的工作量比较小,整体工作量应该也是最小的。 +* 可以单独卖硬件+配套测量软件,不需要专门app 配合 (如果算的话) +### 缺点 +* 空间比较极限,想要增加SD卡槽有点困难,不过应该问题不大 +* pilot可供自定义的东西有限,基本只能做到开始采集,结束采集,采集过程需要手动操作,不过目前操作已经是非常简单了。 +## 方案二 +硬件方案不变,软件上使用MSDK 开发配套软件。雷达数据采集完成之后,通过大疆的接口,将数据传到遥控器上,遥控器再把数据导出。 +遥控器导出的数据再导入到Windows 端测量软件使用。 +### 工作量 +* MSDK (程晓康)PSDK(吴金辉)两边联调,通过大疆的接口将数据从雷达板卡传到遥控器中 +### 优点 +* 硬件上不需要做调整 +* 通过MSDK 配合可以实现点击开始后自动执行测量等其他pilot 上无法实现的操作(如果需要的话) +### 缺点 +* 通过大疆的接口传输文件这块接口听其他开发者说不太稳定,可能会踩坑,严重点可能最终无法实现这个功能。 + +## 方案三 +方案一和方案二的结合,硬件上增加一个SD卡槽,软件上使用MSDK 开发的app 实现点击开始后自动测试。数据导出使用SD卡导出。 +### 工作量 +* 软件(吴金辉),为板卡增加SD卡驱动,修改文件保存路径 +* 嵌入式(邹志学),在原有的基础上,通过加大板子面积或者厚度的方式,腾出空间放SD卡槽 +* MSDK (程晓康)PSDK(吴金辉)两边联调增加一些进阶功能 +### 优点 +* 数据导出比较方便 +* 可以实现更多复杂功能 +### 缺点 +* 整体工作量最大 + diff --git a/激光雷达竣工验收需求描述.md b/激光雷达竣工验收需求描述.md new file mode 100644 index 0000000..3e6100f --- /dev/null +++ b/激光雷达竣工验收需求描述.md @@ -0,0 +1,42 @@ +## 需求描述 + +* 使用无人机或者其他设备搭载测量设备,统计电力杆塔上的绝缘子、横担等器具的数量器具的尺寸、数量。 +* **横担要求测量误差小于5cm,绝缘子小于2cm** +* 测量距离10m 左右 +* 一根杆塔的测量时间小于5分钟 +* **当前的难点在绝缘子的测量。绝缘子使用激光雷达无法精确的被建模** +### 杆塔照片 +**下图黄色框是绝缘子,红色框是横担** +![[Pasted image 20241108140342.png]] + +**下图是一些不同的杆塔类型** +![[Pasted image 20241108144110.png]] + + +## 测试过的雷达 +### 参数指标 + +| 指标 | [大疆L1](https://www.dji.com/cn/support/product/zenmuse-l1) | [大疆L2](https://enterprise.dji.com/cn/zenmuse-l2/specs) | [数字绿土X3](https://www.lidar360.com/archives/portfolio/liair-x3) | [富锐R2(当前使用)](https://free-optics.com/product/info/4) | +| ------ | --------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------- | +| 测距精度 | 3 厘米@100 米 | 2cm@150m | 3 厘米@100 米 | 2cm | +| 系统精度 | 平面精度10cm@50m
高程精度5cm@50m | 平面精度:5厘米@150 米
高程精度:4厘米@150 米 | | | +| 测距随机误差 | 2cm | | 2cm | 1cm | +| 角分辨率 | 0.28° (垂直) × 0.03° (水平) | | 0.28° (垂直) × 0.03° (水平) | 0.1°(水平) | + +### 实测结果 +![[Pasted image 20241108152104.png]] + +## 当前使用方案 +* 无人机挂载单线激光雷达,对杆塔进行三维重建后。测量点云。 +* **当前横担在点云密度足够高的情况下测量误差在3~5cm** +* 绝缘子由于特征不突出,无法测量。 +**点云重建效果** +![[Pasted image 20241108141440.png]] +## 无人机性能指标 + +| 指标 | 参数 | +| ------ | --------------------------- | +| 定位精度 | 水平1cm ++1 ppm 垂直1.5cm+1 ppm | +| 最大挂载重量 | 1kg | +| 供电 | 13.6V ~17V / 4A | +| 云台角度精度 | 0.1° | diff --git a/灵汐osdk ros开发环境配置.md b/灵汐osdk ros开发环境配置.md new file mode 100644 index 0000000..bd09780 --- /dev/null +++ b/灵汐osdk ros开发环境配置.md @@ -0,0 +1,141 @@ +# 编译运行环境配置 + +## 配置硬件环境 + +### 硬件连接 + +*使用转接线typeC接口连接无人机OSDK接口,uart接口接入下图 Uart-TTL0,USB接口插入两个叠起来的USB口中的下面那一个* +![image-20210629094214655](img/uart_port.png) + + + +### 硬件驱动配置 + +*将drivers路径下cdc-acm.ko、cdc_ether.ko、rndis_host.ko 三个驱动文件放入 /lib/modules路径下,并将以下内容写入到/etc/init.d/load_driver.sh文件末尾* + +```bash +echo "load cdc acm" +insmod $LYNKOPATH/cdc-acm.ko + +echo "loading cdc_ether driver" +insmod $LYNKOPATH/cdc_ether.ko + +echo "loading rndis_host driver " +insmod $LYNKOPATH/rndis_host.ko +``` +### osdk 硬件运行环境配置 + +```bash + +echo "SUBSYSTEM=="usb", ATTRS{idVendor}=="2ca3", MODE="0666"" >> /etc/udev/rules.d/DJIDevice.rules # 添加dji usb 设备节点 + +sudo usermod -a -G dialout $USER  # 添加uart 读取权限 + +``` +## 配置软件环境 + +*由于ros无法使用sudo 权限启动程序,但是AI推理需要使用sudo 权限,所以下面操作都是使用root 用户执行* +### 换国内镜像源 +将/etc/apt/sources.list 的内容替换为以下内容 + +```bash +# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 +deb https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse +# deb-src https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse +deb https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse +# deb-src https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse +deb https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse +# deb-src https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse + +# deb https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse +# # deb-src https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse + +deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse +# deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse + +# 预发布软件源,不建议启用 +# deb https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse +# # deb-src https://mirrors.bfsu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse +``` +替换完成之后执行 +```bash +sudo apt update +``` +### 安装ros 环境 + +```bash + +sudo apt install gnupg1   + +sudo echo "deb https://mirrors.bfsu.edu.cn/ros/ubuntu/ focal main" >> /etc/apt/sources.list.d/ros-latest.list # 添加ros 源地址 + +sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 + +sudo apt update + +sudo apt install ros-noetic-ros-base  ros-noetic-nmea-msgs ros-noetic-sensor-msgs ros-noetic-nav-msgs ros-noetic-tf  # 安装ros 相关库 + +echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc  # 配置ros 环境变量 + +source ~/.bashrc + +``` +### apt 安装依赖库 + +```bash + +sudo apt install libavformat-dev libavcodec-dev     + +sudo apt install libopencv-dev libopencv-contrib-dev                                     + +sudo apt install libsdl2-dev libusb-1.0-0-dev + +sudo apt install build-essential + +sudo apt install libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-bad gstreamer1.0-plugins-rtp gstreamer1.0-plugins-ugly     + +sudo apt install libeigen3-dev   + +sudo apt install git + +``` +### 编译安装相关依赖库 +#### osdk +```bash +git clone https://github.com/dji-sdk/Onboard-SDK.git +cd Onboard-SDK +mkdir build && cd build +cmake .. +make -j4 && sudo make install +``` +#### websocketpp +```bash +git clone https://github.com/zaphoyd/websocketpp.git +cd websocketpp +mkdir build && cd build +cmake .. +make -j && sudo make install +``` +### 编译yolov5 plugin +*编译产物在yolov5_plugin/obj/ 路径下* + +```bash +cd yolov5_plugin/build +cmake .. +make -j +``` +## 编译运行 osdk_ros +### 编译 osdk_ros + +```bash +cd osdk_ros +catkin_make -j4  # 如果使用更多核心编译会导致编译过程中内存不足 +``` +### 运行项目 + +*运行之前要先打开osdk_ros/src/ah_osdk_ros/launch/mission.launch文件,检查pluginPath和modelPath的value是否正确,pluginPath是前面编译的yolov5 plugin产物的路径。  modelPath是算法模型的路径,在modules路径下有一个电力设备目标识别的模型yolov5s-6.1-device一个yolov5s基础模型yolov5s.6.1_110_abc* + +```bash +source devel/setup.sh +roslaunch ah_osdk_ros mission.launch +``` \ No newline at end of file diff --git a/灵汐机载电脑测试报告.md b/灵汐机载电脑测试报告.md new file mode 100644 index 0000000..8338d0b --- /dev/null +++ b/灵汐机载电脑测试报告.md @@ -0,0 +1,15 @@ +## 软件环境测试 +- [x] 依赖库安装 +- [x] 代码编译 +*下图为机载电脑软件编译结果* +![[Pasted image 20231113152736.png]] +- [x] 软件运行 +- *下图为机载电脑软件运行情况* ![[灵汐软件运行.png]] +- [x] 软件推流 + AI 实时推理 +## 硬件测试 +- [x] 连接无人机并和无人机进行数据交互 + *下图为机载电脑连接无人机* + +![[IMG_0470.HEIC.jpg]] +- [x] 获取无人机视频流 + *下图为机载电脑连接无人机获取视频流之后AI实时处理的效果* ![[灵汐测试.png]] \ No newline at end of file diff --git a/羚控无人机SDK需求清单.md b/羚控无人机SDK需求清单.md new file mode 100644 index 0000000..728e11d --- /dev/null +++ b/羚控无人机SDK需求清单.md @@ -0,0 +1,30 @@ +## 基础功能 +* 无人机基础数据获取,三轴速度,三轴加速度,实时位置,实时姿态(roll pitch yaw)电量 +* 接口传参直接控制无人机前后左右移动 +* 获取飞机各个传感器的状态,最好有个统一的错误管理工具,飞机的自身状态出现异常都往这里面报 +* 飞行日志以便分析问题 +* 避障信息获取,避障开关,最好可以指定开关水平避障或上下避障 +* RTK管理。RTK使用开关,RTK 所需要的配置输入 +## 航点任务管理 +### 基础功能 +* 任务创建,执行,暂停,恢复,结束 +*能实现到航点转动云台变焦拍照录像等动作也不一定完全需要以下功能* +* 航点动作类型 悬停 、变焦、 拍照、开始录像、结束录像、飞机偏航角、云台偏航角和俯仰角 +* 一个航点支持多个航点动作 +### 高级功能 +到达航点通知,执行航点动作通知 +断点续飞,任务执行中电量不足换电后可以继续执行 +## 相机(云台)管理 +### 基础功能: +* 拍照 录像 +* 相机文件(图片视频)下载到本地 +* 云台管理,控制云台偏航,俯仰 +### 进阶功能 +* 相机视频流管理,获取标准H264相机视频流(供机载计算机进行实时AI处理和推流) +* 推流功能,可以通过接口传入参数直接推流到指定推流服务器 +## 第三方挂载管理 +* 控制第三方挂载云台移动 +* 和第三方挂载可以进行实时通信,数据收发 +## 飞行模拟器功能 +*支持飞机连接模拟器进行调试,这样不需要全部都室外真机飞行测试* + diff --git a/设备管理部.md b/设备管理部.md new file mode 100644 index 0000000..07d3ad5 --- /dev/null +++ b/设备管理部.md @@ -0,0 +1,9 @@ +计划处 +技术处 技术方案 规范,规划。 +监控处 +直流处 +变电处 +输电处 +配电处 35kv 以下 + + \ No newline at end of file diff --git a/青山湖炸机分析.md b/青山湖炸机分析.md new file mode 100644 index 0000000..b3d41ed --- /dev/null +++ b/青山湖炸机分析.md @@ -0,0 +1,14 @@ + +1 遥控器信号微弱,并失联触发失控返航机制。 + +2 无人机在返航之后重新连上了遥控器。 + +3 app 有个机制和飞机失联后会重启。 + +3 app 还有个机制,每次重启都会重新设置飞机当前位置为返航点。(祖传代码 可以追溯到2022年了)。 + +上述四个条件叠加在一起导致无人机在返航重联到遥控器之后,app将飞机当前位置设置为返航点然后飞机就在返航途中降落了,因为按照新的返航点,飞机已经到达返航点了。正常是要降落的。 + +以上内容是根据大疆口头说的炸机日志和app代码得出的推论。大疆书面的日志分析报告还没正式出。 + +但有个比较奇怪的点是,在这之前。也出现过挺多次无人机失联后重连的情况,但没有出现青山湖这种情况。初步判断是之前每次无人机失联,现场人员都直接拔线不让app 运行,或者直接抢了控制权。 \ No newline at end of file