Hello Gregorio, I'm very pleased that you used my little project and found the admittedly not very visible Python3 version of PS-Drone. The problem you describe is usually due to a faulty installation of OpenCV. OpenCV is a little bitchy about this, in most cases the problem is solved after reinstalling OpenCV. If you want to make sure that PS-Drone is not the source of the error, I recommend you to grab the video stream via saveVideo(), as the preprocessing of the video stream is skipped here -...
Hi Parwin, this error is related to an elementary and very well tested part of PS-Drone, so I rather guess an external reason than a program error. Have you ever run PS-Drone directly on the console ? Feel free to contact me directly if the error still occur. Best wishes, Phil
Hello Wally, this is a known problem of the drone. Ruffly, sensors are not very accurate in the small values - of course there are differences in quality. Depending on the technology used, this has different effects, especially with the Z-dimension attitude and magnetic sensors. The error magnitude vary between individual drones and actual temperature. That this "rotation" corresponds to an ellipse I also did not know yet, thanks for sharing. Up to firmware version 2.3.3 the measured values simply...
Hello Wally, this is a known problem of the drone. In a nutshell, sensors are not very accurate in the small values - of course there are differences in quality. Depending on the technology used, this has different effects, especially with the Z-dimension attitude and magnetic sensors. The error magnitude vary between individual drones and actual temperature. That this "rotation" corresponds to an ellipse I also did not know yet, thanks for sharing. Up to firmware version 2.3.3 the measured values...
Hi Wally, the programs are still not very clear and only give them out on request at the moment. You'll have them in a few minutes ;-) Best wishes, Phil
Hi Zachary, that's odd, this problem should have been solved with last week's update. Are you using the latest version? Best wishes, Phil
We have worked on the problem away from the forum. It turned out that Loke's project was very ambitious and impressive, so I decided not to summarise this complex issue in this forum. Just so you know, he got it done and I am very impressed.
We have worked on the problem away from the forum. The latest uploaded version contains a fix with which video should work.
PS-Drone3
Hi Martin, I am glad you like my little project and thanks for your feedback. Yes, it looks like PS-Drone behaves differently under Python3 than under Python2, especially with the video function. I will revise and upload PS-Drone3 in the next few days and fix this. Feel free to write me if you have further questions. Best wishes, Philipp
Hi Daniel, I don't have a GPS-modul myself, so I have to help blind. I suggest to take a look to http://www.playsheep.de/drone/prgs/getNavData.py and replace e.g. drone.NavData["wifi"] with drone.NavData["zimmu_3000"] Since the drone does not support GPS-A, a GPS cold start must be assumed - So it can take up to two minutes until the position is found.
Hi Daniel, shame on me, I forgot to patch the PS-Drone, but I made up for it and just uploaded new/patched versions for Python 2 and Python 3. The Navdata-packet is still "zimmu_3000", but returns (hopefully) the three GPS-values. Hope it works, I would be pleased about a short feedback.
Hi Loke, I am pleased that you like my project and that it helps you :-) The usage ofsetConfigAllID() is a bit tricky and you have to use setMConfig() instead of setConfig(). However, I suggest to avoid setConfigAllID() in case of doubt. Did you already try to modify the tag-detection tutorial ? (https://www.playsheep.de/drone/tut6Markers.html) If nothing helps at all, you can write the marker recognition yourself, using the video-stream. The drone's cameras are not that good, so the build in marker...
Hello Zapa, I upladed the Python3-version of PS-Drone a minute ago, hope it will help you. Best wishes, Phil
Hello Zapa, I am glad that you like my little project. Due to lack of time I could not port PS-Drone to python3, but I heard that someone already did - I will ask him to share his port, but this might take some time. As far as I know Python2 understands the code for Python3, so your programs should run out of the box if you install Python2. I'm curious to see if it works. If you have any further questions, feel free to contact me. Good luck and happy coding, Phil
Still maintained
Hi Wallace, John measured the rotation of the propellers, as far as I remember. Although the internal PWM inputs are expected 9-bit values, but supports only 256 gradations, the lowest bit is ignored. The raw values are sent to the four small controllers under the motors where the LEDs are as well. These controllers send the actual used PWM-value back to the main system. The sampling/data rate is much lower than for other sensors, presumably because of the serial transmission. Hope this helps. Best...
Bugfixes in PS-Drone 2.1.4
Hi Gustavo, I am happy that you like the API. :-) In general, a flood of OpenCV generated error messages indicate a broken installation of OpenCV. Unfortunately, this happens pretty often. Please try to reinstall OpenCV, then everything should work. I can not imagine that this has something to do with Anaconda. Please give me a hint, if the messages keep coming up, I'm sure we'll find a solution. Best wishes, Philipp
Hi Ji, seems your drone does not enable Video or your OS block TCP-traffic drom the drone. It would be interesting to know, if drone.VideoImageCount increases. Wich OS are you using ? Is firstVideo.py running ? Is firstConfig.py working as discribed ? Did you install python-opencv ? Depending on the problem, it helps sometimes to reinstall openCV. You can set drone.debug = True and/or self.showCommands = True before drone.startup() to see internal comunication. Feel free to send me a logfile (e.g....
Hi Ian, I'm sure that's just a small problem. is it ok if I take a look to your code ? Can you send it to me ? The init-part is ok. cu Phil
Hello Ian, yes, you can use the (still undocumented) command "changeIP" for this: I suggest to write two small extra scripts to set the IPs of the drones, by e.g. ... drone = ps_drone.Drone() drone.startup() drone.changeIP("192.168.1.101") ... and ... drone = ps_drone.Drone() drone.startup() drone.changeIP("192.168.1.102") ... If you remove the battery from the drones, the IPs jump back to "192.168.1.1". Now you can run your swarm-program, start two instances of PS-Drone (e.g. drone1 and drone2)...
Hi Luis, I just send you a mail, hope it will help. Have a great day, Philipp
Hi, I am happy that you like the API. Although Parrot has mostly documented the drone very well, some parts are missing completly, such as most parts of NavData. I put together all information I could find in the documentation. I did some research the last few days and found out that LBS is a fixed floating-point data format, which is used e.g. by MatLab, and which should have structured like xxxxxxxxxxxx.yyyy There is also a good chance the documentation of the accelerator-chip discribes the data-format....
Hello Syarif, thank you, I really appreciate your praise :-) Yes, ps-drone sends the commands as you assumed to the drone. The commands start with "AT*" and the command itself. The first option is an ascending number, other options have to be seperated by a comma. Floating-point-values have to be send as a raw 4 byte IEEE 754-value. The drone demands a kind of a heartbeat, so the command "COMWDG" is just to keep the connection up. If you set drone.showCommands=true, all commands send to the drone...
Hello Syarif, thank you, I really appreciate your praise :-) Yes, ps-drone sends the commands as you assumed to the drone. The commands start with "AT*" and the command itself. The first option is an ascending number. Floating-point-values have to be send as a raw 4 byte IEEE 754-value. The drone demands a kind of a heartbeat, so the command "COMWDG" is just a dummy-command to keep the connection. If you set drone.showCommands=true, all commands send to the drone will be shown. I am sure, this will...
Hello Syarif, thank you, I really appreciate your praise :-) Yes, ps-drone sends the commands as you assumed to the drone. If you set drone.showCommands=true, all commands send to the drone will be shown. I am sure, this will help to understand how the drone and PS-Drone are working together, Also the AR.Drone Developer Guide might help you, too. "ARDrone_Developer_Guide.pdf" can be found in folder "Docs" of the ARDrone SDK 2.0 (http://developer.parrot.com/docs/SDK2/ARDrone_SDK_2_0_1.zip) What are...
Sure, you can download it at http://www.playsheep.de/drone/misc/searchFollow.zip The drone will start and turn to find a marker. If found, it will fly to it. Its a combination of a couple of routines. You can change the behavior between line 514 and 526: marker: "True" enables the internal-marker-detection, "False" detects red dots follow: Follows the detected object (move the marker, the drone follows) followZ: The drone holds a distance of about 1m (3ft) to the marker (only works with markers)...
Hello Huzaifa and Rouzbeh, are the threads https://sourceforge.net/p/ps-drone/discussion/general/thread/dc620cd0// https://sourceforge.net/p/ps-drone/discussion/general/thread/c3de07a9/ usefull ? Best wishes, Philipp
Hello Soham, I send you a PM with a quick and dirty program, which uses the PID-controlers (based on the controllers shown at https://sourceforge.net/p/ps-drone/discussion/general/thread/ee9cd802/) to hover in front of a marker. Hope this will help you, if you have any questions, you are welcome. Best wishes, Philipp
Hi Thiago, if you start ps_drone.py directly, it turns to a stand-alone-application by running a little build-in tutorial-script (last 40 lines). Long story short: I suggest to copy the relevant parts of ps-drone (line 2072 - 2094) to line 21 of getNavData.py. If you have further questions, you are welcome. Best wishes, Philipp
Hi Thiago, if you start ps_drone.py directly, it turns to a stand-alone-program by running a a little build-in tutorial-script (last 40 lines). Long story short: I suggest to copy the relevant parts of ps-drone (line 2072 - 2094) to line 21 of getNavData.py. If you have further questions, you are welcome. Best wishes, Philipp
Hi Vineeth, I am sorry to say, but I don't think, that the Neo-6m will run with AR.Drone 2.0 out of the box, there might be changes in the firmware necessary to get the data. If the data are a part of NavData-packets, its not a problem to patch PS-Drone. Best wishes, Philipp
Hi Kathir, well, the video-delay is caused by openCV, I gave my best to reduce the lag as good as possible. Try the setting-command midVideo(), this will give you two images per second, but in realtime. If you set a higher rate of I-frames, you will get more fps. Someone also described a fix here in the forum, using pygame to modify the puffer of openCV, but I can't find the thread right now. I think, there is no need to modify PS-Drone. After starting video by startVideo(), PS-Drone will provide...
Hi Kathir, well, this task is not so easy, because the drone has no references to orientate. Anyway, we discussed this a couple of days ago here: https://sourceforge.net/p/ps-drone/discussion/general/thread/4b873b86/ If you have any further questions, feel free to ask. Best wishes, Philipp
Hi Sayad, on first view, it should work, but I will take a closer look to your code... CU later, Philipp
Hi Tim, VirtualBox is great, I use it a lot, too. You should really give Mint a chance (I prefer MATE-edition). The look and feel is amazing; the standard-installation is also pretty good and everything works out of the box: https://www.linuxmint.com/download.php Anyway, as far as I can see, everything should be OK, but the python-openCV-interface is missing. Try: sudo apt-get install python-opencv It was also the only package I had to install while testing PS-Drone on Ubuntu 17.04. I also suggest...
Hi Tim, seems something went wrong with your installation of OpenCV. You mentioned in an other thread, you are running Ubuntu 17.4, so I tested it with this OS, too. Just (re-)install the python-opencv-package by typing sudo apt-get install python-opencv and the video-function will work. I attached a screenshot, so you can see how firstVideo.py should look like ;-) Have a great day, Philipp
Hi Tim, seems something went wrong with your installation of OpenCV. You mentioned in an other thread, you are running Ubuntu 17.4, so I tested it with this OS, too. Just (re-)install the python-opencv-package by typing sudo apt-get install python-opencv and the video-function will work. I attached a screenshot, so you can see how it should look like ;-) Have a great day, Philipp
Hi Sayad, the drone-related stuff is not very complicated, you don't need to read everything :-) Did you manage to grab pictures from the drone's cameras, so that you can run your algorithm ? It's not a big deal, if you didn't. Well, your algorithm is able to detect an object, and I assume that your algorithm returns a position where the object/marker is located on the picture. Let's assume, the object has to be in the center of the picture, that's on position X=1280/2=640 and Y=720/2=360, if you...
Hi Sayad, the suggested and well explained way of Cris is simple, effective and brings your drone approximatelyroughly to the target-position. If you know the distances, I would measure the time to reach specific distances with a specific speed-setting. If you like it more universal, I would measure the time to reach several distances - the drone becomes faster by the time, as shown in the graph below. You have to consider the time to accelerate and stop the drone, of cause. It‘s a problem that the...
Hi Sayad, the suggested and well explained way of Cris is simple, effective and brings your drone approximatelyroughly to the target-position. If you know the distances, I would measure the time to reach specific distances with a specific speed-setting. If you like it more universal, I would measure the time to reach several distances - the drone becomes faster by the time, as shown in the graph below. You have to consider the time to accelerate and stop the drone, of cause. It‘s a problem that the...
That's interesting, are there already any experiences or test-results using PS-Drone in combination with the TUM-simulator of ROS ?
Hi Jay, there are no plans to port PS-Drone to Bebop or Bebop 2 right now, but I will start developing for Bebop 2 (or later), when I can buy one by donations. Parrot changed a lot at the protocols, but there would be a good chance, that a new PS-Drone will work, beside Bebop 2, for the most Parrot-drones newer than AR.Drone 2.0. Best wishes, Philipp
Hi John, thanks, I like to help :-) Honestly, I have no idea about the drones focal length and sensor size. I also googled a bit, seems that a couple of people like to have this information, too. I found and attached a table, which says the focal length is 3.6mm. Best wishes, Philipp
Hello Sayad, I agree with you, detecting things and let the drone react to that are the most interesting tasks for me, too. In general it is not so complicated, but there are some annoying traps which makes things complicated. Well, I have some helpful documents, but they are in german, so it might be a good idea to create an interactive tutorial here. Lets focus on reacting on markers, detected by the camera at the front, as seen at firstTagDetection.py at the tutorial, for the beginning to get...
Hi Sayad, well, OpenCV is sometimes a bit bitchy ;-) Did you already try to run useVideo.py (www.playsheep.de/drone/prgs/useVideo.py) ? If you like, I can also take a look to your code. Best wishes, Philipp
Hi Sean, thanks a lot for your research, sharing your results and the patch. I am quite busy right now, but I will update PS-Drone soon. Best wishes, Philipp
Hello John, I don't have exact values of the relation between PWM and the torque. Robin Sicsic and I had a conversation about a similar topic. He has access to some great equipment and proofed that there is a liniar relation between RPM and PWM (attached). Regarding to your last posts, I assume you like to create your own control system, letting the drone hover. In this case, there is (luckily) no need to take care about torque. Hope this answered your question. Best wishes, Philipp
Hello John, I confess, I was not able to recreate your problem. So far your code looks fine, maybe it depends on a missing command at the previous part. Anyway, here is a code, which worked for me, I hope it will help you: import time, sys import ps_drone drone = ps_drone.Drone() drone.startup() drone.reset() while (drone.getBattery()[0] == -1): time.sleep(0.1) print "Battery: "+str(drone.getBattery()[0])+"% "+str(drone.getBattery()[1]) drone.useDemoMode(True) drone.setConfigAllID() drone.sdVideo()...
Hi Hans, no need to be sorry :-) There are no additional commands necessary to get the GPS-data. Did you refresh the local copy of the drone's configuration (by using getConfig()) ? If you like, mail me your code and I'll take a look to it. Have a great day, Philipp
Hi John, I uploaded you both algorithms to www.playsheep.de/drone/misc/Lowrider_Absorp.py...
Hello Sil, often the reason for this error is in the Linux system. What Linux do...
Hi John, by setting the “speed” for a movement you set actually the thrust to move...
Hi John, I am with you, it seems your OpenCV has some problems. In case you compiled...
Hi John, PS-Drone is not compatible to your Parrots AR.Drone 1. The base-protocol...
Hi Celon, sorry for the late response. I made a litte tutorial, how to process drones...
Hi Celon, the steps you went in your first post are very good. OpenCV is sometimes...
Hi Celon, the steps you went in your first post are very good. OpenCV is sometimes...
Hi Celon, the steps you went in your first post are very good. OpenCV is sometimes...
Hello Andreas, yes, your guess was absolutely right. We found out, that there was...
Hi Mike, I must to give you a short answer this time, but I think I have to take...
Hi Jay, sure, the drone submits its GPS-coordinates by its configuration-data. Section...
Hi Jay, there are no plans to port PS-Drone to Bebop or Bebop 2 right now, but I...
Hello Allen, it seems the module "python-opencv" is missing. Try sudo apt-get install...
Hi, this is interesting, the network-port close usual on its own. Anyway, I added...
Hi, this is interesting, the network-port close usual on its own. Anyway, I added...
New version of PS-Drone
Downgrade your firmware to version 2.2.6
PS-Drone at "Robotertage 2015"
Hello Marco, to let the drone follow a line is a nice project, but not trivial because...
Hello Richard, after starting the drone's video-thread, the variable "VideoImage"...
Great, thanks for sharing ! By the way, you also solved the first way, by setting...
Hello Joji, I am happy, that you are not in the dronekit-hell anymore ;-) It's a...
Hi Marco, letting the drone navigate accurate, without any feedback, is a big problem...
Hi, regarding your sliding-problem, it may be indeed the firmware. Seems that the...
Hi Marco, a lot of sensors are thermosensitive and measure different values at different...
Hi Sebastien, there seems all OK as fare I can see. The commands to the drone are...
Hi Sebastien, wow...you really took care of that problem and to be honest: I am out...
Hi Marco, No, its not a float, just raw sensor-data (the float value would be -4.4386666687049576e-35...
Hello Marco, its a good choice using PS-Drone for your master-thesis, its always...
Hello Marco, its a good choice using PS-Drone for your master-thesis, its allways...
Hmmm...I can't imagine, that your problem is caused by sensor or calibration-failures....
Hi Sebastien, thank you :-) I know what you mean, I had this problem myself. The...
Hello Sunil, its great to hear, that you like the API :-) The good news is: as fare...
Hello Dimitris, thanks for appreciation :-) Regarding your question, well, its not...
Hey Jurjen, Offtopic: (wow...I am late) You are very welcome. Was je project succesvol?...
Hey Philippe, well, I have to remember to put the 'e' at the end. Anyway, nice name...
Hey Jurjen, Offtopic: (wow...I am late) You are very welcome. Was je project succesvol?...
Hi David, sure is it possibel to save a live-image or to process it at runtime or...
Hi Jurjen, sounds you had some bad luck and a lot of work. Did you try SuperGrub2...
Hi Philippe, great work and thanks for your update ! Guess you are using OpenCV3,...
Hi Philippe, I am pleased you like my project. The error-message you get is "just"...
Hi Jurjen, I think that FreeFlight-app will show you the firmware-version, and this...
Good morning Jurjen, in my experience, OpenCV is sometimes just bitching and has,...
Hello Jurjen, I tried to reproduce your problems today. It seems, that there is indeed...
Hi Pierre, yes, this is possible (and often necessary). Just google for openCV and...
Hello Jurjen, sorry to hear, that you have still problems. The error-messages and...