/CTS-visual-drone-swarm

Code for the paper "Collaborative Target Search with a Visual Drone Swarm: Adaptive Curriculum Embedded Multistage Reinforcement Learning Approach".

Primary LanguagePythonMIT LicenseMIT

Collaborative Target Search with a Visual Drone Swarm: An Adaptive Curriculum Embedded Multi-stage Reinforcement Learning Approach

MIT License

Official project website for the paper "Collaborative Target Search with a Visual Drone Swarm: An Adaptive Curriculum Embedded Multi-stage Reinforcement Learning Approach"

If you are using the code, please give us a star 🌟 and cite our paper:

@ARTICLE{10322867,
  author={Xiao, Jiaping and Pisutsin, Phumrapee and Feroskhan, Mir},
  journal={IEEE Transactions on Neural Networks and Learning Systems}, 
  title={Collaborative Target Search With a Visual Drone Swarm: An Adaptive Curriculum Embedded Multistage Reinforcement Learning Approach}, 
  year={2023},
  volume={},
  number={},
  pages={1-15},
  doi={10.1109/TNNLS.2023.3331370}}

The updated video refers to the [https://youtu.be/jnVLEBWte1U].

Pipeline

Demo

Environment 1 (Env 1)

Environment 2 (Env 2)

Table 1: Target Distribution for Env 2, Unit: m

Position 1 Position 2 Position 3 Position 4 Position 5 Position 6 Position 7 Position 8 Position 9
x 2.88 0.25 1.84 -0.45 -1.78 -2.38 -2.38 2.08 2.05
y 4.63 4.29 6.33 6.48 6.47 5.41 1.81 1.49 3.46
z 0.27 0.24 0.24 0.20 0.18 0.19 0.26 0.31 0.28

Setup

  1. pip install -r requirements.txt to set up the dependencies and software requirements. This result of running this command does not include ROS installation. This requirement is tested on an AMD64 architecture device running Ubuntu 20.04 and ROS Noetic.
  2. Connect the computing center to the same network used by the OptiTrack Mocap Server. It is recommended that the ethernet cable is used for this connection to avoid using multiple wireless adapters.
  3. Configure Motive application on the OptiTrack Mocap Server to stream data related to drones to address location 192.168.1.100
  4. Edit sample.launch default launch file of vrpn_client_ros (use roscd vrpn_client_ros && cd launch to navigate to the launch file) to change the IP address from localhost to 192.168.1.100, used by the OptiTrack Mocap Server
  5. Connect a DJI Tello Edu drone using wireless adapter directly or docker container (please refer to the extra instruction)

Running Program

  1. Navigate to the repository folder
  2. Type in the terminal cd Control
  3. Type in the terminal python3 single_drone_control.py for controlling a single drone or python3 collaborative_two_drones_control.pyfor controlling two drones using one computing device for each drone

Programs List

  1. /Models/

    1.1. VisualDrone_single_drone.onnx: Trained neural network model file for single drone target search in ONNX format
    1.2. VisualDrone_collaborative_drones.onnx: Trained neural network model file for collaborative two drones target search in ONNX format
  2. /Control/

    2.1. single_drone_control.py: Python script file for controlling the single drone target search using the model in (1.1)
    2.2. collaborative_two_drones_control.py: Python script file for controlling the collaborative two drones target search using the model in (1.2)

System Requirement

  1. Ubuntu 18.04 or 20.04
  2. AMD architecture device (Strongly recommended, but not required)

Dependencies and Software Requirements

  1. ROS Melodic or Noetic
  2. TelloPy library (https://github.com/hanyazou/TelloPy)
  3. PyAV library (https://github.com/PyAV-Org/PyAV)
  4. vrpn_client_ros ROS 1 Package (http://wiki.ros.org/vrpn_client_ros)
  5. ONNX Runtime
  6. Torchvision
  7. OpenCV
  8. PIL library
  9. NumPy