How I made a AR Drone Fly itself using Python, OpenCV and PS-Drone with TAG image detection

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 101

  • @sieuweelferink6852
    @sieuweelferink6852  4 ปีที่แล้ว +13

    Hi everyone I just bought 2 more Ar-drones. What do you want me to make with 3 drones working together?

    • @abdoulsavadogo8628
      @abdoulsavadogo8628 4 ปีที่แล้ว

      Hello
      Sieuwe Elferink, thanks for this cool tutorial. Can you make another video on how to get a stream video from parrot bebop 2? I would like to make some computer vision applications but i am stuck about how to get the images from the drone camera. Thanks in advance

    • @PhobosEtDeimos667
      @PhobosEtDeimos667 4 ปีที่แล้ว +1

      @@abdoulsavadogo8628 Due to a major change in the communication protocol, PS-Drone is (currently) not compatible with bebop drones.
      However, can use ffmpeg or openCV to simply grab the (h264) video-stream and dump it on disk.

    • @PhobosEtDeimos667
      @PhobosEtDeimos667 4 ปีที่แล้ว +1

      The undocumented PS-Drone-command "changeIP()" will be useful here. It changes the IP address of the drone until the next battery change, so you can controll all drones with one script.
      Usage: drone.changeIP("192.168.4.5"). It returns "True" if successfull.
      I suggest to use a separate script to change the drones IP, because the running script loses the connection to the drone and PS-Drone need to reinitiate.

    • @Mahar4ja
      @Mahar4ja 4 ปีที่แล้ว +1

      hack the other two in mid air and take over remote controls wirelessly using a RPI and aircrack-ng tool

  • @BantryBai
    @BantryBai 4 ปีที่แล้ว +9

    Thanks for the python code man!!

  • @bihansuraweera
    @bihansuraweera 3 ปีที่แล้ว +1

    Just found this guys channel. Loving your content subscribed immediately

  • @denisefaller8311
    @denisefaller8311 3 ปีที่แล้ว

    Thanks for the really great info. Here's a project idea - that you combine your last EEG leds project with this one, for use by youth who are nonverbal with special learning needs to communicate their emotional state while they build neural plasticity. The EEG + Drone design by Puzzlebox Orbit is only for elite minds because the drone darts all over the place before young minds have developed the cognitive control required. Your vertical drone would offer a less stressful engagement and pushing it off centre but keeping it floating would encourage playful engagement.

    • @sieuweelferink6852
      @sieuweelferink6852  3 ปีที่แล้ว

      Thanks for the idea. I am currently working on some other projects so I don’t really have time for this. If you want some advice just ask in this comment section.

  • @Ronobuildstech
    @Ronobuildstech 4 ปีที่แล้ว +2

    nice work there

  • @elrubio8091
    @elrubio8091 4 ปีที่แล้ว

    Just what i needed go start my project!!! Thanks

  • @azfarazdiarfakhsyad9863
    @azfarazdiarfakhsyad9863 4 ปีที่แล้ว

    well done Sieuwe, that is pretty awesome

  • @BigBobEdyS
    @BigBobEdyS 3 ปีที่แล้ว

    Great job👍 underrated video

  • @DwightSchruteAsManager
    @DwightSchruteAsManager 3 ปีที่แล้ว

    Bro i love your vids please dont forget me

  • @nachoridesbikes
    @nachoridesbikes 5 ปีที่แล้ว +1

    great job man!

  • @bluesdog88
    @bluesdog88 4 ปีที่แล้ว +1

    Cool video, cheers!

  • @huseynilproqramlasma446
    @huseynilproqramlasma446 3 ปีที่แล้ว

    Hi great job. which do you used companion computer?.can i change this project to object tracking for drone

    • @sieuweelferink6852
      @sieuweelferink6852  3 ปีที่แล้ว

      Check my latest project for person tracking drone!

  • @zainabhamid3994
    @zainabhamid3994 4 ปีที่แล้ว

    Hello , this project seems awesome. Please guide me can I test my control algorithms on this drone. I mean I want motor control.

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      zainab hamid if you want deep level motor control this is not the platform for you. Take a look at APM. This can give you full control of everything.

  • @danieltaiwo3701
    @danieltaiwo3701 3 ปีที่แล้ว

    sieuwe Good day i love your works and video contents, i want to learn ar drone programming can you help me with that sir

  • @ashutoshsimha3656
    @ashutoshsimha3656 4 ปีที่แล้ว +1

    Hi, nice video! by the way, do you know how to disable the optical flow in ar drone 2?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      What do you mean with disable optical flow? Normal camera feed using ps drone does not have any optical flow algarithm running over it. Just plain image.

    • @ashutoshsimha3656
      @ashutoshsimha3656 4 ปีที่แล้ว

      @@sieuweelferink6852 Ok, I thought that the AR drone 2.0 used optical flow (from bottom camera) to stabilize horizontal position during hover. This is also visible as the drone tries to get back to its hover position, if disturbed.

    • @Mahar4ja
      @Mahar4ja 4 ปีที่แล้ว

      @@ashutoshsimha3656 you are correct, it does. However, as it is being reprogrammed, this is overwritten within the library.

  • @lobo5727
    @lobo5727 4 ปีที่แล้ว

    Request: Interesting topic, can you make a drone with 3d stereo camera for autonomous flying.
    I got a sample code for stereo camera in java processing. Actually it's really simple but need more processing power in case you use Pi. If u are ready let me know.
    Idea is using stereo camera we can find the distance of objects and We can take right decision to fly towards destination.

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      sachin lobo interesting idea. I am going to work soon on a project where i want to make ar drones fly autonomous around my yard and that they the pickup trash. An ai running on a onsite servet will do trash detection but i somehow have to make sure the drones dont collide into stuff. I was self thinking about adding 9 of those cheap hc04 distance sensors to the ar drone in all directions one. Because stereo vision indeed needs some processing power. Als to see completely around the drone a lot of cameras are needed. I may am going to work on an ai based flying algorithm which learns how to fly a drone using behavioral cloning. This same concept i already used in a autonomous car project which i will post a video of coming week!

    • @lobo5727
      @lobo5727 4 ปีที่แล้ว

      @@sieuweelferink6852 that's good idea but I don't think drone needs ultra sonic sensors in all directions.. because people like us use only fpv camera and altimeter to fly a drone.... But I am not real genius in drone control.
      github.com/wangyida/gan-depth-semantic3d/tree/master/3dv I found this but it's little complicated. And camera is arducam readily available suppose if you're making so, 😜😍
      Ultra sonic hc04 has 3.5m detection range
      Nice idea .. if u add ultra sonic sensors around it would be great for path finding but stereo camera may provide better clarity of depth sensing.(whatever you can apply your own ideas)
      Okay waiting for next week now, 🤣🤣 thanks for reply

  • @stonynotdusty
    @stonynotdusty 5 ปีที่แล้ว

    Good work.. I will try to do this.

  • @TheComforter3
    @TheComforter3 4 ปีที่แล้ว

    Hi Sieuwe Elferink,
    Can I use python 3.8.1 if not I'll use 2.7 to program the drone? After watching your video I have a ps-drone shipping to me and I see programming drones as the future! This could be a great income provider, because companies will be hiring like Amazon for anyone who has experience in this field of know how with drone program knowledge.
    What was your greatest obstacle with this drone project in coding? Awesome video presentation Sieuwe!

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      The biggest obstacle was to find a drone which was easy to program. I wantwd to quickly devolep something since i only had 3 days. This is why I used the ar drone because there are a lot of examples and a very nice python library which makes it easy to control the drone. If this was not made then that was the biggest obstacle. Because the control was easy i think the biggest obstacle was making a good tuned P controller for minimizing the error from the center points. This could still be done much better. I am now working on a new drone project where i will be doing this much better with also a more professional drone.

  • @yunusemreemik
    @yunusemreemik 5 ปีที่แล้ว +1

    keep goin my friendo

  • @vincentvenhuizen4147
    @vincentvenhuizen4147 4 ปีที่แล้ว

    Nice vidoe man!

  • @CarlosRamirez-dt3mr
    @CarlosRamirez-dt3mr 4 ปีที่แล้ว

    Greta video i enjoyed your video! just wanted to comment to show my appreciation

  • @antoniomanuellozanoortega6088
    @antoniomanuellozanoortega6088 5 ปีที่แล้ว

    Nice work!!!

  • @phelanvo2634
    @phelanvo2634 4 ปีที่แล้ว

    What was the purpose of line 212 in your Main.py file? I don't really follow the conditional statement made: " if cv2.waitKey(25) & 0xFF == ord('q'tAltitude - Altitude) < -80". Thanks in advance for any assistance

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว +1

      hi Phelan I think that it was a weird copy paste bug because it was not suppose to be there. I fixed it right now on the github.

  • @sharyatsingh1117
    @sharyatsingh1117 4 ปีที่แล้ว

    hey man,
    I love your project and I really want to do that by myself.
    I wanted to ask if you used an audrino or something? maybe you said it but I missed it.
    secondly, could you tell me what skills I need to know? I can do some python programming and I am learning to use an audrino. will that be enough?
    thanks and best of luck with your future projects

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      This drone does not use a Arduino or any microcotroller. This drone actually has a small computer inside it running a stripped down version of linux. This is also why I chose this drone. I used a library called PS drone which enables made me able to control the drone with simple python functions. If you want to make this yourself buy a AR-drone since it is really simple to work with. Also learning Arduino is a great skill to have but not needed for a project like this.

    • @zainabhamid3994
      @zainabhamid3994 4 ปีที่แล้ว

      @@sieuweelferink6852 I want to design my own controller with parrot AR drone. Is it possible to test complicated control algorithms on it

  • @mulkimaulifahmi6261
    @mulkimaulifahmi6261 4 ปีที่แล้ว

    bro want to ask, should the ar drone camera be moved down? what is the effect when the camera is not moved?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      Yes camera needs to be moved down!!!! Otherwise software wont work. Make sure to read the readme on GitHub for instructions!

    • @mulkimaulifahmi6261
      @mulkimaulifahmi6261 4 ปีที่แล้ว

      @@sieuweelferink6852I've moved bro, but for the reading of the image is not terdektesi, I've read the instructions on GITHUB and I've followed the instructions but the drone does not follow the target on the circle

  • @junaidahmad2805
    @junaidahmad2805 4 ปีที่แล้ว +1

    Great bro

  • @bluesdog88
    @bluesdog88 4 ปีที่แล้ว

    Sieuwe, so what do we need to get started on controlling a drone with python as far as drone hardware goes? Just a drone with a camera? Obviously some come with software, or you can buy software but I want to learn how to interact with it and fly one from my PC ;)

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว +1

      If you want to fully control the drone on low level you will have to start with mathematical models representing forces on the drone and perform optimization to minimize errors. Use something like a rpi with esc connected to the pwm gpio pins of rpi. Then according to the mathematical model perform stabilization by writing pwm to the esc’s. But trust me this is very low level and will take you a lot of time and research. If you want something quick just use a drone with existing Python library.

    • @bluesdog88
      @bluesdog88 4 ปีที่แล้ว

      @@sieuweelferink6852 OK thanks, appreciate it! I don't want to reinvent the wheel lol

  • @noamamir0942
    @noamamir0942 4 ปีที่แล้ว

    how did you send commands to the drone, what kind of transmitter did you use?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      I used a library called ps drone. This uses the wifi connection between the drone and the pc running the python script to send commands using the ar drone protocol.

  • @MACaronyboy
    @MACaronyboy 4 ปีที่แล้ว

    Is this possible on the smaller Parrots such as the Mambo?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว +1

      probably but you have to change the code to make it connect with that drone. The computer vision code will work just fine only the drone part has to be changed.

  • @PhobosEtDeimos667
    @PhobosEtDeimos667 5 ปีที่แล้ว

    Goed gedaan. Hoe heb je de vertraging van de door de drone uitgezonden video gecompenseerd?

    • @sieuweelferink6852
      @sieuweelferink6852  5 ปีที่แล้ว +2

      Hoi P Dg. ik heb daar geen rekening mee hoeven te houden om twee redenen. Ten eerste is de PS Drone library super snel dus is er minimale vertraging. Ten tweede maakt een kleine vertraging van bijvoorbeeld 50ms niet zoveel uit. dit is omdat als de drone bijvoorbeeld naar links beweegt ten opzichte van de stip dan veranderd deze bewegings trend niet in 50ms zo erg dat de drone plots een heel andere beweging moet maken. Dit zou wel uitmaken als je hem helemaal 100% op de mm nauwkeurig in het midden wilt krijgen maar dat praktisch gezien toch onmogelijk. Bij dit project was het goed als de drone ongeveer in een circle van diameter 30cm rond de rooie stip vliegt.

  • @gowravkrishnachowdaryboyap6867
    @gowravkrishnachowdaryboyap6867 4 ปีที่แล้ว

    Can anyone give the buy link for the drone please

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      www.amazon.com/Parrot-AR-Drone-2-0-Elite-Quadcopter/dp/B00FS7SSD6

  • @sacation6057
    @sacation6057 5 ปีที่แล้ว +1

    Lekahh!

  • @kyiseinmsp8005
    @kyiseinmsp8005 4 ปีที่แล้ว

    I have a problem about ps-drone. how can i fix it?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว +1

      what is the problem

    • @kyiseinmsp8005
      @kyiseinmsp8005 4 ปีที่แล้ว

      Python 3.8 is installed in my device and cv2 too. But ps_drone can’t be installed. May be I don’t know how to do. Please give some advices.
      Ps. I ran main.py with visual and it show many red lines.

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      @@kyiseinmsp8005 Ps drone does not need to be installed. You only have to download the Ps drone python file from the Ps drone website and put it in the same folder as the main python script. It should then work.

    • @kyiseinmsp8005
      @kyiseinmsp8005 4 ปีที่แล้ว

      Thanks a lot. I will try it again.

  • @programminginflip-flops6857
    @programminginflip-flops6857 4 ปีที่แล้ว

    does it work with any drone? I'm having a bad time trying to understand if people is programming an specific kind of drone or if all of them are programable (straight out of the box I mean)

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว +1

      It depends on the drone. The AR Drone is specially devoleped with developers in mind. They provide documentation on how the drone can be programmed and a framework. Some companies like dji don't do this so programming them will require reverse engeneering the hardware and software. This is A LOT of work and maybe it is even impossible because the drone is can be locked down. If you want to program a drone the Parrot AR Drone is the easiest one.

    • @programminginflip-flops6857
      @programminginflip-flops6857 4 ปีที่แล้ว

      @@sieuweelferink6852 nice, thanks man,keep up the good work

  • @vunamnguyen9630
    @vunamnguyen9630 4 ปีที่แล้ว

    Do you know how to code a drone to take off?

    • @fatihmurat2185
      @fatihmurat2185 4 ปีที่แล้ว

      Take a look at DroneKit library

  • @Sibabalwe_Sinyaniso
    @Sibabalwe_Sinyaniso 4 ปีที่แล้ว

    nice bro

  • @gravitowl
    @gravitowl 4 ปีที่แล้ว

    Hey i didn't get, do i need this specific drone for this? Today i just realized it would be cool to make a drone fly with my computer but like idk if it's possible with my drone... Don't ask me which drone ive got lol its like the most cheap drone idk where it came from

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      Hi you need to have this specific drone called: AR-drone from parrot. Any other drone wont work with this code.

    • @gravitowl
      @gravitowl 4 ปีที่แล้ว

      @@sieuweelferink6852 Oh ok. Is there any chance of me writing this myself (i have some knowledge of python and JS and im willing to learn more as soon as i know it is possible or not.) and make it work on a normal drone, or do i need a drone with special functions for this?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      gravitowl you can make code to work with any drone but it depends on hoe much work you want to put into it and how easy you want it to be. I used this drone since there were already multiple libraries written for it, it already had a camera which i can get the feed from and it is intelligent enough to hover by itself without continue direct input like cheap drones need. If you want to keep it easy use this drone!

    • @gravitowl
      @gravitowl 4 ปีที่แล้ว

      @@sieuweelferink6852 Okay, ill try to do some more research. i don't have the biggest budget, and ucrrently im already saving up for a gaming pc. About cheap drones not being able to hover by themselves, i got a 30 dollar wish drone that does it perfectly haha! Thanks for this info!

  • @mike_vahemoubayed8099
    @mike_vahemoubayed8099 5 ปีที่แล้ว +2

    What drone did you use
    Edit: nevermind

  • @sahilmangotra1214
    @sahilmangotra1214 3 ปีที่แล้ว

    Dope

  • @lokerantzau4097
    @lokerantzau4097 4 ปีที่แล้ว

    When I run Main.py, I get:
    Traceback (most recent call last):
    File "Main.py", line 158, in
    CurrentAltitude = drone.NavData["altitude"][3]
    KeyError: 'altitude'
    Help :D

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      Hi Loke I can remember I also had that error but I can't remember right now how I fixed it. Will take a look this week. In the mean time you can try to look in the psdrone.py file for the altitude key. Maybe I have made a typo?

    • @lokerantzau4097
      @lokerantzau4097 4 ปีที่แล้ว

      @@sieuweelferink6852 Thanks man :) I will look into the file. btw you are doing a awesome work and I really appreciate it.

    • @aashishgautam3519
      @aashishgautam3519 4 ปีที่แล้ว

      Have you found. a solution for this? I am also having a same problem.

    • @PhobosEtDeimos667
      @PhobosEtDeimos667 4 ปีที่แล้ว

      @@aashishgautam3519 Visit www.playsheep.de/drone , there is a documentation, tutorials and you can ask for help.

  • @eugenesewor3622
    @eugenesewor3622 5 ปีที่แล้ว

    that was inspiring

  • @abaskamal8599
    @abaskamal8599 4 ปีที่แล้ว

    nice

  • @SauravKumar2
    @SauravKumar2 5 ปีที่แล้ว

    how to install or connect ps drone???

    • @sieuweelferink6852
      @sieuweelferink6852  5 ปีที่แล้ว +1

      you don't have to install it. download the psdrone.py file from the ps drone website and make sure it is in the same folder as my python script.

    • @SauravKumar2
      @SauravKumar2 5 ปีที่แล้ว +1

      @@sieuweelferink6852 ok when i run it in my python 2.7 and wifi is connected then it will fly

    • @sieuweelferink6852
      @sieuweelferink6852  5 ปีที่แล้ว +1

      @@SauravKumar2 yes

    • @sieuweelferink6852
      @sieuweelferink6852  5 ปีที่แล้ว +1

      @@SauravKumar2 what is your problem?

    • @SauravKumar2
      @SauravKumar2 5 ปีที่แล้ว

      @@sieuweelferink6852i am unable to fly my drone. The code has some errors. Please help me.

  • @Daniel-rj2ci
    @Daniel-rj2ci 5 ปีที่แล้ว

    Mooi hoor

  • @remolaan3741
    @remolaan3741 4 ปีที่แล้ว

    you are greeat

  • @Dreacon34
    @Dreacon34 4 ปีที่แล้ว

    It’s Not AR maybe you mean AI?

    • @sieuweelferink6852
      @sieuweelferink6852  4 ปีที่แล้ว

      The drone I am using is called an Parrot AR Drone that is why I say AR Drone. Using the word Ai does not have any meaning in this project since there is no Ai used in this project. I only use traditional Computer vision and PID control techniques.

    • @Dreacon34
      @Dreacon34 4 ปีที่แล้ว

      Sieuwe Elferink that’s also true , I just was confused what AR should be in this project but well I guess marketing fail from Drone Developers. But yeah there is no AI in this project. But some people call their software AI even it’s not AI.

  • @huseynilproqramlasma446
    @huseynilproqramlasma446 3 ปีที่แล้ว

    and i can't use ps_drone.can you help me?