AR.drones, anyone?

yacine's icon

hello world!
I find those quite impressive:
http://ardrone.parrot.com/parrot-ar-drone/usa/
anyone working on a way of interfacing them with max.
some people (http://dronehacks.com/) are working on hacked SDKs and drivers, but it seems no one works on a mac version, maybe the linux one could be a starting point?
//yac

fishuyo's icon

I know this is an old post, but I just stumbled on it so fyi..

I have been working on an mxj external to control ardrones. It uses the JavaDrone api. You can find it here: https://github.com/fishuyo/max-ardrone

Cheers!

Spa's icon

hi fishuyo,
the vrpn.tracker object is missing ....
where is it possible to find it?

thanks

fishuyo's icon

hey Spa,
Sorry, you don't actually need that object, I should put it in a separate help patcher.. that is for use with a vrpn tracking system to control the drone's position precisely. The patch will still work without it, you just don't need to worry about the moveTo or step commands.

Spa's icon

hi fishuyo,
vrpn.tracker looks like an interesting object, given the lack of many objects in max for specific trackers.
Its the kind of perfect bridge for max, without using multiple osc-type bridges.
Perhaps you could share it....
thanks

For my part, i'm unable to develop a max object at the moment...

mr.l's icon

Hi,

I also just found that post...
Sounds really exciting! Before I go out and get one: is it reliable to use and how is the image quality? (Image quality, latency etc.?)
I need to fly that thing around in a theater-space... Or are there other alternative drones to use in max?

thanks for some reports on experiences! luke

mr.l's icon
mr.l's icon

oh...and one more thing: is it possible to get the images of both cameras at once??? (at least the AR.Drone 1 had 2 cameras, right?) That would be awesome!

hope for an answer!

mtennie's icon

Hi Friends,
I've gotten the patch connected with my Drone but I haven't been able to get the video working - I keep getting the 'unable to connect' message. Anyone having similar trouble? Anyone have any tricks? I'm just using the help patch from the last GitHub build. Cheers,

mattt.

Christopher Overstreet's icon

I would also love a copy of the vrpn.tracker java object, and would like to hear some feedback about how it is working for people before I make the plunge and buy one....
Can we access more than one camera at once?
Do we get back all values like: height, orientation, tilt, yaw, etc?
Also would love to hear about other drones with similar features in the $500 range, if any...

Christopher Overstreet's icon

Fishuyo - thank you for this object. I just got an ardrone and starting to get to know it! I also can't get the video to connect, nor the led-sequences to trigger (though they did work once!?). I also would love a copy and help file for the vrpn.tracker object.

Leo Mayberry's icon

Anybody able to get video working with this?

Christopher Overstreet's icon

Video still hasn't worked for me, and as you can see I've gotten no response. i don't think that very many people with maxmsp have one of these yet. let me know if you get it working. Using it with max was the main reason why I shelled out the money.

Leo Mayberry's icon

Christopher,
Apologies for a short response, but my much longer initial response got destroyed by me messing up a "captcha".
I'm trying to use the drone in a theater context, and was hoping to use this object as well. Unfortunately, it just doesn't seem to work I've been trying other software, of which this looks promising;
LBPC labs "autoflight."
Unfortunately a lot of software is in development, or unfinished. I may have to look into some programming help to make working Max object, or some other way of interfacing with Max. I need to control the drone, and to display the video feed. One thing interesting about "Autoflight" is that it actually displays both cameras simultaneously, which I wasn't even sure was possible.
I'll keep you updated if I find a working solution, or end up building some new tools.

sandroid's icon

one work around could be to capture the video on screen (using some screen capture software) and piping it to max; or using jit.desktop to get it directly into jitter. About the data from the drone, one could try to implement OSC communication between "autoflight" and Max (that would make possible the mapping between them).

sandroid's icon

or even wait for the mac version of autoflight and use Syphon to capture the screen.

fishuyo's icon

I'm sorry I haven't responded to any of these post! I've been super busy working on various other projects. I will ask the author of vrpn.tracker if they would be willing to put it online.

Also, the video decoding is still a bit iffy.. It should work with the 2.0, but the stream will eventually fall behind and sometimes crash because I haven't implemented frame skipping since the data is sent over tcp.

If you can, try building the latest from the dev branch or download the latest (v0.4.2a) from max-ardrone

I'll try and get the video working more reliably soon.

fishuyo's icon

Hi! Happy to announce OpenDroneControl a new version of what was previously max-ardrone.

ODC is usable in Max and Processing and any JVM language.

Video works on the ARDrone 2.0 - there is a bit of latency however that I can't seem to get any lower.

urmatter's icon

Fishuyo. Many Thanks for this excellent initiative.

I've been trying to adapt your patch to use with a rudimentary tracking setup: just a simple overhead camera tracking a marker on top of the ar.drone.

I want to use the ar.drone's own onboard altimeter and magnetometer to track the drone's other coordinates.

I want to use the moveto command. But in order to do so I need to send my overhead camera's X and Z coordinates to the OpenDroneControl object, right?

If I understand correctly, the linear interpolation math is done within the object. So how do I send these externally-gathered coordinates into the object so that it can interpolate between the current pose and the "moveto" pose?

Christopher Overstreet's icon

I'm having trouble getting this to work in max, or knowing where to install what in osX max 6.1. Do you have an already built version? or some detailed instructions? I was able to run a few things from the terminal but not max. Thanks.

Augustine Bannatyne - Leudar's icon

Has anyone developed max software that lets multiple drones fly in formation ?

fishuyo's icon

urmatter -- this should be possible.

I tried to do something similar awhile back, but found it tricky because the yaw from the magnetometer/gyroscope tends to drift a little.

What you need to do is after sending a [moveTo x y z yaw] command, send a [step x y z yaw] command where x and z are the coordinates from your vision system and y and yaw are from the drone's sensor data. The altitude can be gotten from the [sensor altimeter] command, and yaw via the second float in the list outputted from the [sensor gyroscope] command.

The implementation assumes that a yaw of 0 degrees is looking down negative z axis, positive x axis to its right, and a yaw of 90 degrees would be looking down the negative x axis, so you will need to initially offset whatever value you get from the gyroscope to make this match your setup. Additionally you'll need to compensate for yaw drift!

Be careful, the calculation is done via a PD controller, so if your yaw value isn't correct, it will move the drone the wrong direction and get worse and worse as it gets further away (most likely crashing hard into a wall!)

Cheers

fishuyo's icon

Christopher. You can download a max template that will run straight from the unzipped directory here: OSX ODC Template

luc3's icon

hey,
also interested in flying multiple drones at the same time...
fishuyo, thanks for this looks pretty neat :-]

Timo's icon

Hello
Thank you fishuyo, this is a great project! I'm working on an art installation, that wouldn't be possible without your work!
Connecting directly to the drone, the video stream always stopped working after some time... but connecting the drone to a regular router it works, because the signal is much more stable!
With the parrot flight recorder, the drone has access to GPS, is it possible to receive the GPS Data in Max? And to give GPS waypoints? That would be great, but I don't have enough programming knowledge to figure that out. Any help would be wonderful! Thanks!

Timo's icon

Hi again
The Video of ODC (in Max) always stops working after sometime. Do you get constant images?
As I'm having a presentation on Monday, I'm worried.
Did you find any way to get constant video?
The problem seems, that video totally stops if the connection isn't perfect and doesn't recover after some time.
I wouldn't care if it drops frames or has a low frame rate.
For any help I would be very thankful!!!
Tim

Ruokun CHEN's icon

Hi there,

I tried and it worked well. Did you use Max7? However, I received the error: Failed to decode received navdata information.

Do you have any thought?

Totti

Timo's icon

Hi
Yes I'm working with Max7... I guess the message you receive is because part of the drones navdata info can't be decoded. But I really ain't no specialist in this, so it would be very cool to have some information by fishuyo who built the ar.drone object and patch.
There is some sensor data you can decode. I built my patch so that I can adjust the hight, using the altimeter sensor... but after some time this sensor gets really confused and it tells me I'm flying 2m underground :) I'm thinking about connecting an arduino to the drone and use custom sensors and an external camera.

Timo

Ruokun CHEN's icon

Hi Timo and fishuyo,

That sounds good. However, there are more problems appeared.

(1) It said when I started Max:
java.net.ConnectException: Network is unreachable
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:382)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:241)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:228)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:431)
    at java.net.Socket.connect(Socket.java:527)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
    at sun.net.NetworkClient.openServer(NetworkClient.java:118)
    at sun.net.ftp.FtpClient.openServer(FtpClient.java:488)
    at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:268)
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:352)
    at com.codeminders.ardrone.version.ftp.DroneFTPversionReader.readDroneVersion(DroneFTPversionReader.java:38)
    at com.codeminders.ardrone.ARDrone.connect(ARDrone.java:343)
    at com.codeminders.ardrone.ARDrone.connect(ARDrone.java:334)
    at org.opendronecontrol.platforms.ardrone.ARDrone.connect(ARDrone.scala:49)
    at OpenDroneControl$$anon$1.run(maxdrone.scala:52)

(2) And then when I connected to the drone it showed these:
Jul 24, 2015 11:40:47 AM com.codeminders.ardrone.data.decoder.ardrone10.ARDrone10NavDataDecoder run
SEVERE: Failed to decode receivd navdata information
com.codeminders.ardrone.data.navdata.NavDataFormatException: Error parsing NavData
    at com.codeminders.ardrone.data.decoder.ardrone10.navdata.ARDrone10NavData.createFromData(ARDrone10NavData.java:366)
    at com.codeminders.ardrone.data.decoder.ardrone10.ARDrone10NavDataDecoder.run(ARDrone10NavDataDecoder.java:42)

(3) It could fly but when I start the video it showed these (as the same above): Also, sometimes the video part is not working.
Jul 24, 2015 12:23:52 PM com.codeminders.ardrone.data.decoder.ardrone10.ARDrone10NavDataDecoder run
SEVERE: Failed to decode receivd navdata information
com.codeminders.ardrone.data.navdata.NavDataFormatException: Error parsing NavData
    at com.codeminders.ardrone.data.decoder.ardrone10.navdata.ARDrone10NavData.createFromData(ARDrone10NavData.java:366)
    at com.codeminders.ardrone.data.decoder.ardrone10.ARDrone10NavDataDecoder.run(ARDrone10NavDataDecoder.java:42)

(4) The same problem when I tried to apply the animatin patch.

Any ideas?

Thanks!

Totti

Timo's icon

Hi Totti
I get the same messages.... tell me, if you find any solutions to this.
Video works better if you connect the drone to a wifi extendener and the extendender to the computer.

Greetings