SathanBERNARD / PX4-ROS2-Gazebo-Drone-Simulation-Template

Template to set up a simulation environment for a quadcopter equipped with a camera. Uses PX4, Gazebo and ROS2. Enable the development and testing of software for a drone with a companion computer for mission planning and computer vision.
3 stars 0 forks source link
computer-vision drone gazebo px4 px4-autopilot px4-ros2 ros2 ros2-humble

PX4-ROS2-Gazebo Drone Simulation Template

This repository provides a template to set up a simulation environment for a quadcopter equipped with a camera. It integrates PX4, Gazebo Harmonic, and ROS2 Humble, enabling the development and testing of software for a drone with a companion computer. This environment is ideal for mission planning and computer vision applications. A Python example script is included to demonstrate how to control the drone and access the camera feed, serving as a starting point for further development.

Overview gif

Directory Structure

Installation

This setup is tested on Ubuntu 22.04 and is not compatible with its derivatives (e.g., Linux Mint).

  1. Clone the repository and run the installation script:

    cd ~
    git clone --recursive https://github.com/SathanBERNARD/PX4_Gazebo_ROS2_install_for_ubuntu.git
    cd ~/PX4_Gazebo_ROS2_install_for_ubuntu
    ./install_px4_gz_ros2_for_ubuntu.sh
  2. Copy the custom worlds and models into the PX4 installation:

    cd ~/PX4_Gazebo_ROS2_install_for_ubuntu
    cp -r ./PX4-Autopilot_PATCH/* ~/PX4-Autopilot/
  3. Install QGroundControl.

Usage (First Launch)

1. Launch QGroundControl

2. Start the Micro XRCE-DDS Agent

3. Run PX4 SITL and Gazebo

4. Build and Run the ROS2 Node (Companion Computer Software)