These tools were used to ease the development and testing of my bachelor thesis on autonomous, social-aware drones. The available tools are based in the Parrot Drone SDK.
If you are using a DJI Tello Ryze drone, check out tello_tools.
The control
module allows to control the drone, either being simulated or not.
controller
allows to control a real-life Anafi drone.controller_sim
allows to control a simulated Anafi drone.
The processing
module contains methods and algorithms that process the data obtained from the drone and the environment. These algorithms usually produce intermediate results and return a final result, commonly the velocity twist used to control the drone.
human_tracking
object_tracking
asfm
is the former Aerial Social Force Model that moves the drone with a NN in the background.asfm_recurrent
is a sub-module that processes the environment and drone data to train a RNN which moves the drone.
Some of these methods have been previously tested in the Jupyter notebooks found at $root/notebooks
, as well as test data at $root/data/test_data
.
The streaming
module contains methods that handles the data streams created either by the simulator or the drone driver.
video_streaming_tlm
handles the camera streaming from the simulator.video_streaming_drv
handles the camera streaming from the drone driver.telemetry
handles the simulator stat data stream.sim_objs
handles the simulator object data stream, which is non-variant (static).optitrack
handles the OptiTrack stat data stream.
The teleop
module allows to control the drone by using teleoperators. The use for real-life runs can be specified either from the command line or by using flags.
joystick
allows to control the drone with a Gamepad or Joystick controller.keyboard
allows to control the drone with a keyboard.
Take into account that the drone can be controlled with a phone app, but this must be set up in both the simulator and the real-life drone driver.
The utils
module adds up cross-module methods.
The simulator run is described in the simulator.py
source file.
The simulator is built in such a way that it generates a simulated en-vironment, which must be defined following a strict format in a text file,and which is specified when the simulator is launched. During the simu-lation an output text file is generated each time the simulation is updated,which happens at a frequency of 30Hz. The directory where the output ofthe simulator is stored must be specified when it is launched. The simula-tion ends when the condition that ends the simulation (explained below) ismet. Thus, the information generated by a single run of the simulator fora given environment is a directory with as much output files as simulatediterations. Each output file contains the position of all the objects in the en-vironment so that it is possible to compute any distance between any pairof objects, and consequently any interaction force.
EXCLAIMER: Try to run it in the simulator first
The real-life run is described in the freeflight.py
source file.
(used for A*): https://medium.com/@nicholas.w.swift/easy-a-star-pathfinding-7e6689c7f7b2