Skip to main content

Python package for Drone Applications

Project description

This is a python library which a user can import in the python script and can control the drone through flytbase platform.

Steps to use this library:

  1. Install the package by typing in terminal: pip install flyt-python

  2. Open terminal and install Redis-server by typing sudo apt-get install redis-server

  3. Download Flytsim Docker.

  4. Follow the Documentation and launch the Docker.

  5. Activate and Register Flytsim docker device using Flytbase Platform and get Vehicle ID and Personal Access Token.

  6. Go to the folder where library exists, open terminal and type python3 daemon.py and press Enter.

  7. Now try running the demo apps present in the Demo Apps folder.

    Demo App 1: This demo app makes the robot takeoff, move in a square trajectory of side length provided as an argument to the script and land once the entire mission is over.

    from flyt_python.flyt_python import DroneApiConnector
    token = ''                      # Personal Access Token
    vehicle_id = ''                 # Vehicle ID
    drone = DroneApiConnector(token,vehicle_id, ip_address='localhost',wait_for_drone_response =True)
    # Initialize the drone's connection`
    drone.connect()
    print("Taking Off")
    drone.takeoff(5)
    print("Drawing square with side = 5")
    drone.set_local_position(x=5, y=0, z=0, body_frame=True)
    drone.set_local_position(x=0, y=5, z=0, body_frame=True)
    drone.set_local_position(x=-5, y=0, z=0,body_frame=True)
    drone.set_local_position(x=0, y=-5, z=0,body_frame=True)
    drone.land()
    #disconnect the drone
    drone.disconnect()
    

    Demo App 2: This demo app make the robot takeoff, and hover, then print the voltage, current and remaining battery percentage.

    from flyt_python.flyt_python import DroneApiConnector
    token = ''          # Personal Access Token
    vehicle_id = ''     # Vehicle ID
    
    drone = DroneApiConnector(token,vehicle_id, ip='localhost',wait_for_drone_response =True)
    
    # Initialize the drone's connection
    drone.connect()
    
    print("Taking Off")
    drone.takeoff(5)
    
    print("Getting Battery Status")
    
    battery_status = drone.get_battery_status()
    print("Voltage: ", battery_status['voltage'])
    print("Current: ", battery_status['current'])
    print("Remaining Battery Percentage: ", battery_status['remaining'])
    
    #disconnect the drone
    drone.disconnect()
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flyt_python-0.2.3.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

flyt_python-0.2.3-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file flyt_python-0.2.3.tar.gz.

File metadata

  • Download URL: flyt_python-0.2.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for flyt_python-0.2.3.tar.gz
Algorithm Hash digest
SHA256 1506bf545007ae28d342428788422066908aea4d0ea15c6a71a5d20092e552ce
MD5 f0c61f502b2fbfb157b026b8ec279dc6
BLAKE2b-256 dc6fbb8088f81455125f62a77bd0b4906841f70100a3c4bb285f1d9ee260cc08

See more details on using hashes here.

File details

Details for the file flyt_python-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: flyt_python-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

File hashes

Hashes for flyt_python-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 215f0ad7d322aee1ff98892877802a94817a46a2b0c83889c5f104a6dd88717b
MD5 989836b3f923ca4105d7a59c1dd80881
BLAKE2b-256 ac3f954e80d857061babd40b2192e376b83bf59c8f3a6d74f37d30ea4aae8097

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page