ubuntu16.04 px4编译

基本按照官方步骤:

改权限:

sudo usermod -a -G dialout $USER  

命令执行完要logout,然后再登录才会生效。

安装依赖项:

sudo add-apt-repository ppa:george-edison55/cmake-3.x -y  
sudo apt-get update  
sudo apt-get install python-argparse git-core wget zip python-empy qtcreator cmake build-essential genromfs -y   

仿真工具:

# simulation tools  
sudo apt-get install ant protobuf-compiler libeigen3-dev libopencv-dev openjdk-7-jdk openjdk-7-jre clang-3.5 lldb-3.5 -y 

卸载ubuntu代理管理工具(否则会干扰Ros等机器人工具的串口通讯)

sudo apt-get remove modemmanager

再装依赖项(Nuttx):

sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded -y  
sudo apt-get update  
sudo apt-get install python-serial openocd /
flex bison libncurses5-dev autoconf texinfo /
build-essential libftdi-dev libtool zlib1g-dev /  
python-empy gcc-arm-none-eabi -y

默认你有git:

mkdir -p ~/src  
cd ~/src  
git clone https://github.com/PX4/Firmware.git  
cd Firmware  
git submodule update --init --recursive  
cd ..

ps:如果没有必要还是clone 一个最新的稳定版吧……测试版……嗯……不说了

编译:

cd Firmware  
make px4fmu-v2_default

问题记录:

编译时提示说:

python import error:  No module named 'em'

Required python packages not installed.

On a Debian/Ubuntu system please run:

  sudo apt-get install python-empy
  sudo pip install catkin_pkg

On MacOS please run:
  sudo pip install empy catkin_pkg

On Windows please run:
  easy_install empy catkin_pkg
python import error:  No module named 'em'


Required python packages not installed.

On a Debian/Ubuntu system please run:

  sudo apt-get install python-empy
  sudo pip install catkin_pkg

On MacOS please run:
  sudo pip install empy catkin_pkg

On Windows please run:
  easy_install empy catkin_pk

按提示安装完后继续编译也不可行。

实际解决办法:

python -m pip install empy
python -m pip install toml

 

然后就OK了。

 

你可能感兴趣的:(ubuntu16.04 px4编译)