Giter Club home page Giter Club logo

python-ardrone's Introduction

Flattr this

Video of the drone in action

A video of the library controlling a drone in action (click to jump to the video).

Getting Started:

>>> import libardrone
>>> drone = libardrone.ARDrone()
>>> # You might need to call drone.reset() before taking off if the drone is in
>>> # emergency mode
>>> drone.takeoff()
>>> drone.land()
>>> drone.halt()

The drone's property image contains always the latest image from the camera. The drone's property navdata contains always the latest navdata.

Demo:

There is also a demo application included which shows the video from the drone and lets you remote-control the drone with the keyboard:

RETURN      - takeoff
SPACE       - land
BACKSPACE   - reset (from emergency)
a/d         - left/right
w/s         - forward/back
1,2,...,0   - speed
UP/DOWN     - altitude
LEFT/RIGHT  - turn left/right

Here is a video of the library in action:

Repository:

The public repository is located here:

git://github.com/venthur/python-ardrone.git

Requirements:

This software was tested with the following setup:

  • Python 2.6.6
  • Psyco 1.6 (recommended)
  • Pygame 1.8.1 (only for the demo)
  • Unmodified AR.Drone firmware 1.5.1

License:

This software is published under the terms of the MIT License:

http://www.opensource.org/licenses/mit-license.php

python-ardrone's People

Contributors

timgates42 avatar venthur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-ardrone's Issues

User emergency

Hi, I am having a few issues with the drone going into user emergency mode. Sometimes the drone flies fine with my code, but at other times it will keep throwing a user emergency with the exact same code. I have tried taking out the drone.reset() function (the documentation says it toggles the emergency state) but it has no effect.

error 98: Address already in use

Hello,I'm trying to run a ardrone in raspbery pi, but he cannot run application. Writes the error.

Process ARDroneNetworkProcess-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/zilvis/drone/arnetwork.py", line 56, in run
nav_socket.bind(('', libardrone.ARDRONE_NAVDATA_PORT))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

Maybe that will help me?

Read magnetometer

Hello, is it possible to read magnetometer data from the drone with the library?

ARdrone().get_image() returns array of zeroes.

drone = libardrone.ARDrone()
drone.get_image()
array([[[0, 0, 0],
        [0, 0, 0],
        [0, 0, 0],
        ..., 
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]],

       [[0, 0, 0],
        [0, 0, 0],
        [0, 0, 0],
        ..., 
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]],

       [[0, 0, 0],
        [0, 0, 0],
        [0, 0, 0],
        ..., 
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]],

       ..., 
       [[0, 0, 0],
        [0, 0, 0],
        [0, 0, 0],
        ..., 
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]],

       [[0, 0, 0],
        [0, 0, 0],
        [0, 0, 0],
        ..., 
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]],

       [[0, 0, 0],
        [0, 0, 0],
        [0, 0, 0],
        ..., 
        [0, 0, 0],
        [0, 0, 0],
        [0, 0, 0]]], dtype=uint8)

any ideas?

Change IP Address to property

in line 321 of libardrone.py, you call to send commands to a hardcoded IP address (192.168.1.1)
This works in most controller use cases, but consider changing it to an attribute of ARDrone. This will allow others to freely change the Drone's IP Address programmatically, for instance in use of trying to control a fleet of drones

Error 10038 'An operation was attempted on something that is not a socket'

I try to run the following commands -

import libardrone
drone = libardrone.ARDrone()

environment - using jupyter notebook to run the demo code. Using python 2.7 version.
Line on with error is reported is -
File "ardrone\arnetwork.py", line 99, in run
inputready, outputready, exceptready = select.select([self.drone.video_pipe, self.drone.nav_pipe], [], [], 1)
error: (10038, 'An operation was attempted on something that is not a socket')

video does not work

I have a Ubuntu 12.04 LTS OS with Python 2.7.3
I can fly the drone and this works great.

Sadly psycon is no longer maintained and a dead project. And psycon does not work with Python 2.7, only with Python 2.6

Is there any possibility that this might be fixed in the future? Is there any workaround/fix/solution to this?

Get magnetometer data

Hello,
I am wondering if it is possible to get navdata concerning the magnetometer with libardrone.py ?
I am using an Ardrone2 with firmware version 2.4.8.

socket error:error: (10038, '')

Can you help me? When I run the demo.py, it's seems can't connect the network.

Exception in thread Thread-3:
Traceback (most recent call last):
File "D:\Anaconda2\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "E:\Python\python-ardrone-master\arnetwork.py", line 105, in run
inputready, outputready, exceptready = select.select([self.drone.video_pipe, self.drone.nav_pipe], [], [], 1)
error: (10038, '')

Video Display

When I launch the demo.py, the first person video does not appear in the pygame. How would I go about troubleshooting that?

How to change to bottom camera

Hey!
Thanks! I've been using your lib. it is awesome. But i want to use the bottom camera and i didn't see nothing in docs about it. how i can use it?

Image

Hi

Is it possible to pull a still image from the Drone's camera? Or take a photo?
Thanks

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.