The Robot Learns to Run

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024
  • Get your custom Parts and PCBs at PCBWay: www.pcbway.com
    In this video I used a genetic algorithm to teach my robot how to walk.

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

  • @daltonjames8556
    @daltonjames8556 หลายเดือนก่อน +48

    Imagine the horror of your stewart platform crawling in your room at night like a water bug lol.

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +2

      😂😂😂

  • @zactron1997
    @zactron1997 หลายเดือนก่อน +12

    Regarding period selection: instead of choosing random real numbers, choose a random natural multiple of the base period (2, 5, 15, etc.). This will ensure all movements are synchronised within the desired timeframe.
    Finally, regarding the selection of an alternate function: because your solution is defined to be periodic, Fourier proved that any solution will be of the form of a summation of sine waves scaled and shifted across all frequencies. As such, you could simply include more sinusoids at higher frequencies for each DoF.

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +2

      Great ideas! Using integer multiples seems obvious looking back now.
      I had planned on adding more sine waves for each dof but never got around to it. I was toying with the ideas of either having a set number of waves for each dof or having a set number for each solution and control what dof each one corresponds to in the genes.

    • @revimfadli4666
      @revimfadli4666 29 วันที่ผ่านมา

      Ah yes, the equivalent of performing jpeg compression on a large neural network

  • @tony2shoes982
    @tony2shoes982 หลายเดือนก่อน +9

    This is amazing. Great content. Can't wait to see more.

  • @Roobotics
    @Roobotics หลายเดือนก่อน +7

    put rear-most leg into soft contact with ground, lift front up fully so it pivots up on the rear legs, lower rear to contact frame, drop front. repeat. is basically falling forwards by altering the pivot points. It's not generational learning, but I wonder if it's learned forwards speed can physically surpass that basic movement sequence? (It has to not bind it's gantry while doing it obviously)

  • @mariogomez8149
    @mariogomez8149 หลายเดือนก่อน +7

    Very impressive!

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +2

      Thanks!

  • @chrisBruner
    @chrisBruner หลายเดือนก่อน +6

    I'd be interested in seeing a tutorial on how you used gazebo. How did you enter your robot, duplicate your robots and simulate your robots?

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +7

      Thanks I’ll keep that in mind. In the sim I didn’t actually have multiple robots running in parallel or spawn/despawn new bots. I just ran a solution on the one robot, noted how far it went, then tried the next solution on it. All of the starting, stopping and recording distances was in a ros2 node that would send joint positions to the robot in gazebo.
      I’ll try to get all the code together and make it public if anyone would be interested in that.

    • @xenophobe3691
      @xenophobe3691 29 วันที่ผ่านมา

      @@JDRoboticsYes please

    • @JDRobotics
      @JDRobotics  10 วันที่ผ่านมา

      @@xenophobe3691Everything is public now! Join the discord if you have any questions or want to help!

  • @iznasen
    @iznasen หลายเดือนก่อน +2

    Next step: The Robot Learns to make a partner

  • @themed_entertainment
    @themed_entertainment หลายเดือนก่อน +3

    Very nicely put together video!

  • @andrewwatts1997
    @andrewwatts1997 หลายเดือนก่อน +1

    Nice project !
    I think a couple good changes would be,
    - Add rubber ' feet' the lack of traction seems to be hurting the performance.
    - perform the tests for more iterations with perhaps a larger population? I'm not sure what your population size was but most videos I watch on these topics have between a 100 and 1000 members and test for 1000 to 10 000 iterations.
    If you do plan on testing, in simulation, what geometry would be best, you should combine that with finding the optimum gate. As geometry and gate would be linked. This will increase simulation complexity however. If you can perform these simulations on a campus computing system, I would suggest that.
    Looking forward to your next video on this!

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +1

      Thank you!
      I ended up using a population size of 30 for most of the simulations. Increasing that and the number of generations would be great, but I'll have to improve the code and maybe use a faster computer for that.

  • @AnJo888
    @AnJo888 หลายเดือนก่อน

    Nice project.
    Rubber pads in the legs contact surface may allow for greater speeds...
    Shifting the wave form towards the ground may reduce 'no contact' time...
    Using NEAT to 'punish' unwanted behaviours (long no contact times, wrong movement direction, etc) may generate better solutions...

  • @oluwaferanmi100
    @oluwaferanmi100 หลายเดือนก่อน +2

    This is awesome.

  • @june9713
    @june9713 28 วันที่ผ่านมา

    It is very simmilar with explanation of evolution.

  • @joseccastrojr
    @joseccastrojr หลายเดือนก่อน

    This video per se, is a masterpiece.

  • @jeffsmith9384
    @jeffsmith9384 หลายเดือนก่อน +1

    it needs shoes

  • @LoganDeFour-s3f
    @LoganDeFour-s3f หลายเดือนก่อน +1

    This was so cool, very well explained

  • @hannahnelson4569
    @hannahnelson4569 หลายเดือนก่อน +1

    Very cool!

  • @harrisonlow
    @harrisonlow หลายเดือนก่อน +2

    Very cool! How did you generate the footage of multiple bots at once? (eg. at around 7:12)
    I'd be very keen to see how you go if you decide to optimize for geometry as well as gait. I also wonder how modifying the friction between the legs and the ground would affect the speed 🤔 From the footage at the end (eg. 16:33), it looks like there's quite a bit of slipping, though it's difficult to know whether that helps or hinders the movement.
    Keep it up!

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +1

      Thank you!
      To animate the multiple bots, I had all their joint positions, pose data, generation numbers, and other topics saved to a bag file while the sim ran. Then I had a python script that could get that data and set keyframes for my model in blender (the animation software)
      Good eye on noticing the slipping. I have rubber feet on the base which makes its friction much higher than the arms. I think it helps on the gaits it found but I agree trying different friction values could be interesting. Maybe having every other arm be grippy or some other combination could have good results.

    • @harrisonlow
      @harrisonlow หลายเดือนก่อน +1

      @@JDRobotics Very interesting! If you don't mind my asking, how did you go about getting the CAD into blender (presumably with mates intact)?

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +1

      @@harrisonlow I don't know of any way to import them with mates. I imported STLs that I used for 3d printing and modeled some of the other components in blender.

    • @harrisonlow
      @harrisonlow หลายเดือนก่อน

      @@JDRobotics Interesting! Cheers for the reply 😊

  • @MrStyles784
    @MrStyles784 หลายเดือนก่อน

    Perhaps designing a sequence of stages with different constraints on evolution would yield interesting results - for example, if you first ran several generations with the fixed sine wave phase, then took the best offspring as starting points for another several generations in which the phase is allowed to vary, and maybe another factor is locked instead. Different orders of the same constraints could lead to wildly different solutions - it would basically be a genetic algorithm of genetic algorithms, simulating a slowly changing environment...
    From that last thought, I wonder if the specific constraint changes could also be determined algorithmically in a way that simulates each generation's impact on the environment...

  • @stefanguiton
    @stefanguiton หลายเดือนก่อน +1

    Superb content, great work

  • @harrysas08
    @harrysas08 27 วันที่ผ่านมา

    good job bro
    also love your content

  • @sozno4222
    @sozno4222 หลายเดือนก่อน

    Great video! Really enjoyed this project. Curious what your background is? Did you have much programming experience or previous genetic algo experience before beginning this? How long did this all take you?

  • @Jkingwalagamer
    @Jkingwalagamer หลายเดือนก่อน +1

    Good video 📸

  • @_spartan11796
    @_spartan11796 29 วันที่ผ่านมา

    Great video 👍

  • @sheeple906
    @sheeple906 หลายเดือนก่อน

    I really like the video and how you explained everything really easily. If I wanted to learn how to create a walking robot on my own where would I start?

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +1

      Thank you! If you don’t have experience with electronics yet I’d start with an arduino project. There’s a ton of simple projects with great tutorials out there.
      If you want a bit more challenging project or are interested in my robot specifically, keep an eye on my channel as I’m planning on releasing all the files for this project soon.

  • @RoyaltyInTraining.
    @RoyaltyInTraining. หลายเดือนก่อน

    It would be interesting to see if replacing the basic sine wave with a Fourier series of maybe 5 terms would yield better results. This emulates the nature of real-world gaits well, which are usually periodic and smooth, but not quite sinusoidal.

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน

      Great idea!

  • @konstantinbachem9800
    @konstantinbachem9800 หลายเดือนก่อน

    maybe add sinewaves with difrent frequencies like in a forier transform

  • @xenophobe3691
    @xenophobe3691 29 วันที่ผ่านมา

    We did Q Learning

  • @ahmedhabib6131
    @ahmedhabib6131 หลายเดือนก่อน

    Great work! What software did you use for the simulation?

  • @Chmm3
    @Chmm3 หลายเดือนก่อน

    JD Robotics,
    Such a cool project! I am a fan of genetic algorithms myself, have you taken a look at Real-Coded Genetic Algorithms (RCGAs)? They are similar to Binary-Coded Genetic Algorithms (BCGAs) but use real values in their genes instead of binary. There are a handful of cool crossover events as well that you can do with real values. I don't know if it would have changed the results of your simulations but if you are ever interested it could be fun to see the difference in effectiveness between the two types of genetic algorithms.
    I had initially brought this up to argue your crossover event. My thought was that representing floating point values with binary could cause crazy values to result when your crossover splits up a mantissa. This is not the case! I worked an example out to myself and it actually results in very reasonable values! I'll keep my comment here though just in case you have not seen RCGAs before! (And it would still be cool to see a comparison between RCGAs and BCGAs on a real bot), I have not done extensive work with comparing BCGAs and RCGAs so I do not know if there will be a difference if applied to the same problem.
    best,
    random internet commenter and new subscriber

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน +1

      Thanks! I actually started off with some sort of real-coded algorithm, I wasn't using any special types of crossover though, and my mutation would just randomize an entire parameter. Switching over to the binary-coded helped, but I also improved other things at the time, so it's hard to say how much. I'll have to look into how RCGAs handle crossover and mutation. I hadn't heard of them before, thanks for letting me know!

  • @KelvinNishikawa
    @KelvinNishikawa หลายเดือนก่อน

    Rather than do a simple sine wave, have you considered using a random noise pattern and then doing an inverse FFT to drive the servos?

    • @JDRobotics
      @JDRobotics  หลายเดือนก่อน

      I haven’t. That sounds interesting though I’ll have to look into it more

  • @hugorafachofernandes4840
    @hugorafachofernandes4840 หลายเดือนก่อน

    I think if you increase the number of generations, you will get better results. GA is very sensitive to local minimum and more generations give it the chance to escape from this through mutation.

  • @ironman5034
    @ironman5034 หลายเดือนก่อน

    Hey can you share a link to your code, this is perfect for me, i have built a worm/snake like robot that uses only 2 motors for x and y directions i'd like to see some optimum solution to it's motion

    • @JDRobotics
      @JDRobotics  10 วันที่ผ่านมา

      Everything is on github now!

  • @darkshadowsx5949
    @darkshadowsx5949 หลายเดือนก่อน

    take the sticks and table off.
    or design a robot thats made for walking instead of uselessly tilting a plate.