Giter Site home page Giter Site logo

crazyflie-lib-python's Introduction

cflib: Crazyflie python library Build Status

cflib is an API written in Python that is used to communicate with the Crazyflie and Crazyflie 2.0 quadcopters. It is intended to be used by client software to communicate with and control a Crazyflie quadcopter. For instance the cfclient Crazyflie PC client uses the cflib.

See below for platform specific instruction. For more info see our wiki.

Development

Developing for the cfclient

Note: If you are developing for the cfclient you must use python3.

Linux, OSX, Windows

  • Build a virtualenv (local python environment) with package dependencies
    • pip install virtualenv
    • virtualenv venv
    • source venv/bin/activate
  • pip install -r requirements.txt
  • Activate the environment: source venv/bin/activate
  • Connect the crazyflie and run an example: python examples/basiclog
  • Deactivate the virtualenv if you activated it deactivate

Note: For systems that support make, the first four steps can be replaced with make venv

Note: The first three steps can be skipped if you don't mind installing cflib dependencies system-wide.

Testing

With docker and the toolbelt

For information and installation of the toolbelt.

  • Check to see if you pass tests: tb test
  • Check to see if you pass style guidelines: tb verify

Note: Docker and the toolbelt is an optional way of running tests and reduces the work needed to maintain your python environmet.

Native python on Linux, OSX, Windows

  • Tox is used for native testing: pip install tox
  • Test package in python2.7 TOXENV=py27 tox
  • Test package in python3.4 TOXENV=py34 tox

Note: You must have the specific python versions on your machine or tests will fail. (ie. without specifying the TOXENV, tox runs tests for python2.7, 3.3, 3.4 and would require all python versions to be installed on the machine.)

Platform notes

Linux

Setting udev permissions

The following steps make it possible to use the USB Radio without being root.

sudo groupadd plugdev
sudo usermod -a -G plugdev <username>

Create a file named /etc/udev/rules.d/99-crazyradio.rules and add the following:

SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"

To connect Crazyflie 2.0 via usb, create a file name /etc/udev/rules.d/99-crazyflie.rules and add the following:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0664", GROUP="plugdev"

Contribute

Everyone is encouraged to contribute to the CrazyFlie library by forking the Github repository and making a pull request or opening an issue.

crazyflie-lib-python's People

Contributors

ataffanel avatar evoggy avatar fredg02 avatar kentwills avatar krichardsson avatar tobbeanton avatar whoenig 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.