本教程尚未完成,有问题可以交流
在看完PX4无人机环境开发文档中,发现其中服务器已使用ubuntu作为开发系统,里面虽有centos 但是经过实践坑也不少,现在写下文档希望可以帮助别人
1.项目基本安装我就不说了,自己看一下文档
https://px4.osdrone.net/index.html
2.准备环境
这里说一下文档中说的epel-release-7-5.noarch.rpm已经过时了新的是
epel-release-7-11.noarch.rpm其他不变
wget https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-11.noarch.rpm
sudo yum install epel-release-7-11.noarch.rpm
yum update
yum groupinstall “Development Tools”
yum install python-setuptools
easy_install pyserial
easy_install pexpect
yum install openocd libftdi-devel libftdi-python python-argparse flex bison-devel ncurses-devel ncurses-libs autoconf texinfo libtool zlib-devel cmake
在安装完成后需要安装pip 和screen
- Ninja 系统环境构建按照官方文档没出错
- 代码编译
mkdir -p ~/src cd ~/src git clone https://github.com/PX4/Firmware.git cd Firmware git submodule update --init --recursive cd ..
5.Cmake的安装
https://cmake.org/
官网下载二进制安装包然后配置环境变量
出现cmake version 3.13.4成功
错误
CMake Error at CMakeLists.txt:263 (project):
The CMAKE_CXX_COMPILER:
arm-none-eabi-g++
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:263 (project):
The CMAKE_C_COMPILER:
arm-none-eabi-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:263 (project):
The CMAKE_ASM_COMPILER:
arm-none-eabi-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.