/AutonomousDrones

This repository will contain code and parameters for the Autonomous Drones project.

Primary LanguagePython

AutonomousDrones

This is a project to establish and execute a successful surveillance algorithm using multiple drones.

System and Software Versions -

OS: Ubuntu 18.04  
Gazebo: gazebo-9  
ROS: ROS melodic  
GCS: QGroundControl  
Python: python3.6.9 

Installations -

  1. Ubuntu

  2. Gazebo
    Please note that installation link might be updated to a later version of Gazebo!

  3. ROS

  4. ArduPilot
    Recommended: Fork and clone the above repo!

  5. QGroundControl
    Please note that we only require the installation for Ubuntu Linux!

Additional Setup -

In order to support a multi-drone framework, we need to make some additional changes -

  1. setup qgroundcontrol (QGC) to accept multiple vehicles -
    • Open QGC
    • navigate to the settings tab and click on Comm Links
    • Click Add
    • Fill in the vehicle TCP port as shown
    • Repeat for adding new vehicles on different TCP ports
    • Note: TCP ports for each vehicle are separated by a value of 100. Therefore, vehicle1 = 8100, vehicle2 = 8200, vehicle3 = 8300 ...

Simulation Prerequisite -

Simulation Setup -

  • Models

    • The models used in the environment are located in models
  • Worlds

    • The world files used for using these models in gazebo is located in worlds
  • Launch Files

    • The launch files used for using these models in gazebo is located in launch files
  • Scripts

    • The scripts for running simulations are located in scripts
    • The scripts for running on the drone's on-board computer are located in scripts
    • Description of the functionality of each script in this directory is mentioned as a comment at the beginning of the script file.

Simulation Usage -

Run each of the following steps in separate terminals -

  1. launch gazebo world:

    $ cd ~/catkin_proj/src/AutonomousDrones
    $ LaunchAPM.sh

  2. start ardupilot for multiple drones:

    $ cd ~/ardupilot/Tools/autotest
    $ ./multi-ardupilot.sh

  3. launch mavros for multiple drones:

    $ roslaunch iq_sim multi-am.launch

  4. start QGC:

    $ ./QGroundControl.AppImage

    • In QGC, navigate to the settings tab and click on Comm Links. Then, connect all three vehicles.
  5. Running Scripts:

    • Terminal 1

      $ cd ~/catkin_proj/src/AutonomousDrones/Simulation/scripts
      $ python3 drone1_mission.py

    • Terminal 2

      $ cd ~/catkin_proj/src/AutonomousDrones/Simulation/scripts
      $ python3 drone2_mission.py

    • Terminal 3

      $ cd ~/catkin_proj/src/AutonomousDrones/Simulation/scripts
      $ python3 drone3_mission.py

    • Terminal 4

      $ cd ~/catkin_proj/src/AutonomousDrones/Simulation/scripts
      $ python3 gcs_control.py