-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARDrone 2 support #2
base: master
Are you sure you want to change the base?
Conversation
with vidoe streaming starting with an incomplete header (as seems to happen with my drone). - Added tests and travis.ci support.
Fixes need to work with ARDrone 2.0 including deal
Oh I should have - the starting point was @adetaylor 's fork. |
Hi! |
what is taking up all the CPU time - python for ffmpeg? If its ffmpeg it On Fri, Jul 19, 2013 at 12:27 PM, krsapkota [email protected]:
Jonathan J Hunt [email protected] http://www.me.net.nz |
default setting for image new function to send motor command to the drone
Make project smaller
Dict for control state
Any chance this code will be maintained? |
@pythonmobile our fork of this repo is here. It works (for us) consistently with the v2 of the AR Drone (we have not tested v1). |
Code does not work on my parrot drone 2.0. I run it, and the lights just turn red. No video feed, nothing. Any suggestions ? |
Not off the top of my head - I'd suggest putting in lots of |
Thank you for the prompt response. Ok I will try that. Im just trying to run the demo file and it seems to be failing. Ill try and see where its getting stuck. Im guessing you had no issues with your connection ? |
It doenst seem to be getting stuck in any code, the video feed pops up with changing FPS but its just a black screen. |
Yeah I had lots of issues, since the code didn't support the AR.Drone 2 at all until I started hacking at it :-) But that was a long time ago and the code has moved on since then. |
I literally just baught the drone today as I am going to be using it for my thesis. Im quite worried now that I cant get it to work with the 2.0. It works fine with the 1.0 but the video feed is not fast enough for what I need it for. Is there anything you could suggest or help with? Im really desperate at the moment. |
Not sure if this is useful information but when the lights on the drone go red, the print out says warning: root connection established. I dont think that sounds like an issue though |
Nope, just go debug it. Assuming you know some Python you ought to be able to get it working. Trace that you're getting responses from the AT commands sent by the script. As I said, see which one of the commands makes the lights go red (maybe use sleeps in between the steps). Debug through the backchannel where video comes back. I'm sure you'll get it working… but you might have to put some effort in! |
OK thanks for the reply. Im guessing you got it working for the Parrot Drone 2.0 ? Its just strange that its not working now. |
Yes, works fine on my AR.Drone 2.0. Not very strange. I expect there are firmware differences, timing differences, protocol differences, or just luck differences which account for this. This is not fully supported released software, the AR.Drone 2.0 support has probably only been used by 3 or 4 people ever, all of whom have spent time working out whatever issues occur for them. You'll need to do the same. Good luck! |
Ok thank you for the help, I really do appreciate it. Just one last thing, im guessing that the lights turning red on the drone are a result of a communication protocol issue ? Just so that I know where to start looking for the possible issues. |
I think so, but I can't remember for sure. It might be that it's caused by the drone going into its own 'danger' mode. You could try grabbing my version of the code instead: Now you mention it, I have a sneaky feeling that this fix might have been similar to what you need: That's included in my branch so if you get mine, maybe it will work. Maybe. Because there are not many people who care about this right now, none of us have made the effort to merge all the different forks. Yet. |
Thank you kindly for your help. Ill try it out right away. I wonder why so few people are interested in this? I would have thought people would go nuts to be able to write their own python scripts to fly their drones autonomously |
Progress… see if you can control the drone with the various keys listed inside For video, I'd recommend checking to see if ffmpeg is running on your PC using |
The thing flies and responds to commands, its just the video feed thats blank. Responds to take off. I am running Ubuntu and I just installed ffmpeg before trying to run this code. Im guessing then that the issue lies with ffmpeg ? |
I installed ffmpeg from a PPA. When I use ps to check the processes. I see ffmpeg in ps list |
So the pipeline works like this:
It could be going wrong at any one of those stages, but that should give you enough information to figure out how to debug it. A good start would be to use |
That helps so much. Thank you for your time and effort. ffmpeg seems to be decoding, since it seems to be using about 15 percent CPU when the code is running, so ill try and see if I can look further down the line to see where the issue lies. |
Hi adetaylor, once again thank you for all of your help. I am in the final stages of submitting my project. I have a quick question though regarding the library. Do you know if there is a way I can set nav data ? So how it satnds at the moment is that I can receieve the nav data from the drone, the idea is to then use a PID controller, calculate the new params and then use some sort of nav data set method to make the drone react to the new nav data that I have set. Is there a way to do this ? Or is the only way of controlling using this library to send left/right up/down and the speed? Regards |
I think you'll probably have to command the drone to fly to the new position that you want, using suitable turn and move commands. Regrettably it's a physical object not just a sprite in a game… |
Also worked with this code heavily for my thesis. I made quite a number of changes and tried about 10 different video decoding methods. Consistently get 30 fps but with a 0.5 second latency. It is almost certainly introduced when decoding with FFMPEG. The C-based IDE offered by Parrot is much closer to 0.2 seconds. If anyone can solve it, it seems to be one of the final issues this project is facing. |
1- To solve the red light problem run the script twice. That seems to work for me. |
Hello im using this library, has some issues establishing the conection sometimes, but overall it works pretty good, the only problem that i get right now is when i trying to change the configurations of the drone. For example: drone.at(at_config,"control:altitude_max", "5000") but when i call the configurations does not change. Am i doing something wrong? |
Hi @Ellebkey, glad to hear it's kind of working. I personally can't remember enough about this to speculate why that might not be working but maybe others can. Some neuron at the back of my head says that a more complicated exchange of messages might be required in order to actually set a config. You might want to see if any of the other APIs in the library end up sending at_config and see how they do it. But the neuron might be fibbing to me, and that might be a complete red herring. Sorry if so. |
I'm not sure if you're interested in maintaing this library. These are the changes I had to make to get it working with my ardrone 2. I've also added unit tests and support for testing on travis-ci.org