PX4官方文档参考链接:
0. 概述
PX-Autopliot目前更新至v1.14(2024年6月9日)。本文参考官方文档给出下载历史版本(如v1.13)的方法。
1. 安装特定Release
- 下载PX4源码并切换至目录
git clone https://github.com/PX4/PX4-Autopilot.git cd PX4-Autopilot
- 切换Release
git checkout v1.13.3
- 更新子模块
make submodulesclean
2. 安装特定Branch
- 下载PX4源码并切换至目录
git clone https://github.com/PX4/PX4-Autopilot.git cd PX4-Autopilot
- 获取想要的Branch
git fetch origin release/1.13
- 切换到对应的Branch
git checkout release/1.13
- 更新子模块
make submodulesclean
3. 重复利用已有的PX4-Autopilot程序包
在已有程序包的情况下,可以通过清除旧编译文件的方式重复利用之,无需下载新的程序包。在PX4-Autopilot目录下,运行:
make clean
make distclean
之后按照1或2操作即可。
4. 手动清除不兼容文件
从1.14版本切换至1.13版本时,可能出现警告信息:
Directory not empty
此时可根据提示手动清理对应的文件。