afq984 / pyardrone

Parrot AR.Drone client library for Python 3
http://afq984.github.io/pyardrone/
MIT License
32 stars 5 forks source link

Getting Started

~ Github <https://github.com/afg984/pyardrone> ~ PyPI <https://pypi.python.org/pypi/pyardrone> ~ Online Docs <https://afq984.github.io/pyardrone/>_ ~

Requirements

Installation

.. code-block:: bash

pip install pyardrone

Basic Usage

.. code-block:: python3

import time
from pyardrone import ARDrone
drone = ARDrone()
drone.navdata_ready.wait()  # wait until NavData is ready
while not drone.state.fly_mask:
    drone.takeoff()
time.sleep(20)              # hover for a while
while drone.state.fly_mask:
    drone.land()

To move forward:

.. code-block:: python3

while True:
    drone.move(forward=1)   # move forward at full speed

.. seealso::

*   :ref:`ardrone`
*   `ARDrone Developer Guide from Parrot
    <https://github.com/afg984/pyardrone/raw/dev-resources/ARDrone_Developer_Guide.pdf>`_ (mirrored)