ubuntu20.04 安裝PX4 1.13

step1_install_depenences.sh

#!/bin/bash
#install gazebo 11
#install protobuf 3.19.6

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow


# 將 empy 的版本調整爲3.3.4
pip3 uninstall empy
pip3 install empy==3.3.4


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install aptitude
sudo apt install git

step2_install_gazebo_ros.sh

#!/bin/bash


# 雖然已經安裝裏gazebo 11 但是報錯找不到gazeboConfig.cmake 依照網上的建議安裝
sudo apt install ros-$ROS_DISTRO-gazebo*

step3_install_GStreamer1.0.sh

# 需要安裝 GStreamer1.0 
#https://github.com/PX4/PX4-Autopilot/issues/13117

sudo apt install libgstreamer1.0-dev
sudo apt install gstreamer1.0-plugins-good
sudo apt install gstreamer1.0-plugins-bad
sudo apt install gstreamer1.0-plugins-ugly

step4_git_clone.sh

#!/bin/bash

export WS_DIR="/home/hao/Documents/wks_third_party"
export GIT_DIR=$WS_DIR/resource_source/PX4/v1_13_3
rm $GIT_DIR
mkdir $GIT_DIR -p
cd $GIT_DIR

git clone https://github.com/PX4/PX4-Autopilot.git --recursive -b v1.13.3

step5_git_version.sh

#!/bin/bash

export WS_DIR="/home/hao/Documents/wks_third_party"
export Autopilot_DIR=$WS_DIR/resource_source/PX4/v1_13_3/PX4-Autopilot
cd $Autopilot_DIR

git status
git branch -r | grep "release"
echo "----------------before check out--------------------------------------------------------"

git checkout origin/release/1.13

echo "----------------after check out--------------------------------------------------------"

git status

step6_config_ubuntu.sh

#!/bin/bash

set -o errexit
set -o verbose
export WS_DIR="/home/hao/Documents/wks_third_party"
export Autopilot_DIR=$WS_DIR/resource_source/PX4/v1_13_3/PX4-Autopilot

cd $Autopilot_DIR/Tools/setup

bash $Autopilot_DIR/Tools/setup/ubuntu.sh --fix-missing

step7_build_gazebo.sh

#!/bin/bash

export WS_DIR="/home/hao/Documents/wks_third_party"
export Autopilot_DIR=$WS_DIR/resource_source/PX4/v1_13_3/PX4-Autopilot
cd $Autopilot_DIR

make px4_sitl_default gazebo

step8_run_with_launch.sh

export WS_DIR="/home/hao/Documents/wks_third_party"
export Autopilot_DIR=$WS_DIR/resource_source/PX4/v1_13_3/PX4-Autopilot

source $Autopilot_DIR/Tools/setup_gazebo.bash $Autopilot_DIR $Autopilot_DIR/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$Autopilot_DIR
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$Autopilot_DIR/Tools/sitl_gazebo
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$Autopilot_DIR/Tools/simulation-ignition


roslaunch px4 mavros_posix_sitl.launch

相关推荐

  1. ubuntu20.04 PX4 1.13

    2024-04-06 11:04:01       16 阅读
  2. 手動wordpress方法

    2024-04-06 11:04:01       18 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-06 11:04:01       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-06 11:04:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-06 11:04:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-06 11:04:01       18 阅读

热门阅读

  1. 习题3-2 高速公路超速处罚

    2024-04-06 11:04:01       13 阅读
  2. 【系统架构设计师】- 知识点汇总(易错总结)

    2024-04-06 11:04:01       14 阅读
  3. MongoDB聚合运算符:$maxN

    2024-04-06 11:04:01       11 阅读
  4. 排忧解难:线上问题排查工具箱

    2024-04-06 11:04:01       13 阅读
  5. BitWise-Operation

    2024-04-06 11:04:01       13 阅读
  6. rknn3588 yolov5 学习笔记

    2024-04-06 11:04:01       14 阅读
  7. [C++][特殊类设计][单例模式]详细讲解

    2024-04-06 11:04:01       12 阅读