Giter Site home page Giter Site logo

iradnuriel / ctello Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.2 MB

extention to the ctello library that allow controlling multiple drones if they are on the same network and have diffenrent IP addresses.

License: GNU General Public License v3.0

CMake 2.14% C++ 97.86%

ctello's Introduction

CTello

CTello is a C++ library to interact with the DJI Ryze Tello Drone using the Tello SDK 2.0. The purpose of this project is to encapsulate the UDP socket communication and provide a clean and easy-to-use interface to control the drone. However, CTello has no clutter that might hide parts of the Tello communication protocol, or restrict the interaction with the device in any way. CTello is transparent to the commands that are sent or responses that are received and gives full control to the user over the drone.

See the Tello SDK 2.0 User Guide

Dependencies

This project was developed and tested with the versions listed below.

Name Version
C++ 17
C++ compiler GCC 9.3.0, Clang 9.0.1
CMake 3.17
spdlog 1.5.0-1
OpenCV 4.2.0-2

Build & install

Clone the repository:

git clone [email protected]:carlospzlz/ctello.git

Build it:

mkdir build
cd build
cmake ..
make -j

Install it:

sudo make install

This will install the library plus some tools in /usr/local.

Quickstart

Now you can write a very simple program like this:

#include "ctello.h"

int main()
{
    ctello::Tello tello;
    if (!tello.Bind())
    {
        return 0;
    }

    tello.SendCommand("takeoff");
    // Wait for response
    while (!(tello.ReceiveResponse()));

    tello.SendCommand("flip b");
    while (!(tello.ReceiveResponse()));

    tello.SendCommand("land");
    while (!(tello.ReceiveResponse()));

    return 0;
}

Build it:

g++ -std=c++17 -I/usr/local/include flip_world.cpp /usr/local/lib/libctello.so -o flip-world

Switch on your Tello and connect to its Wi-Fi.

Run your flip-world (you may need to add /usr/local/lib to your LD_LIBRARY_PATH):

./flip-world

You can also enable logging output to see in detail what's going on:

env SPDLOG_LEVEL=debug ./flip-world

CTello executables

This project includes some executables built on top of the CTello library.

ctello-command

Emulates a command line interpreter to send commands to the drone.

ctello-state

Receives the state of the drone and shows a table with the different fields.

ctello-stream

Receives the video stream from the drone and displays it in an OpenCV window.

CTello examples

Two examples are included.

flip

Very simple example, similar to the previous flip-world.

follow

This example shows case how image processing can be used to drive the drone's actions. Here, we try to follow a light by steering the drone towards it.

ctello's People

Contributors

carlospzlz avatar tzukpolinsky avatar iradnuriel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.