This repository was build as a reference for the setup and simulation of a mission done by a drone using PX4 and ROS2. In order to correctly launch the mission scripts for the simulated UAV, we need to first install and configure some programs and packages. This repo uses Px4 v1.14 (main version), MicroXRCE and Gazebo Garden.
After all the flight controller and the companion computer are fully setup, just plug in the main battery of the drone: it should automatically connect to the wifi network and automatically start the XRCE-Agent.
The companion computer will be ready when the ROS 2 topics of PX4 are available. To check for this use ros2 topic list
. Topics starting with /fmu/
should be present. If this does not happen in less than a minute the board didn't manage to connect to the wifi or a reboot of the XRCE-Agent is needed (this guide)
Once the topics are available the drone is completely ready to fly, just execute the offboard program.
Credits: Davide Morazzo, Ronald Cristian Dutu