This repository contains a C++ library that enables interaction with DJI/RYZE Tello and Tello Edu drones
This README contains a quick overview of the repository. Please refer to the documentation for details.
- Table of contents
- Overview
- CMake Options
- Quickstart
- Build and run with SLAM
- Default joystick mappings
- Notes
- References
- Project paths (current & projected)
- Troubleshooting
Command/control methods
- Using a joystick
- Autonomously using a command queue
- Command line interface
Joystick mode
- The joystick is always active (though it's use can be safely removed by setting the CMake option
USE_JOYSTICK
toOFF
) - Commands from the joystick are continuously sent to the drone without waiting for a response
- Based on the controller used, the mappings might require modification
- The default controller is gameSirT1s; key/axis to value mappings for PS3 and 360 controller have been provided, though the mappings between the values to the commands sent to the drone might need modification
Autonomous mode
- This queue is always overridden by the joystick as a safety measure
- Using the joystick while the queue is executing pauses the queue, which will need to be restarted even when there is no longer additional input from the joystick
- Queue execution can be safely paused and resumed
- Commands can be dynamically added
- This mode enables (optional) command retries when a command does not receive any response from the drone
Command line interface
- A command line interface can be brought up by setting the CMake option
USE_TERMINAL
toON
- Like the joystick, the CLI will pause command queue execution
- To send a command to the drone, the command format is
SDK command
(eg: land) - To modify the queue via the terminal, the command format is
queue <function> <command>
wherefunction
: add, start, stop, addfront, clear, removenext, allowautoland, donotautolandcommand
: (required argument for some, not all, of the above)SDK command
(eg: queue start, queue addfront takeoff)
SLAM integration has been provided using the OpenVSLAM library.
SIMPLE
- Default
OFF
- When
OFF
the output to the screen will also print the line number and file number of the print statement as well as the log level (STATUS, DEBUG, INFO, WARN, ERR).
- Default
USE_JOYSTICK
- Default
ON
- When set to
ON
allows the use of a joystick to control the drone and exits if a joystick is not found at startup.
- Default
RECORD
- Default
OFF
- When set to
ON
records the video
- Default
RUN_SLAM
- Default
OFF
- When set to
ON
runs OpenVSLAM, creating a map of the area and localizing the drone
- Default
USE_TERMINAL
- Default
OFF
- When set to
ON
opens up an xterm that takes in lines and sends them as commands to the Tello (example:command
,takeoff
, etc)
- Default
USE_CONFIG
- Default
OFF
- When set to
ON
uses the config manager to create the Tello from the config fileconfig.yaml
- Default
sudo apt install libasio-dev libopencv-dev
git clone https://github.com/vss2sn/tello.git
cd tello
mkdir -p build && cd build
cmake ..
make -j4
./tello
Please refer to the documentation for details
Please note that mappings have been provided for PS3 and Xbox360 controllers as well, but they might require some tweaking. The default mapping is for the gameSirT1s.
The mappings include querying battery
, wifi
, etc as well as stop
, emergency
, and flip
commands.
Please refer to the documentation for details
- Due to the asynchronous nature of the communication, the responses printed to the command might not be to the command state in the statement (for example in case the joystick was moved after a land command was sent, the statement would read
received response ok to command rc a b c d
instead ofreceived response ok to command land
) - Travis CI is run with
cmake -DRUN_SLAM ..
with theinstall_openvslam.sh
script to ensure proper builds
- Joystick library - https://github.com/Notgnoshi/joystick
- h264decoder library - https://github.com/DaWelter/h264decoder
- OpenVSLAM - https://github.com/xdspacelab/openvslam
Please refer to the documentation for details
Please refer to the documentation for details