This project is a proof of concept for controlling a drone using hand gestures. The project is based on the pyparrot library.
The project is divided into two parts:
hand_gesture_recognition
which is responsible for detecting hand gestures and sending the appropriate command to the drone.drone_control
which is responsible for receiving the command from thehand_gesture_recognition
and controlling the drone.
This project uses the mediapipe library for hand gesture recognition.
- Ubuntu
- miniconda
- create
conda
virtual environment by running this command:
$~ make virenv
- activate the environment by running this command:
$~ conda activate parrot-env
- install requirements by running this command:
$~ make install
1- You have to connect to the drone WiFi network. Example: RS_XXXXXXXXXX
2- Run the main.py
file in the src
directory, using this command:
$~ python src/main.py
**BECAREFUL: BY RUNNING THIS COMMAND THE DRONE WILL TAKEOFF **
if you want to test the
FingersCounter
class, you can runtest.py
file in thesrc
directory, using this command:$~ python src/test.py
This is the list of commands to control the drone:
Finger | Command |
---|---|
0 | Land |
1 | Hover in place |
2 | pitch forward |
3 | pitch backward |
4 | roll right |
5 | roll left |
6 | yaw right |
7 | yaw left |
8 | go up |
9 | go down |
Here are some examples of the hand gesture recognition:
You can change the following parameters in the config.yaml
file:
Parameter | Description |
---|---|
min detection confidence | minimum hand detection confidence |
min tracking confidence | minimum hand tracking confidence |
take off altitude | altitude to take off to |
duration | duration of the command (the bigger the slower) |
You can test the project by running this command:
$~ make test
This project is based on the pyparrot library. It supports only the Bebop 2 drone.
No, you can use any laptop or desktop computer.
You can calibrate the hand gesture recognition system using the configurablesparameters in the config.yaml
file. Check the Configurable Parameters section for more details.
You can calibrate the drone control system using the configurable parameter duration
in the config.yaml
file. Check the Configurable Parameters section for more details.
You should be careful when using this project. You should be aware of the surroundings and make sure that there are no obstacles in the drone's path. You should also make sure that the drone is not flying too high out of the WiFi range.
Also you should take care when running the main.py
file. By running this file, the drone will takeoff. So make sure that you are in a safe place before running this file.
For testing the project without a Parrot Bepop 2 drone, you will be testing the hand_gesture_recognition
part only. To do that, you can run this command:
$~ python src/test.py
This project is licensed under the MIT License - see the LICENSE file for details
If you want to contribute to this project, you can do it by forking the project and creating a pull request.