PX4 SITL ROS Example
This repo contains examples of PX4 SITL with Gazebo.
Cloning the repo
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>
Making the PX4.
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.
Compiling the examples
To compile the examples use catkin:
Running the examples
Running PX4 + Gazebo: