Raspberry Pi Devastator Robot #4: Pygame & Speed Control

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

КОМЕНТАРІ • 473

  • @RoboNuggie
    @RoboNuggie 3 роки тому +137

    This video is why you garner so much respect Christopher, in an increasingly superficial society, you delve into the minutiae of how things work and why. Excellent. Thank you.

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

      thanks

    • @gnarlestongnu637
      @gnarlestongnu637 3 роки тому +6

      I would like to add that, on a completely superficial level, that robot is super cool and its face looks badass and if it tried to start a fight with me in a pub I would probably back down and buy it a pint.

  • @Hi-kq5rx
    @Hi-kq5rx 3 роки тому +41

    I’ve been waiting for this video to come out for a while... it was definitely worth the wait, great video as usual Christopher 👌😊

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

    The tank is back. Speed control is added. Always nice to see the robot in action.

  • @DrBenChem
    @DrBenChem 3 роки тому +24

    Always nice to listen to you talk about electronics whilst I peel my potatoes

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

    It’s always a good Sunday when @ExplainingComputers releases a video about the very thing I am working on. Thank you Chris.

  • @rikprince8414
    @rikprince8414 3 роки тому +5

    Ok, loved the technical bits. But, my favorite thing about THIS video was the robot's frowny face! :)

  • @resrussia
    @resrussia 3 роки тому +6

    Greatly enjoyed the latest installment of the robotics series. Keep up the good work!

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

    I have built a robot following your Guides and I have even added a remote firework launcher using a quad relay board. Using 4x 18650 batteries the tank goes really fast as well. Thank You Christopher for the video`s on what to do, You are very clear with instruction. All I need now is a PTZ camera with a live view so I can then drive it up and down the street, on my WiFi Launching my rockets lol.

  • @IsaacPiera
    @IsaacPiera 3 роки тому +5

    Great video!
    An improvement suggestion: If your robot gets out of range it will never receive the KeyUp event, so it will continue advancing forever.
    Solution: the controller sends the status of the keys every second not only when they are pressed or released. The robot has a timeout so if it doesn't receive an update every second it stops.
    You can test that by leaving a key pressed and switching off the controller, so it never sends the keyUp event and the robot initiates the emergency stop.

  • @lawrenceallwright7041
    @lawrenceallwright7041 3 роки тому +17

    Wife: "Raspberry pie? Why on earth would you possibly want a raspberry pie? You don't even like raspberries!"
    Me: (Points at Explaining Computers Devastator Robot video and whimpers.)

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

    Just watching this made me feel like a child again. I wish we had stuff like this "in my day".....*groan*.
    Genuinely Your channel is one of the most reliable for good content. Thanks so much!

  • @rohanverma6058
    @rohanverma6058 3 роки тому +9

    As soon as I thought you done with the pi zero robot, you strike me again with another video, really like it hope to see more.

  • @JoseLopez-oz1xm
    @JoseLopez-oz1xm 3 роки тому +3

    Loved it, and I can't believe the Robot found a stick. How crazy is that? Great Job Chris

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

      If it was a robot dog it would chase after it and pick it up.

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

    I thought I'd check in to see where you were at with the devestater project. So glad I did. I always enjoy your videos. I was hoping for a live view camera program but I'll take what I can get. Thanks for the video.

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

    This is one of my favorite projects; it's nice to see it filled out with some simple (but clever) code and improved hardware. Thanks for another great video.

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

    I had been wondering if the Devastator would return for an update and not disappointed. Using PWM is definitely a much better approach to getting the robot moving in a controlled fashion especially with the hard plastic tracks. Looking forward to the next instalment

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

    Great video ! I love the robotic ones. Can’t do detailed stuff like this anymore due to health issues so I appreciate allowing me to live vicariously through you.

  • @PS_Tube
    @PS_Tube 3 роки тому +16

    This robot project is interesting. And it looks stunning. A teeny tiny explorer.

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

      Grown up men still playing with toys is bad news all around.

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

      @@andreasproteus1465 Im a grown up and still play with RC cars 😆

    • @Peter.Sky.Walker
      @Peter.Sky.Walker 3 роки тому

      That's what she said. =[

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

      @@andreasproteus1465 How do you think new ideas get generated?
      Testing concepts on toys is a lot less expensive and dangerous than starting with full-scale hardware.

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

    So happy to see the robot back in the wild! Looking forward to your next video.

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

    So many opportunities for customization here -- one could modify the code to automatically slow the motors during a turn to make turning more accurate. And I see that when you let go of *any* key, all the motors would stop. One could customize that part of the code to check and see *which* key you let go of, so that if you, say, press and release one of the "speed" keys while holding the forward key down, it won't stop the motors until you release the forward key. So many possibilities here! Love it!

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

    Thanks for bringing back the devastator bot.

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

    The best video on UA-cam right now, thanks! I have taken this up as a hobby and this is the next project.

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

    So happy your making more videos of the robots, I watched the others a few month back and it really got me interested in having ago at building one with my son. Hope you continue with the robotics videos. 👍

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

    Great video Christopher! This series has been such a huge help in building my own Devastator Robot. Thanks for putting out an update to the code!

  • @kriskruz3792
    @kriskruz3792 3 роки тому +25

    And in next week’s episode I will show you how to build an AI-driven terminator robot 🤖 based on raspberry Pi ! 👍

  • @SomeOne-rh5so
    @SomeOne-rh5so 3 роки тому

    Chris I respect that you share vs people all details and hope could encourage many guys. ))

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

    Thanks for this. I started a project yesterday using the L298N, so the timing is impeccable, very much unlike my coding.

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

    Thank you so much for this !!! Your Pi Robotics series helped me discover a new passion in life 😊
    If there is anything I could ask, it would be super super cool if you could also create an episode explaining powering solutions for such projects in more detail. I built a line follower based on your tutorials but it's powered with a single 18650 and capacitor to save space and make recharging easier. I'm making another one powered by 2s battery (7.4v). Thank you again, I really like your channel!

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

    Fantastic series, just build this and enjoyed it a lot. Thanks for this. I changed 1 thing. I used pin 16 instead of pin 7. Because every pin above 8 seems to be in a "low" state. This way u don't need a switch. The robot will not move at startup. Hope this helps someone.

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

      Thanks for your feedback, and I'm glad it was a enjoyable build. I must try the alternative pins. Thanks for the info.

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

    AmAzInG! Thank you again for sharing your content. You have been inspiring and amazing me since the days of Sinclair magazine when I spent hours typing programs (code will always be called programs in my head) into my ZX81 and Spectrum.

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

    With daughter we also building the robot based on two raspberry pi computers. One is in the robot and the second is the control station. We realized for rotating the camera more suitable to use the separate turning mechanism based on the stepper motor with pre-programed angles to turn. Because you've noticed that tu turn the camera by turning the robot is not easy to catch the proper angle. Also you right that the final tuning of the rotation and speeds is necessary in accordance to the bot dimensions and it's motors capabilities :)
    One problem that the "real-time reaction" to the button press isn't working in our configuration bot control station. However we working on it now...

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

    So glad to see t hat the stick didn't get things stuck. I wondered what had happened to the devistator!

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

    Using pygame is rather ingenious. Nice work.

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

    Great video, Chris. If you want another programming challenge, try using the pwm speed control to make high speed turns when at speed 3. For example, run the left track at speed 3 while the right track is forward at speed 2. Should make a more gradual turn to the right. 😀

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

      Thanks I'll borrow this idea 👌

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

    This was a brilliant episode! Python code running on a Pi controlling a robot!

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

    So happy to see this robot back again 😂

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

    Thank you very much Chris for the amazing video. I wanted to get in to pi robotics with my 5 year old this video has made me want to look in to it further.

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

    Worth the wait! It's been so long since our little treaded friend got some screen time. Would be great to build this out in a more 'client x server' style. With the devastator streaming a live camera feed to another machine where you could control it with a gamepad or something. As long as it's within wifi range fully remote control robotank.

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

    Very good! Enhancement: A joystick to control by degrees via cartesian X/Y coordinates "while in motion" vs. key down input. (Hover Craft need also.)

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

    You have an open loop control just now. You might also want to consider a closed loop controller, where you record the speed of the wheels (like number of ticks generated by some of the wheels in the transmition), so it can adjust the PWM so the robot is traveling in the expected speed, if it can. Not just guessing what speed it should have. Then you actually can lower the speeds.
    This should probably be a PID controller, which isn't that hard to do. Adjusting the P, I and D constant is a bit harder though (but to make it easier, just set some to 1.0 and some to 0.0). That would probably be a better start, and put that in a class so the controlling get abstracted away an easier to control from the rest of the program.
    Fun video, anyways. Thanks.

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

    Even thought he has more than 700k subs he still soo underrated... I guess some humans don't wanna learn

  • @judsonleach5248
    @judsonleach5248 3 роки тому +6

    "It's always exciting looking inside a robot, isn't it?" - Yes Sir! lol - Cheers!

  • @PeteVanDemark
    @PeteVanDemark 3 роки тому +6

    Kids fortunate enough to have access to Explaining Computers today, will be building the off-world rovers of tomorrow.

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

    Thank you so much for yet another entertaining and informative video!

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

    Autonomous navigation with neural network and object shapes recognition seems like logical next steps for your lovely robot ;)

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

    Very cool indeed! Maybe a nice idea would be to code it so that IF left or right is pressed then a minimum 'tested' speed would be enforced on turning, but keeping the current rules in place for forward and back buttons

  • @ahmad-murery
    @ahmad-murery 3 роки тому

    Now just add some missiles and sirens then program it to recognize strangers invading your backyard :)
    Cool video as usual
    Thanks Chris

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

    A live video stream over network would be awesome! 🙏

  • @amirmukhlis4936
    @amirmukhlis4936 3 роки тому +5

    Hey, that robot is awesome! Keep making great content man!

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

    Love your videos. This will be my next project.

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

    I wish I could built one like that but for now I can only admire your work. Great project and hope to see more. Thank you 😊

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

    Neat!. Its like s 2021 version of the old 70's BigTrak.

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

    This is SO good!!!😃👏👏👏👏👏👏🔝🔝. I didn't knew about this project, Chris, but I think it's fantastic. This is going to be the next present for my little niece! I can't wait to teach her how to build this (and lern myself!)

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

    At last! I've been waiting for this one. Time to bring the Devastator out of it's box...

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

    That is awesome! Now I feel like I want to make one too, once I finish my Python courses!

  • @cossakrose
    @cossakrose 3 роки тому +6

    Chris: "Devastator, will you be my Valentine?"
    Devastator: "After all this time?"
    Chris: "Always."

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

    Great video as always! Really looking forward to more Pi robot adventures. I'd also like to see Chris put a Pi pico through it's paces

  • @chriscottingham2003
    @chriscottingham2003 3 роки тому +7

    It's Sunday again woohoo. Love this video reminds me of robot wars haha.

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

    We are in 2021, i wait for hovercraft robot video or another Raspberry robot video 🙏🏻🙏🏻🙏🏻. Thanks for your channel 👍🏻👍🏻

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

    Operating the Raspberry Pi Devastator without a combination recovery vehicle/ maintenance and repair crane to hand is really tempting fate, Mr Barnatt.

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

    Really nice video🤟. I want it to say that I really like the chassis of the Robot, it really looks aggressive 😁.
    I might have an idea for you to continue innovating with this robot: the next step could be streaming the picamera preview, using motion framework, over the internet.... That could be great because you will be able to control the robot without looking physically at it...😎
    Anyways, thanks!

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

    Wow Nice to see the robot again ... I love it.. i see it from the begining...
    Wee see this in Former future films now is real un your garden... Love it

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

    The tanks getting closer!

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

    It's always exciting looking inside a robot. Isn't it?... :)

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

    outside?! What a strange and wonderful place you have discovered. Scary.

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

    great informative video, thanks for sharing 👍🏼

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

    I also used Pygame for this robot a few years ago. I too should probably dig it out for more experimentation. The original plan was to mount a pan-tilt turret on the top with a laser that could burst black balloons.

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

      Can you control a stepping motor? Would be good for a turret.

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

      @@caw25sha Yep, that was the plan.

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

    Very interesting. Looks like the next project should be to add the code for 'sweeping up in the garden' to the robot capability!

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

    Nice to see the bot back. He still looks menacing. Would be cool to have a nerf gun on it as cannon. Have a nice evening Christopher.

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

    It's fantastic devaster I like I want to make it,thank you for the detailed tutorial

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

    Great vid! Now you’re making me want to get involved into the Raspberry.

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

    Great hack! You can default to speed 2 for turning so you are sure it has enough power to turn in a controlled manner (1 is not enough and 3 is too much for rotation)

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

      Yes, it would be a good idea to do all turning at speed 2. And in forward or reverse, to increase speed the longer the key was held down. So many possibilities! :)

  • @VeryUsMumblings
    @VeryUsMumblings 3 роки тому +10

    Surely a robot called 'Devastator' can deal with a stick... oh,, wait...no... oh, ....YES! Ha! That will teach that stick!

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

    Like always mr. SATURN... morning! Great video!

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

    I'm modifying a Tomy Omnibot to give it more modern capabilities and better mobility, and this looks like the perfect chassis to use in place of the crusty old rubber wheels and under-powered motor that it came with.

  • @Praxibetel-Ix
    @Praxibetel-Ix 4 місяці тому +1

    I can't believe I watched all four parts of the Devastator robot saga in one sitting...
    ...it was worth it too! It does help to have a massive pile of laundry to fold while watching. Anyway, what a good robot it turned out to be. Are there still plans on making that hovercraft?

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

    Looking forward to seeing the hovercraft in action.

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

    Great video as always Chris! I think I need one of these but with a lawn mower attachment. How fun It would be to drive it round the garden while sitting in doors viewing through the camera.

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

    Lovely stuff, thanks for sharing.

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

    Wonderful video Chris! Thank you.

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

    Once again an excellent video besides being something I'm thinking of doing myself. Thank you. :)

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

    Dude this would be so great to send in the snow storms

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

    Good fun Chris, especially during lockdown. BTW, what was the pile of bricks for?

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

    Oh god the baddest of pi cases!

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

    Oh, for the speed, hook it into a timer so that it will always start slow an accelerate the longer the direction key is pressed. That way, you don't need to manually select the speed, and you can, in fact, have it range rather than be on fixed values. Noted that to slow didn't provide enough power, but you could simply map a range to ensure that minimum power is sufficient. Maybe include a toggle override (that locks the speed) for those situations where you want a constant speed.

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

    Great video! i forgot about the speed thing.. I assume that you can make it turn while going foward if you set a lower speed in one of the sides while going foward..
    Also i great part 5 would be LIVE VIDEO FEED and yet over wifi controls.. than you could control it from a phone connected to it via wifi for better range (i'm trying to figure it out actually)

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

      You are right, you could all manner of gradual turns by running one set of tracks slower than the other. I may well stream from the camera at some point. :)

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

    You are such a great person! great mind you have. Thank you for your videos. You make it easy to understand things that are complicated for me. much respect to you Sir!
    Have you tried setting it up as a live feed? where you have also a monitor on your controller :)

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

      Thanks for this. A live video feed is on my list!

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

      @@ExplainingComputers yay, great! looking forward to it :)

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

    Very useful video. Many thanks!

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

    It would be nice if it could have a proximity sensor and could, then, go around the house all by itself without bumping on anything.
    But before that you could try making it follow a certain path, maybe a literal path drawn on the floor. Something that the camera can pick up and read as something for it to follow.
    I mean, those are suggestions. Ideas are a dime a dozen as we all know, implementing them is the real challenge.

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

    "Zoe the Robot" approves of this robot.

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

    I have already done the devestator robot with my raspberry Pi 3b+ , will upgrade now 😀

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

      Great! This video finally contains the updated code many have been asking me for . . .

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

      @@ExplainingComputers I usually see what code you use and then code my own instead of copying as I believe trying on my own makes me better :)

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

    I really liked it 😂👍 I'm gonna make some more improvements in it. Thank you sir.

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

    Nice video as always hope you had a nice week.

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

    I think the Devastator is pretty suitable for students to make autonomous vehicles powered by machine learning.

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

    I have done a very similar thing using an analogue PS4 controller for speed control, so the robot goes faster the further you push the thumbstick. Surprisingly to easy to do.

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

    Wow truly amazing.
    I never saw your robot before it looks like a tank.
    That's pretty darn cool Chris.
    Keith Kuhn

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

    I love the concept of small robot projects like this one. It is fascinating how this specific model of robot can run on a few AA batteries and an external ppwer bank. I was curious about whether buying rechargable AA batteries for this robot would be as effective than with traditional alkaline AA batteries.

  • @G-3-A-R-Z
    @G-3-A-R-Z 3 роки тому

    Love the content. In fact this would be a cool project to try with my daughter. She still needs to grow up a bit. Although it would be funny to explain that my daughters first language is Python. I can imagine the question,"What is she from house Slithern?"

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

    Happy to see Mr. Track back on the road. Lots of good information.
    Question. I wonder if you incorporated the Raspberry Pi Pico and the Raspberry Pi 0 ? It could be a interesting product!

  • @Steve.68
    @Steve.68 3 роки тому

    Yet again a thoroughly enjoyable video , information at a level I sort of understand , just stretching my knowledge level a little. I have a suggestion for a further video in this series, how about building arduino based controller with thumb stick/s to fully utilised the speed control?