Adding AI Vision To A Robot Car Using A Huskylens - Line & Object Tracking

Поділитися
Вставка
  • Опубліковано 30 чер 2024
  • Today we're going to be adding a Huskylens to a robot car to give it AI-powered line and object tracking abilities. Huskylens is a standalone sensor with 6 pre-configured recognition algorithms, which enables you to easily add AI-powered vision to your Raspberry Pi and Arduino projects. We're going to be trying out the line and object tracking modes on the robot car which I had previously built for an obstacle avoidance project.
    Visit my blog for the full written guide, including the code and 3D print files - www.the-diy-life.com/adding-a...
    The Huskylens used in this video was sent to me by DF Robot to share with you, check out their website - www.dfrobot.com/product-1922....
    My original ultrasonic sensor robot car project - www.the-diy-life.com/arduino-...
    What You Need To Build Your Own Robot Car
    Arduino Uno - amzn.to/2OgoMvv
    L293D Motor Driver Shield- amzn.to/3fpTzld
    Huskylens - amzn.to/2P7MfmD
    4 x Geared DC Motors & Wheels - amzn.to/3dAZghI
    9-12V Battery Pack
    8 x M3 x 15mm Socket Head Screws - amzn.to/2V7vaZ5
    Ribbon Cable - amzn.to/340xB3B
    The above parts are affiliate links. By purchasing products through the above links, you’ll be supporting this channel, with no additional cost to you.
    If you've got any ideas for Raspberry Pi, Arduino, or other Electronics projects or tutorials you'd like to see, let me know in the comments section.
  • Навчання та стиль

КОМЕНТАРІ • 80

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

    This is awesome! Huskylens, seems to be the most advanced device out there.

  • @oscargonzalez6309
    @oscargonzalez6309 3 роки тому +12

    Very interesting... I wonder if this could be used to make wheel chairs.
    Usage like that would be great for supplying specific needs at an accesible price.

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

    So the Motor shield needs pins sawdered to it, wonderful, thanks great project.......

  • @stephangrobler5524
    @stephangrobler5524 2 роки тому +2

    This helped alot. Want to build something like this to mount a gimbal and use it as a automated dolly.

  • @NoName-vg1gz
    @NoName-vg1gz 3 роки тому +3

    I Bet your wife was not too happy when she saw the lines drawn on the floor..... Awesome little piece of hardware, Well done.

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      Haha. They were just drawn with a whiteboard marker, so were pretty easy to wipe off.

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

    You should try hooking it up to wifi put a camera on it and use BLIP 2 to make sense of the environment around it

  • @renukaskitchen8082
    @renukaskitchen8082 3 роки тому +3

    Nice

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

    It is very nice..But you are suggested to make a video on both object tracking and obstacle avoiding robot car.

  • @tanvirhossen5473
    @tanvirhossen5473 2 роки тому

    Amazing project sir😍❤️❤️..

  • @SimplyAlteringMaterials
    @SimplyAlteringMaterials 3 роки тому +4

    REALLY COOL GADGET!!! You can probably put together a gimbal from this as well, one that can video record you while following your move within frame while on a 4 axis pan and tilt, setup on a tripod, is this possible?

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      This is a great idea. Yes, it certainly sounds possible. I've seen a couple of projects which have used these on the end of a robot arm or servo pan and tilt bracket. These aren't too different from a gimbal.

  • @EngineeringAfterHours
    @EngineeringAfterHours 3 роки тому +4

    I do a lot of projects with larger scale RC cars on my channel, and I've always wanted to do a non-gps follow me robot. Is this something that could be realistically used for that?
    I'd want to be able to run in the 15-20mph range.

    • @MichaelKlements
      @MichaelKlements  3 роки тому +3

      You could probably make a fairly reliable object or person tracking robot with a Huskylens. You might need to wear something easily distinguishable like a bright t-shirt or cap etc. to improve reliability.

  • @donaldklopper
    @donaldklopper 3 роки тому

    Loved it! USD55 for the Huskylens doesn't seem excessive.

    • @MichaelKlements
      @MichaelKlements  3 роки тому +2

      Yes, it is pretty good value for its capabilities.

  • @Berghiker
    @Berghiker 3 роки тому +1

    The background looks a lot like kings terrace in PE. Awesome thin line following robot!

  • @gwb8548
    @gwb8548 9 місяців тому

    Thanks for upload the Video, I've tried to Arduino Nano, L9110 dc motor driver. Is it possible to driving?

  • @Jerseylance1
    @Jerseylance1 3 роки тому +3

    This is great, but using on a humanoid robot is going to be hard.

  • @TheTechieScientist
    @TheTechieScientist 3 роки тому +3

    It's very cool...but the link you mentioned in the description does not yield any results to the huskylens when i search it on the site

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      I’ve corrected the link to point directly to the product on their site.

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

    Hi, I just sub. this video is very helpful. I follow the instructions but my problem is power. How much voltage and amps did you use to make it work?

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

      I used a 3 cell (11.1V) LiPo battery, the car draws a few hundred milliamps when running

  • @amitschachar3914
    @amitschachar3914 3 роки тому +2

    looks good !!
    Do you know what is the maximum distance the camera can track an object ?

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      It doesn't really have a maximum distance, it depends on the size of the object as well. The camera has to be able to see the object and still have a recognizable shape on the display in order to track it. So it could track a coin for a couple of feet, but would likely track a whole building that's a few kilometers away if it's clearly visible.

    • @amitschachar3914
      @amitschachar3914 3 роки тому

      @@MichaelKlements great you helped me a lot!

    • @SURYAPRAKASHR-ch9ph
      @SURYAPRAKASHR-ch9ph Рік тому +1

      no Way maxi below 1 meter

  • @bitsurfer0101
    @bitsurfer0101 2 роки тому

    Is there any zoom feature on the Huskylens? How much can it zoom if at all? Thanks for posting.

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

    what method is used in line reading using camera module

  • @Speedunique.
    @Speedunique. 2 роки тому +1

    Teacher how to get Robert car with using c++ program code with reading (black line stop )(white line move)

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

    How can the Huskylens be used with the new Orange Pi5 GPIO pins in Python? Thank you.

  • @CDE.Hacker
    @CDE.Hacker 3 роки тому +3

    I can see this running a little R2-D2. 🤯

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

    can the code change to make it avoid the line

  • @IvanSantana-rv9un
    @IvanSantana-rv9un 2 місяці тому

    where can I get the PIDLoop library
    ?

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

    sir please give arudino
    code

  • @user-os1xg1rh4c
    @user-os1xg1rh4c 3 роки тому

    is it possible to follow a human? could you check a half-body follow ? and is it possible to add algorithms or change them ?

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      You could set it to follow a particular part in a person. Like bright shoes or shorts etc., it also has facial recognition which you could use when facing the robot.
      You can’t add or modify the algorithms unfortunately. There are some basic adjustments/settings you can do to certain algorithms (like the facial recognition one)

  • @elizacrescini5350
    @elizacrescini5350 2 роки тому

    HI there , how can i adjust the distance of the object and huskylens before the motor stop, thanks :)
    and it also passible that i will only put 2 motor the m1 and m3 , it will still go forward left and right?

    • @MichaelKlements
      @MichaelKlements  2 роки тому

      The stopping parameters can all be adjusted in the code.
      Yes, you can use tow motors (provided their strong enough to move the car) and it will still be able to go forwards, left and right, it just won't turn on the spot like this one does.

  • @sphinxzapper2071
    @sphinxzapper2071 7 місяців тому

    why do i get the error fatal error: PIDLoop.h: No such file or directory

  • @fro2lier82
    @fro2lier82 3 роки тому

    I read your post on 'The DIY life'
    But I have some problems. robot didn't move when I use your line tracing code, parts and diagram
    Are there anything I have to do in your code??... like changing some parameter?

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      You’ll need to adjust some parameters to get it to run smoothly, but the wheels should at least turn without making any changes.
      Is your Huskylens in line tracking mode and have you trained it on the line you want it to follow?

    • @fro2lier82
      @fro2lier82 3 роки тому

      ​@@MichaelKlements Thanks for replying
      After I changed 'int left & right Speed' from 0 to 70~80, it started to move.
      Q1. Is this right parameters that I adjust for moving my robot??
      //Of course, I think other things need to be adjusted, but I wondered if that changing those(int Speed) is right to work
      + I checked my huskylens in line tracking mode and I2C protocol

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      That’s great. Yes that is one of the parameters which can be adjusted. It’s essentially a type of “gain”. So if your motors have more friction or your battery produces less voltage then increasing the speed will get more power to the motors.

    • @fro2lier82
      @fro2lier82 3 роки тому

      @@MichaelKlements I really appreciated your help! Finally, I made my robot following the line smoothly by keeping editing some parameters..!!
      But I would like to get some more advices from you. I want to make "each DC motors to move Forward/Backward when turn right or left". Because I used mecanum wheels, I think it is neccessary for omni-directional move. But after editing "Using BACKWARD or FORWARD at Void turnRight(int duration) & turnLeft(int duration)", my robot only goes Forward...
      So... What do you think about this problem? Can I ask for some advices on this problem?

    • @Maru-bo6tq
      @Maru-bo6tq Рік тому

      @@fro2lier82 can you tell me what parameters have you edited? my car won't turn left or right :(

  • @bofa-zi4fj
    @bofa-zi4fj 3 роки тому

    Can it still avoid obstacles with the husky camera?

    • @MichaelKlements
      @MichaelKlements  3 роки тому

      Not in the same way an ultrasonic sensor works. A single camera can't be "depth" aware. You could program it to avoid a certain object, so if the object appears in screen then the car turns away from it or reverses.

  • @WEIKU-uc4ph
    @WEIKU-uc4ph Рік тому

    Hello, I keep getting " Fail to request data from HUSKYLENS, recheck the connection!
    " pop-ups and I don't know what the reason is, I was wondering if you have had this problem too?

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

      There must be an issue with the connection to the Huskylens - it is likely either not receiving power reliably or the data connection is not good.

  • @doctorgreatengineer6834
    @doctorgreatengineer6834 3 роки тому +2

    can I add a wireless control to this robot, where I can watch captured video live and control the movement of it??

    • @MichaelKlements
      @MichaelKlements  3 роки тому +2

      You can add wireless control to it using a Bluetooth or wifi module. Unfortunately you won’t be able to capture live video as this isn’t supported by the Huskylens. You’d probably need to use a Raspberry Pi get get a video feed sent wirelessly from a robot car.

    • @doctorgreatengineer6834
      @doctorgreatengineer6834 3 роки тому +1

      @@MichaelKlements o i thought about that. instead of doing it myself i can find other readymade kit.

  • @haideraslam007
    @haideraslam007 10 місяців тому

    can you help me in my project: Follow-Me Robot with Real Time Obstacle Detection using Deep Learning

  • @pacomacaw2456
    @pacomacaw2456 3 роки тому +1

    How did you attach pin 13. Soldered?

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      I've soldered header pins to the spare IO on the shield.

    • @pacomacaw2456
      @pacomacaw2456 3 роки тому

      @@MichaelKlements As a beginner(at the tender age of 68), I have not learned how to do fine soldering (yet).
      However I discovered a Screw Terminal Shield, which, when located between the Arduino and the L293, gives me access to all the pins. Very cool.

    • @MichaelKlements
      @MichaelKlements  3 роки тому

      That sounds like a good solution as well. You should get a small soldering iron and try it out, it's really not that difficult once you get the hang of it. You can practice on some old wires and header pins.

  • @sphinxzapper2071
    @sphinxzapper2071 7 місяців тому

    can it do object avoidance with this?

  • @Cyberdemon22Gaming
    @Cyberdemon22Gaming 3 роки тому

    Can you tell me how do you calculate the PID loop for this project?

    • @MichaelKlements
      @MichaelKlements  3 роки тому

      The PID loop only really uses P, so it’s not true PID control. I just used a PID library as in the example script from the Huskylens Wiki

    • @Cyberdemon22Gaming
      @Cyberdemon22Gaming 3 роки тому

      @@MichaelKlements i tried your code but the TT motors only vibrate when huskylens track a line any solution?

    • @MichaelKlements
      @MichaelKlements  3 роки тому

      Try adjusting the motor speed value, check your connections and make sure that your battery pack is actually able to supply enough power to drive the motors.

    • @Cyberdemon22Gaming
      @Cyberdemon22Gaming 3 роки тому

      ​@@MichaelKlements it works now but i have an issue.. it wont turn left/right when huskylens detect the left/right line

    • @fro2lier82
      @fro2lier82 3 роки тому

      @@Cyberdemon22Gaming Can you tell me how to solve your problem?
      I had same issue when I use TT motor.. and his code

  • @aldairmontesdeocacruz8398
    @aldairmontesdeocacruz8398 2 роки тому

    I have a problem, when i tried to upload the program, Arduino doesn´t compile due to error status 1. Can you help me, please?

    • @MichaelKlements
      @MichaelKlements  2 роки тому +1

      That's a compilation error so I'd say you've probably got an error in your code or your haven't installed the required libraries

    • @aldairmontesdeocacruz8398
      @aldairmontesdeocacruz8398 2 роки тому

      I have the solution.
      You need to leave your library AFMotor.h before the huskylens file
      That was the solution that I found, now I can run the program without issues
      Thanks for the support

  • @sohamgaud7120
    @sohamgaud7120 3 роки тому +1

    Sir plz a request from your subscriber
    sir plz can you make a detailed video on how to code huskylens with arduino
    actually I am not getting the code pre writtened so plz request can u make a detailed video on coding huskylens plz🙏🙏🙏🙏🙏🙏😊

    • @MichaelKlements
      @MichaelKlements  3 роки тому +1

      I’ll have a look at putting something together. What would you like to do with it that isn’t covered in the blog post for the project?

    • @sohamgaud7120
      @sohamgaud7120 3 роки тому +1

      @@MichaelKlements Sir actually I do coding and make different types of gadgets
      And i am thinking to make a project on huskylens but in arduino idea the code for huskylens which is pre written I am not getting that code
      So plz can you explain the code because I like your teaching pls sir🙏🙏😇

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

    My huskylens is going on and off when arduino is not connected to a usb cable to laptop. 😢 Can anyone explain it to me?