vss2sn / tello

A C++ library for the Tello and Tello Edu. Features joystick control, command line control, command queues and SLAM.
https://vss2sn.github.io/tello/
21 stars 5 forks source link
autonomous-quadcoptor command-line cpp joystick noros openvslam queue-commands slam slam-algorithms tello tello-drone tellodrone telloedu

Tello

This repository contains a C++ library that enables interaction with DJI/RYZE Tello and Tello Edu drones

Build Status

This README contains a quick overview of the repository. Please refer to the documentation for details.

Table of contents

Overview

Command/control methods

  1. Using a joystick
  2. Autonomously using a command queue
  3. Command line interface

Joystick mode

Autonomous mode

Command line interface

SLAM integration has been provided using the OpenVSLAM library.

CMake options

  1. 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).
  2. 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.
  3. RECORD
    • Default OFF
    • When set to ON records the video
  4. RUN_SLAM
    • Default OFF
    • When set to ON runs OpenVSLAM, creating a map of the area and localizing the drone
  5. 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)
  6. USE_CONFIG
    • Default OFF
    • When set to ON uses the config manager to create the Tello from the config file config.yaml

Quickstart

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

To build and run with SLAM

Please refer to the documentation for details

Default joystick mappings

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

Notes

  1. 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 of received response ok to command land)
  2. Travis CI is run with cmake -DRUN_SLAM .. with the install_openvslam.sh script to ensure proper builds

References

  1. Joystick library - https://github.com/Notgnoshi/joystick
  2. h264decoder library - https://github.com/DaWelter/h264decoder
  3. OpenVSLAM - https://github.com/xdspacelab/openvslam

Project paths (current & projected)

Please refer to the documentation for details

Troubleshooting

Please refer to the documentation for details