ubuntu 20.04 px4 gazebo
时间: 2023-10-11 22:12:42 浏览: 175
px4-gazebo-headless:一个非官方的基于 Ubuntu 的容器,通过 Gazebo 构建和运行 PX4 SITL(循环中的软件)
在Ubuntu 20.04上安装PX4和Gazebo的步骤如下:
1. 执行以下命令来安装PX4所需的依赖项:
```bash
sudo apt-get update
sudo apt-get install git zip qtcreator cmake build-essential genromfs ninja-build exiftool
sudo apt-get install python3-pip python3-empy python3-toml python3-numpy python3-yaml python3-pyqt5 python3-dev python3-setuptools python3-wheel -y
sudo apt-get install ant protobuf-compiler libeigen3-dev libopencv-dev openjdk-8-jdk openjdk-8-jre clang-format-10 nodejs npm -y
```
2. 克隆PX4仓库并切换到最新的稳定版本:
```bash
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot
git checkout stable
```
3. 构建PX4:
```bash
make px4_sitl_default gazebo
```
4. 安装Gazebo仿真器:
```bash
sudo apt-get install gazebo9 libgazebo9-dev
```
5. 最后,通过以下命令启动PX4和Gazebo仿真:
```bash
cd PX4-Autopilot
make px4_sitl gazebo
```
阅读全文