This repo contains examples of PX4 SITL with Gazebo.
The PX4 firmware is installed as git submodule. The examples here assume to use that code without modifications, and it is separated from the
src/ directory. To clone this repo, you need to use the following command instead of the regular
git clone --recursive <project_url>
Before running anything, you need to make the PX4 Firmware, follow the instruction here executed in the directory
/px4-firmware. The last step of those instructions could be:
make px4_sitl gazebo
And then ctl+c to turn off the execution when successfully you see the drone on Gazebo.
More information about other targets could be found here
This code depends on a few packages most of them are already installed on a full-desktop-ROS installation and the compilation of the PX4 firmware. In addition to that, you need to install MAVROS.
To compile the examples use catkin:
Running PX4 + Gazebo: