Computer Vision Autopilot for RC Airplane

Поділитися
Вставка
  • Опубліковано 22 сер 2024

КОМЕНТАРІ • 73

  • @quantabba5236
    @quantabba5236 Рік тому +3

    Awesome work! Truly game changing for the open source radio control community

    • @timmarkhuff
      @timmarkhuff  Рік тому +1

      And there will be more updates in the coming months!

  • @ericmorales7588
    @ericmorales7588 Рік тому +2

    Impeccable piloting and astonishing craftsmanship! I knew you were my favorite Tim for a reason :D keep up the great work. I can't wait to see where you take your plane from here; mostly cause it's usually the other way around! xD

  • @didiee1871
    @didiee1871 Рік тому +1

    1:38 very cool set up with the FPV goggles!😮

  • @jsmythib
    @jsmythib Рік тому

    NIce to have flap turns without disengaging autopilot. Very cool project.

  • @HandOfVOD
    @HandOfVOD Рік тому

    Good job with that system! You've actually explained this complex system so good and easy to understand

  • @aa.2121
    @aa.2121 Рік тому +1

    Great work, Tim!

  • @jordanbarnes1870
    @jordanbarnes1870 Рік тому

    If you haven't started working on the waypoint system consider this:
    When a (return to) waypoint is designated, start recording the velocity of the craft and its time traveled, to return to the waypoint(s) you can just reverse this velocity (for binary waypoint travel) or have it loop through each velocity transposed by some algorithmn (depending on the last visited waypoint) for loop routines.
    Just a thought.

  • @5x25_fpv
    @5x25_fpv Рік тому

    Very cool project! I would love to see a future version that uses a down facing cam and a offline map to calculate position :D

  • @fazrulrusdi3709
    @fazrulrusdi3709 Рік тому

    Will be my new favourite channel.. Keep it up

  • @NicholasRehm
    @NicholasRehm Рік тому

    Awesome stuff

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Thank you! I just released the next video in this series. Check it out if you are interested: ua-cam.com/video/BQiIkhdTP4o/v-deo.html

  • @Player-pj9kt
    @Player-pj9kt Рік тому

    I think before you move on to altitude you need to determine the velocity of the plane (perhaps you can highlight key features in the video frame like a tree, building, etc and track how it's position changes over time). Then you can integrate the velocity (calculus is useful here) in terms of time to get altitidue (you only need the vertical component of the speed). Most computer mouses use this technique and a small image sensor to figure out this their position so I recommend research how they work . I also know that the Intel RealSense tracking camera uses 2d images to get velcoity (in the same way a mouse does) and uses velcotiy to get the real time 3d position. I wish you luck!

    • @timmarkhuff
      @timmarkhuff  Рік тому +1

      Good ideas! I don’t think visually tracking elements moving on the screen could determine a velocity though. There are so many confounding factors. To start with, altitude: you wouldn’t see much movement at high altitude and you will see a lot at low altitude, and we don’t even know the altitude at this point. Also, turning would cause things to move on screen, and we don’t know the rate of change of yaw either.
      There may be some complicated VSLAM algorithms that could do what you are describing, but I don’t think they can run fast enough, and I still doubt if they would work at all when flying high and little is changing on screen.
      Another consideration is that all of these methods could at best tell you ground speed, but what you need to know with airplanes is the airspeed.
      Recently, I have been thinking about using control surface authority as a proxy for airspeed. I might make a video on that in the future when I start working on that, but I have other tasks I need to complete first

  • @alisioardiona727
    @alisioardiona727 Рік тому +1

    2:24 ''to trim the angle of attack''. Well technically it's to trim the attitude of the aircraft.

  • @bartonfink5051
    @bartonfink5051 Рік тому

    amazing

  • @haydo8373
    @haydo8373 Рік тому +1

    Woah, nice work! It will be interesting to see how you approach the altitude issue. It doesn't seem like there's an easy approach. I wonder if a second camera that always faces down (two dimensional gimbal) could infer altitude by the speed of object movement through the field of view. You could also model the upper air windspeed and direction by subtracting what you expect from your plane given its performance, (turning radius and level flight considering engine output). A long climb out into wind would allow it to start building such a model that can be updated throughout the flight. I think that's how I'd approach it.

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Exactly, it's not an easy issue to solve. Using the inferred ground speed of the plane could be problematic; if there's wind, this wouldn't be accurate. I'm wondering if there are any machine learning models that could be trained to infer segments of ground that are "far away". Even that has problems though. It might be slow, and what happens when the ground is not visible?

    • @LimabeanStudios
      @LimabeanStudios Рік тому

      @@timmarkhuff why wouldn't a generic barometric pressure sensor work for you?

    • @timmarkhuff
      @timmarkhuff  Рік тому

      @@LimabeanStudios you’re right, it would work. However, my original plan was to only use computer vision, just as an exercise/challenge. I might end up abandoning that idea and incorporating some standard sensors.

    • @LimabeanStudios
      @LimabeanStudios Рік тому

      @@timmarkhuff You know, I spent like 5 minutes trying to I think of why it wouldn't work totally forgetting you were going for pure computer vision.

  • @surajraika9245
    @surajraika9245 Рік тому

    great

  • @matsinorge
    @matsinorge Рік тому

    this is awesome, good luck

  • @ArduinoPilot
    @ArduinoPilot Рік тому

    Awesome stuff man!

  • @garyweliver1870
    @garyweliver1870 Рік тому

    WayPoint mission only with computer vision reminds me of back in the day flying my quadcopter in a familiar area was easy to find home because my vision provided the sight of familiar landmarks but if you are flying somewhere for the first time you need to follow a road or some type of a bearing in order to find home again, right? Seems storage of visual landmarks will need to be recalled same with flying to a WayPoint from scratch without a compass? Good way to get loss, it seems?
    I am really impressed with what you've done so far!!!

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Flying a waypoint mission with computer vision would be challenging for sure. Not sure if I will be able to pull it off. I typically fly at the same field, so I could train it to recognize the corners of the field. I might also abandon that idea altogether. I just bought a GPS module, so I might use that instead.

  • @alvictor1291
    @alvictor1291 Рік тому

    Any plans to eventually intergrate this into something like Ardupilot? Super cool work, especially without an IMU.

    • @timmarkhuff
      @timmarkhuff  Рік тому

      I am interested in doing that, but at the moment I am having fun making my own flight controller.

  • @tn1509
    @tn1509 Рік тому

    Cool project😊 don’t bother with rudder control

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Why no rudder control?

    • @tn1509
      @tn1509 Рік тому

      because it's useless unless you wish to do aerobatics (assymertic flight) or if you must have a perfect lateral control during crosswind takeoffs and landings 😅 => I think both cases are irrelevant in your case (basically mono speed aircraft. takeoffs and landings from/to whatever )
      Never forget that the best way to avoid a system failure, is by deleting it lol.
      Go on simplicity.
      Use programmable/mechanical aileron differential to avoid lateral dissymetry during flight ... but maybe you have no idea of how to adjust such parameters ... ?!?
      If your airplane has issues with lateral stability, increase the vertical surface. An approximate formula here
      Va*l/b*Sw=0.035
      where :
      Va=vertical surface (rudder and fin)
      l=distance from the forward 1/4 of the wing's median chord to the forward 1/4 of the vertical surface's median chord
      b= wingspan
      Sw= wing surface
      all figures must be in metric decimeters.
      I really love your project. Ask for more info if you wish :) GL

  • @RafaelLedesma45
    @RafaelLedesma45 Рік тому

    Amazin work, i need one. lol

    • @timmarkhuff
      @timmarkhuff  Рік тому

      I’ll let you know when we go into production :)

  • @trarredbandit9734
    @trarredbandit9734 Рік тому +1

    Great project, but I dont think it would be able to fly high high because at that point, there would be no object to determine the horizon. Do you have any ideas as to how you will fix this?

    • @timmarkhuff
      @timmarkhuff  Рік тому +1

      The plane would still be able to see the horizon when it is flying high. However, I believe that as it flies higher, it might need to aim for some point above the horizon in order to maintain level flight; pointing directly at the horizon would cause it to go down. If this is the case then plane needs an altitude sensor to help it deal with this effect. I may never be able to test this since I am using an RC plane that cannot legally fly high.

    • @trarredbandit9734
      @trarredbandit9734 Рік тому

      @Tim Huff That would make sense. This is a rather interesting and new project I've never seen before

  • @unclelelax8341
    @unclelelax8341 11 місяців тому

    i badly want this kind of stuffs for my project in thesis. especially UAV projects for reconnaisance using raspberry pi. is it possible for me to build it from scratch? even the plane itself?

  • @flyingcatto404
    @flyingcatto404 Рік тому

    Are you using some kind of edge computing device like google coral usb accelerator or intel ncs2?

    • @timmarkhuff
      @timmarkhuff  Рік тому

      No, but I would like to experiment with that. I looked into Coral TPUs a while back, and they were either unavailable or super expensive due to global supply chain issues. They aren’t necessary for what I am doing right now, but if I want to run an ML model, they would be critical.

  • @stage666
    @stage666 Рік тому

    May I ask how is the realtime video feed transmitted to you? What is the controller range of such a RC plane and how would you know it is about to go out of range? What happens if it fly out of range? Lost forever? Thanks!

    • @timmarkhuff
      @timmarkhuff  Рік тому +1

      There are two cameras on the plane. A raspberry pi camera 2 is used for the computer vision operations. It also records footage onboard, and that is what you see in my videos. It doesn’t transmit footage in real-time.
      I also have an FPV camera with an antenna that transmits footage back to my goggles. I have never really tested the range, because I fly within a park, but sometimes at the corners of the park, the image starts to get a fuzzy, so I turn back. The airplane transmitter has RSSI, so I get warnings if signal is low, but that rarely happens in practice.

    • @stage666
      @stage666 Рік тому

      @@timmarkhuff Great stuff. Thanks!

  • @andreassittig2772
    @andreassittig2772 Рік тому

    Awesome! If you were flying close to a mountain ("bending" the horizon), your algorithm would tend to steer away from it, is that correct?

    • @timmarkhuff
      @timmarkhuff  Рік тому

      That’s correct. I’m interested in finding more robust techniques that can deal with things like mountains, trees, buildings and other obstructions.

    • @andreassittig2772
      @andreassittig2772 Рік тому

      @@timmarkhuff I wouldn't put mountains in the same category as trees and buildings. From the point of view of a bright/dark border finding algorithm, there are places where the (apparent) horizon isn't horizontal. If your plane has sufficient aerodynamic stability, you could calibrate the inclination and height of the apparent horizon while it is gliding without any rudder input. Then, from optical flow analysis of a donw facing camera signal, estimate yaw rate and start creating a "horizon map".

    • @timmarkhuff
      @timmarkhuff  Рік тому

      @@andreassittig2772 when you say sufficient aerodynamic stability, are you thinking of planes with dihedrals that naturally tend towards flying level, like gliders? That could be interesting. I have a glider like that, and in theory, my program could control it by only managing the pitch. The roll would be managed naturally by the aerodynamics of the plane. The idea of the downward facing camera is interesting, but I’m trying to keep it to one camera at the moment. I’ve purchased a GPS module, and might just use that to manage the yaw/waypoint finding of the plane, even though that is straying a bit from the original goal of this project.

    • @andreassittig2772
      @andreassittig2772 Рік тому

      @@timmarkhuff I'm thinking of all en.wikipedia.org/wiki/Aircraft_dynamic_modes having positive damping. Such behavior is not limited to gliders. In the human-carrying world, I would expect it from the likes of en.wikipedia.org/wiki/Cessna_172 (at idle, not necessarily at full power), not from a en.wikipedia.org/wiki/Swift_S-1 and certainly not from a en.wikipedia.org/wiki/Extra_EA-300.
      GPS, really? C'mon, there are optical alternatives: en.wikipedia.org/wiki/Celestial_navigation ;-)

    • @timmarkhuff
      @timmarkhuff  Рік тому

      @@andreassittig2772 celestial navigation? Nice. Might be hard to test that out in my local park though :)

  • @sahilnarola_0566
    @sahilnarola_0566 3 місяці тому

    Hey tim, how did this drone to maintain level flight without use of altimeter during autopilot?

    • @timmarkhuff
      @timmarkhuff  3 місяці тому

      Hi Sahil. Altimeters don’t keep a plane flying level; that’s the job of a gyroscope. My system can keep the plane flying level by visually identifying the horizon. Since it doesn’t have an altimeter, it will tend to lose or gain altitude over time. I’ve tried to think of ways to visually gauge the altitude of the plane, but haven’t been able to solve that problem yet

  • @djquick
    @djquick Рік тому

    Seems it would have difficulty flying in mountainous terrain where the mountains extend above the horizon line. This reminds me of the AP2000i IR autopilot systems we’d use on RC helicopters 15 yrs ago. Those had an array of 4 IR sensors to detect sky from ground… purely analog. They worked for the most part but not so well on cool cloudy days.

    • @timmarkhuff
      @timmarkhuff  Рік тому

      It would struggle with mountains for sure. I’m interested in making a system that uses a machine learning model to find the horizon line. I’m thinking it could look at more features than just relative brightness, and therefore achieve better accuracy.

  • @isntitawesome2104
    @isntitawesome2104 Рік тому

    I am very new to these thing forgive me for the stupid question but i am curious is it possible that it can take off and land on its own.

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Currently no, I manually take off and land the plane

  • @GhostRyderFPV
    @GhostRyderFPV Рік тому

    Wow, applied computer vision to analog FPV, no less. I wonder if we could look at your project the other way, as a cost effective sensor for an existing FC implementations like APM or iNav. Say over CAN, i2c, etc, to supplement accelerometers and gyros. My Esky Eagles (same plane) was a test platform for 1.2W fpv and 21700 cells, but iNav was good enough for me, lol. I can only imagine where you'll take this!
    And besides where the h%%l did you find a Pi4?! haha

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Integrating the horizon detector into an existing flight controller would be a cool direction to take the project, however at the moment I am having fun building my own flight controller. I got my pi 4 a few years ago, before they became quite so expensive and scarce. I feel extra pressure to not crash when the pi 4 is onboard.

    • @GhostRyderFPV
      @GhostRyderFPV Рік тому +1

      @@timmarkhuff Tim I salute your gumption, Sir. I hope your horizons stay flat as Florida, and that your contrast values are always perfect!
      I can't judge, I'm presently trying to use Ardurover to drift a WPL D12, much, much less successfully than your project lol

  • @raztaz826
    @raztaz826 Рік тому

    Real neat! But what if if looses sight of the horizon?

    • @timmarkhuff
      @timmarkhuff  Рік тому +1

      It needs the horizon to be in frame in order to work. If it fails to detect the horizon, it will maintain its current control outputs for a short period of time (one second) and then revert to a 0. This behavior helps when it fails to detect the horizon for a short period of time.

  • @MRJFPV-zy4cx
    @MRJFPV-zy4cx Рік тому

    hay, awesome work, i am wanting to have OpenCV on Nano size drones with something like a pi zero or banana pi zero for obstacle avoidance proximity, could you help me out

    • @timmarkhuff
      @timmarkhuff  Рік тому

      I haven't done much with obstacle avoidance in drones, so I may not be much help, however I hope to tackle this challenge in the future.

  • @sharathm2451
    @sharathm2451 Рік тому

    how to switch on auto pilot mode from manual control,is there any option that already built in transmitter like in this video you turned on the switch

    • @timmarkhuff
      @timmarkhuff  Рік тому +1

      I designate one of the channels on my radio to be for the autopilot switch. It is operated by a two-way switch. On the plane, there is a Raspberry Pi that uses its GPIO pins to listen to several channels coming from the receiver. One of those channels is the autopilot switch. When the program sees that the autopilot switch is pressed, autopilot takes over.

    • @sharathm2451
      @sharathm2451 Рік тому

      @@timmarkhuff how can i contact you sir, i have some doubts regarding this..are you in Instagram..?can I get your I'd

  • @michaelalix4943
    @michaelalix4943 Рік тому

    Unfortunately Raspberry Pi is at scalping prices

  • @ShurupNow
    @ShurupNow Рік тому

    do you continue work on this project?

    • @timmarkhuff
      @timmarkhuff  Рік тому

      Yes, I plan to publish some updates in the coming months. Stay tuned!

  • @Aaron_b_c
    @Aaron_b_c Рік тому

    It's pronounced "et. Cetera". Not "eksetera"

    • @timmarkhuff
      @timmarkhuff  Рік тому

      It’s commonly pronounced both ways, but maybe we should stay true to the Classical Latin and pronounce the c as a k? 😊