Giter Club home page Giter Club logo

tello-edu-py's Introduction

tello-edu-py

Tello EDU 2.0 SDK API implemented in Python. pre-commit

Building

  1. Install build dependencies
~/tello-edu-py $ pip install -r requirements/build
  1. Build as a module via pip
~/tello-edu-py $ pip install . # must be in root of project

Usage

Since this is a wrapper library for the Tello EDU protocol, follow instructions for setting up a Tello EDU drone before proceeding.

Requirements

  • python 3.11.x

Examples of how the tello-edu-protocol library is used can be found under examples/.

Simple example with movement:

import asyncio
import tello_edu_protocol as tello
from tello_edu_protocol.commands import (
    takeoff,
    cw,
    forward,
    land
)


async def main() -> None:
    # timeout in seconds (20s) means that the library will
    # wait 20 seconds for a response before throwing an error.
    # Every command called for `drone` shares this timeout duration.
    # Command list can be found under `tello-edu-protocol/commands.py`
    # and corresponds to the SDK documentation.
    async with tello.conn(timeout=20) as drone:
        await drone.command(takeoff)      # send takeoff command
	await drone.command(forward, 40)  # fly forward 40cm
	await drone.command(cw, 180)      # turn around (180deg)
	await drone.command(forward, 40)  # fly forward 40cm
	await drone.command(land)         # land drone


if __name__ == '__main__':
    asyncio.run(main())

Contributing

While this project is intended for use by our lab group, contributions are welcome.

  1. Clone this repository
~ $ git clone https://github.com/zaruhev/tello-edu-py
  1. In tello-edu-py, install dev dependencies
~/tello-edu-py $ pip install -r requirements/dev

Unit Testing

Unit tests should be written under tests/. At the base of tests/ is a requirements.txt which should be used to install dependencies before testing. requirements/dev must also be installed?

~/tello-edu-py $ pip install -r tests/requirements.txt

To run tests, call test.py located in the base directory.

~/tello-edu-py $ py test.py

Note: It is required that this test is run using a 3.11 version of python. If your machine natively has a different version of python, install python v3.11.x and run test.py via that version:

~/tello-edu-py $ /path/to/python3.11 test.py

Changelog

v0.2.0 - Added functional components for the drone commands. See examples.

tello-edu-py's People

Contributors

linux-techtips avatar makichiis avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

athaun

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.