- Notifications
You must be signed in to change notification settings - Fork0
Unmanned Aerial Vehicle Pose-based Control
License
filipdutescu/uavpc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A small utility intended to be used with a Raspberry Pi and MPU 6050 IMU. Its goalis to control the flight of a drone using hand gestures (made with the MPU 6050)and display its video feed. It can also detect poses in the video stream throughOpenPose.
The names comes from the initial goal, of using the body poses to control the flightof the drone, but due to the unreliable nature of the UDP protocol used in my droneto send the video stream, it was unreliable. This lead to changing it to use gesturesmade with the MPU 6050.
- Gesture recognition with the MPU 6050 using a Kalman filter. Supported gesturesinclude rotations around the X and Y axis of the IMU.
- Keyboard commands (as seen in the
uavpc::Joystick
class) for:- Sending commands to the drone, to compensate lack of more gestures
- Toggling on/off pose recognition
- Toggling on/off video stream saving
- Drone control using either commands or gestures.
- Currently supported drones: DJI Tello (and any drone using the same API by usingthe existing classes).
These instructions will get you a copy of the project up and running on your localmachine for development and testing purposes.
The project is meant to run on a Raspberry Pi, connected to a MPU 6050 IMU and aDJI Tello Drone. While not required, I found that using USB tethering on mysmartphone was a sufficient way to control the Raspberry Pi in a desktop mode(using VNC).
- CMake v3.15+ - found athttps://cmake.org/
- C++ Compiler - needs to support at least theC++17 standard, i.e.GCC,Clang
- OpenPose v1.7.0 - found athttps://github.com/CMU-Perceptual-Computing-Lab/openpose
- In order to makeOpenPose v1.7.0work withOpenCV 4.5.0, I used the patch foundatvendor/openpose-opencv4.patch.
- OpenCV 4.5.0 - found athttps://github.com/opencv/opencv
- Linux Kernel I2C module - found in the official repos of ArchLinux, RaspbianOSand Ubuntu. Also found athttps://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/
- Catch2 (for tests) - found athttps://github.com/catchorg/Catch2/
Note:You also need to be able to provideCMake a supportedgenerator.
It is fairly easy to install the project, all you need to do is clone or downloadit fromGitHub.
If you wish to clone the repository, rather than download it, you simply needto run:
git clone https://github.com/filipdutescu/uavpc.git
To install analready built project, you needto run theinstall
target with CMake. For example:
cmake --build build --target install --config Release# a more general syntax for that command is:cmake --build<build_directory> --target install --config<desired_config>
or
make install
which will also build the project.
To build the project, all you need to do,after correctlyinstalling the project, is run a similarCMake routineto the the one below:
mkdir build/&&cd build/cmake .. -DCMAKE_INSTALL_PREFIX=/absolute/path/to/custom/install/directorycmake --build. --target install
or
make release
Note:The custom
CMAKE_INSTALL_PREFIX
can be omitted if you wish toinstall inthe default install location.
In order to generate documentation for the project, you need to configure the buildto use Doxygen. This is easily done, by modifying the workflow shown above as follows:
mkdir build/&&cd build/cmake .. -Duavpc_ENABLE_DOXYGEN=1 -DCMAKE_INSTALL_PREFIX=/absolute/path/to/custom/install/directorycmake --build. --target doxygen-docs
Note:This will generate a
docs/
directory in theproject's root directory.
By default, the template usesCatch2 forunit testing. Unit testing can be disabled in the options, by setting theENABLE_UNIT_TESTING
(fromcmake/StandardSettings.cmake) to be false. To runthe tests, simply use CTest, from the build directory, passing the desireconfiguration for which to run tests for. An example of this procedure is:
cd build# if not in the build directory alreadyctest -C Release# or `ctest -C Debug` or any other configuration you wish to test# you can also run tests with the `-VV` flag for a more verbose output (i.e.#Catch2 output as well)
To build and run tests you can also use:
maketest
Please readCONTRIBUTING.md for details on our how you canbecome a contributor and the process for submitting pull requests to us.
This project makes use ofSemVer for versioning. A list ofexisting versions can be found in theproject's releases.
- Filip-Ioan Dutescu -@filipdutescu
This project is licensed under theApache 2.0- see theLICENSE file for details.
About
Unmanned Aerial Vehicle Pose-based Control