最新px4下配置gazebo步骤

前言:最新的代码已经不适用以前的gazebo安装步骤,现在新的步骤:

 sudo apt-get install gazebo9

 sudo apt-get install libgazebo9-dev
 
 sudo apt-get install libprotobuf-dev libprotoc-dev protobuf-compiler libeigen3-dev 

sudo apt-get install libgstreamer-plugins-base1.0-dev


cd ~/src/Firmware/Tools/sitl_gazebo
mkdir Build

# 设置插件的路径以便 Gazebo 能找到模型文件
  export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:$HOME/src/Firmware/Tools/sitl_gazebo/Build
# 设置模型路径以便 Gazebo 能找到机型
  export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:$HOME/src/Firmware/Tools/sitl_gazebo/models
# 禁用在线模型查找
  export GAZEBO_MODEL_DATABASE_URI=""
# 设置 sitl_gazebo 文件夹的路径
  export SITL_GAZEBO_PATH=$HOME/src/Firmware/Tools/sitl_gazebo

cd Build
cmake ..


make

cd ~/src/Firmware
make posix_sitl_default gazebo

你可能感兴趣的:(px4)