Robot Inverse Kinematics With A Hexapod Leg

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

КОМЕНТАРІ • 147

  • @pieterpennings9371
    @pieterpennings9371 Рік тому +9

    really cool. I am in the process of making my own hexapod and other projects that include inverse kinematics and I got this video suggested randomly and it's really well made.

  • @JamesNewton
    @JamesNewton Рік тому +16

    Excellent video! I expect I will use it with students in the future. I agree with others that less bubble popping would be good. I'm also not into cartoon violence. Love the "why didnt that work" bit in the middle because students often give up at those points and it great that you modeled working through it.

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

      Thank you for the kind words and the honest feedback. I’m very glad to hear that you might use it to teach with, I had actually hoped someone would use for that very purpose! In the future (this year I hope) i’m going to explore the solutions for a 6 DOF robot and build one, maybe create my own programming language for it, and an interpreter, controller, teach pendant etc. I have experience with them in industry and I think there are a lot of barriers to people gaining an understanding of how it all fits together and how it works.

  • @GCKteamKrispy
    @GCKteamKrispy 10 місяців тому +2

    Just some basic geometry, but my professor had to talk in some complicated engineering language. Thank you so much, very helpful

  • @anton4ik55
    @anton4ik55 Рік тому +53

    nice video, but those bubble sounds are waaaay too loud, gets very annoying to watch

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  Рік тому +13

      Thanks you and thanks for the feedback, I’ll definitely use them less and at lower volume in future :)

    • @bernard2735
      @bernard2735 Рік тому +4

      I agree. Your content is great - clear images, a calm voice, and nice stepwise explanations - so you don’t need anything else. I subscribed ☺️

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

      All the sound effects are too loud I think. But I like them if they were 1/3 their volume

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

      I didn't even notice any bubble sounds

    • @The-KP
      @The-KP 7 місяців тому +1

      ​@@JustAnotherMakerChannel No need to use sound effects at all, the value of your information outweighs any added interest you might believe a sound effect provides. It's just a distraction. Watch the videos of Mathologer and Veritasium. No sound effects, just narration and some animation. Thanks for making an otherwise EXCELLENT video on hexapod kinematics.

  • @GuilhermeLimait
    @GuilhermeLimait 8 місяців тому +2

    The most simple way to learn it that I’ve seen so far, thanks for it❤

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  8 місяців тому +1

      You're very welcome! Thank you so much, I really appreciate the comment :)

  • @behrampatel4872
    @behrampatel4872 Місяць тому +1

    Thank you. This is better than many videos out there .
    cheers

  • @durgeshbg
    @durgeshbg 6 місяців тому +2

    03:11 that's where i lost track, cool work btw might get into robotics sometime in the future, thanks

  • @jilliebean613
    @jilliebean613 4 місяці тому

    Awesome project! I am so impressed you were able to get those plastic servos working for this project. For me, those servos break when I look at them wrong.

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

    Fascinating. Thank you for showing how to derive the formulas, this stuff seems like magic but it all comes down to maths.

  • @BrickRoom7
    @BrickRoom7 10 місяців тому +1

    This is the best IK tutorial video on UA-cam, at least I think so. Thank you for this. Can you do a video on transformation and rotations?

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  8 місяців тому

      Thank you so much, I'm planning to do a video on a 6 axis robot using Denavit-Hartenberg and it has a lot of matrix mathematics with transformations and rotations.

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

    Thanks for the great explanation! I already saw a code for such a robot but now I finally understood it due to the math and interpolation.

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

    thank you for the math part btw its really fresh to see some math in things like this

  • @federicoromero6130
    @federicoromero6130 2 місяці тому +1

    i thought inverse kinematics was extremely hard. no fear any more! thanks for the video

  • @as2gmvenom835
    @as2gmvenom835 8 місяців тому +1

    Interesting video with a good explanation. I want to mention that you can use the same rules to make the leg move in a straight line rather than an arc instead of using interpolation.
    How:
    Use the variable names at 3:50 and 11:30 as a reference.
    Let J0 be the third angle of the triangle J3-J2-J0 at the cross point of J2 (Y) and J3L.
    Get the lines j3, j2, and j0.
    *You have to calculate the j3, j2, and j0 lines when the leg is in the stand position.
    Now you can calculate the angles J3, J2, and J0 from the given j3, j2, and j0 lines.
    The trick is to make the j3 line equal = j3/CosJ1.
    now the angles J3 and J2 will depends on J1
    You just need to set J3 and J2 in the code.
    J3 = ArcCos((j2^2+j0^2-(j3/cosJ1)^2)/2*j2*j0)
    J2 = ArcCos(((j3/CosJ1)^2+j0^2-j2^2)/2*(j3/CosJ1)*j0)
    Boooom you got a straight line.
    Thank you!

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  8 місяців тому

      Thank you, some interesting information that I’ll make the time to digest when I’m less tired. I don’t think it’s the IK solution that causes the arced motion rather the mechanical system, I have no direct control over the speed of the servos and thus when all changed at once from their respective starting angles to end angles they all move as fast as possible which is not necessarily linear. Since I have no influence over the servos speed, interpolation gives a very simple way to get an approximated linear move that can be refined by taking more smaller steps. I can’t immediately see how a change in end point calculation could achieve anything else?

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

      @@JustAnotherMakerChannel
      11:40 You used Pythagoras to get H so that's why the leg caused a rotary motion (arc) instead of a straight line.
      Because you calculated the radius of a circle with J1 its centre
      Description:

      Let's be in the same view by agreeing this.
      ******************************************************************************************************
      - the joint J1 causes the arc motion because it has to rotate the leg causing circular motion (an arc).
      - [To convert an arc to a straight line] >> you must increase the radius (for each increase in angle) ~ exponentially.
      Ex.
      if J1 = 0 degree, radius = 10 cm

      when J1 = 15 degree, radius must be = 10.3528 cm
      when J1 = 60 degree, radius must be = 20 cm
      How to increase the radius (you called it H)
      >> [the radius length increase(+)] >> by decreasing(-) the angle of J2 and increasing(+) the angle of J3
      assume the lower and the upper bones = 20 cm and J3=60 degree and J2 = 60 degree
      the radius = [upper_bone_cm / cos(180-J3-J2)] + [lower_bone_cm /cos (J2)]
      * (radius is result of looking at the leg from top view) *
      >> 20/cos(180-60-60) + 20/cos(60)
      >> 10 + 10
      >> the radius = 20 cm
      [The equation] >> to convert the arc into a straight line
      radius = 20 / cos(J1)
      ** but you need to know the angles of J2 & J3 to adjust the radius changing its length in the code **
      [you have to create an algorithm]>> that changes the angle values of J2 and J3 (this causes a change in the length of the radius) depending on the angle value of J1 using a loop
      for( J1 = 0 degree ; J1 < 60 degree ; J1 +1 degree each cycle)
      {
      total_length_or_radius_cm = (upper_bone_cm / cos(180-J3-J2)) + (lower_bone_cm /cos (J2))
      J3= Arccos (((lower_bone_cm^2 + upper_bone_cm^2 - (total_length_or_radius_cm / cos(J1))) / 2 * upper_bone_cm * lower_bone_cm)
      J2= Arccos (((total_length_or_radius_cm/cos(J1))^2 + upper_bone_cm^2 - lower_bone_cm^2 ) / 2 * upper_bone_cm * (total_length_or_radius_cm / cos(J1)))
      or
      J3 = ArcCos((j2^2+j0^2-(j3/cosJ1)^2)/2*j2*j0)
      J2 = ArcCos(((j3/CosJ1)^2+j0^2-j2^2)/2*(j3/CosJ1)*j0)
      delay = 100 ms
      \\increase the value of delay to decrease the motion speed and the vibration that caused by the momentum.
      }
      app.gemoo.com/share/image-annotation/615760982094012416?codeId=vzxdG9ZpE6o7n
      if you didn't get me or the images links dose not work type a guest account so i can send you images or a video

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

      [QUOTED]"11:40 You used Pythagoras to get H so that's why the leg caused a rotary motion (arc) instead of a straight line.
      Because you calculated the radius of a circle with J1 its centre "[QUOTED]
      The solution I presented is correct, the value of H will change depending on the X & Y co-ordinate of the position required and therefore does not to be manually increased or manipulated. To achieve a positional deviation in X, all 3 joints require motion. This is accounted for in the video by substituting Y @11:57 for H to allow the J2 & J3 kinematics to be calculated on the plane projected by J1's changing angle, which ultimately accounts for the arced path of J1.
      The TOP-VIEW diagram you have presented in the link is exactly what we are doing @ 11:40, H is calculated using X & Y with Pythagoras, I can see that the underlying semi-transparent image does not make that too clear as I've arbitrarily drawn a vertical line from the Y axis, the value H shown @11:40 is exactly what you are referring to as 'H+L' in the link, which we cannot calculate from cos(J1) namely because we are trying to calculate J1, it is unknown.
      The example of arced motion shown @12:19 has no J1 involvement, no X or Z movement, only Y movement from 1 singular point to another singular point, the motion is arced because both J2 & J3 need to move by different amounts and travel at an uncontrolled speed and the inability to maintain position during the deceleration of the other axes. It's not very easy to see but @12:24 J2 completes it's movement in a fraction of the time that J3 takes, this causes the leg to plunge downwards from J2 moving and then upwards to the correct position as J3 catches up (then some overshoot and oscillation)
      I really appreciate all of the time and effort you have spent with your responses and the link and pictures too, I had to look through it a good few times and for a moment I was questioning whether my solution was correct!
      Let me know if you have and other questions :)

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

      @@JustAnotherMakerChannel
      I used trigonometry to calculate the H, and you used pythagoras to calculate the H.
      Sorry, I just misunderstood you, You are right! I was confident because I made a hexapod and used this equation with mg996r and it was working. now i realize that if I am right, that does not mean you are wrong I was too hasty.
      Thank you, I have learned a lot because of you.

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  7 місяців тому +1

      Thank you, I really appreciate all your comments :)

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

    Man just came into my recommendation and saved me
    Tnx G! Subbed

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

    This is awesome, you explained everything so well, thank you for the good and clear content sir. Keep it up.

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

    This video is very epic, thanks for sparing time to make such a video.

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

    Maybe reverse engineer in algorytme and iterations something touchable. Like start and stop animations. Moving a robot engine by hand can be recored by software as steps. With or without a rhyme or repeatative steps in it. It is basically acting and can be started with dancing lessons. Like walse and rumba. Some rhyme can be distellid from that for your robot. Overlapping formulas can be used for more complex movements. Just coordinates with two equals signs.

    • @LazarusAugment
      @LazarusAugment Місяць тому

      just use one motor with forward and backwards with an array of gears that perform the same movement sequence r p m, gear number and gear radius can all solve there Selfe just create the geometry and work backwards computing power can then be used to just change the drive gear to a new speed or shift to another gear for sequence movement change this is aa mix of analog and digital makes things simpler combing the best of old and new. the geometry starts with the variables the gear math is simple with a simple gear generator software and chat g p t for Arduino or raspberry pi coding. The cool thing is in the current times we have so much data points we can utilize and combine to create things that are just overlooked by staying inside the confines of traditional education there is more than one way to skin a cat the math forms its self inside the confines of the geometric parameters

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

    Well that made for some interesting bed time entertainment…my brain is now scrambled and I have a new found respect for your infinite knowledge. I hereby dub thee, a wizard.

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

      Thank you, thank you, I’m definitely going to be applying this to a robot arm with more axes and hopefully more accuracy, so watch this space!

    • @daltongabriel-9258
      @daltongabriel-9258 Рік тому +1

      I find this rather sarcastic 😂

  • @KhalilChatti-e5u
    @KhalilChatti-e5u 10 місяців тому +1

    you have to implement PID regulation algorithm

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

    Really cool video and great explanation! Although I wish you had spent some extra time on the interpolation part as I don't understand how that helps when the distance that the servos have to travel doesn't change?

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

    That is really well explained = an instant subscription. Tada!

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

    Make a video on inverse kinematics of 3 wheel omni drive

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

    This guy is low key funny, nice video by the way. Keep it up.

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

    Thanks, best IK explanation I am able to find!

  • @TubeClemens
    @TubeClemens 7 місяців тому +1

    Excellent video clear explanation. I build a hexapood myself. One question if I have a J1L=60 how does this affect the code?

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

      Hi @TubeClemens, Do you mean you wish to have J2 not directly above and inline with J1 and call this offset J1L? If so then as a quick shot at this you would need to think about the following:
      @3:30 the Y value would need to have 60 taken off as this would be a fixed offset by J1L=60, similar to @9:41 where we apply an offset to Y to account for the leg resting position, but I think the real answer is below.
      @11:53 when we go back and substitute H in, we would substitute (H - J1L).
      For a quick look I think that would be the solution you are asking for.
      Hope this helps :)

    • @TubeClemens
      @TubeClemens 7 місяців тому +1

      @@JustAnotherMakerChannel Thank you very much this is exactly what I meant. I wil give it a try.

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  7 місяців тому +1

      Great @TubeClemens, I’m glad I could help, please let me know how it goes :)

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

    Really awesome. Thanks for sharing this video

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

    Best explaination in the world! Could you do one video of inverse kinematics for robot dog?

  • @a330turbinex7
    @a330turbinex7 5 місяців тому +1

    Superb!!!

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

    Thank you for your great explanation. In fact, it was very cool.

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

    Cool, that was really helpful.

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

    Thanks a lot bro, i found the best IK explaination,
    waiting for trajectory from your video ❤

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

      Thank you, you can see it's first steps here: ua-cam.com/video/7dOrBUcmLVY/v-deo.html
      I'll be working on the walking some more and making it remote control soon :)

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

      @@JustAnotherMakerChannel Cool. I'll wait for it.
      I'd suggest you use a dynamixel servo for smoother things. But the important thing your explaination in math robotic is very nice, keep'it up!

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

    Nice video. I learned a lot from it.

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

    Very nice. I'll put this video in my build playlist, and get to it in a decade or two :-p

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

      I know the feeling! I have so many things on my list too :)

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

      @@JustAnotherMakerChannel I have at least 5 projects that are on hold somewhere in the making process :-p
      Quad copter, drone plane, new split keyboard, mini solar boat, and a remote controlled pick up truck, just of the top of my head :-p
      Oh well, summer vacation soon :-)

  • @evil_lime4378
    @evil_lime4378 7 місяців тому +1

    How did you calculate the C angle at 10:15? Only part of the (excellent) vid that stumped me

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  7 місяців тому +1

      My apologies for not being clearer, that angle is measured from the design, the reason being that the servo arm is not aligned with the leg. Really though it could have been designed in line and the angle C would not be needed at all!

  • @andres154525452
    @andres154525452 11 місяців тому +1

    Good video!

  • @swannschilling474
    @swannschilling474 11 місяців тому +1

    Great Video!!! 🎉🎉🎉

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

    As a high school student it is nice seeing geometry being applied 😅😅

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

      I think it would be more constructive if geometry was applied/taught using examples like this, half the battle is knowing what to apply and when rather than how to do it IMO

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

      ​@@JustAnotherMakerChannelAbsolutely agree with you

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

    Amaxing work!😊

  • @AlecThe1st
    @AlecThe1st 3 місяці тому +1

    what are the libraries used in the code?

  • @moon-gc2go
    @moon-gc2go 8 місяців тому

    Theres a way to not make it jittery just add i2c bus or library in arduino

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  8 місяців тому

      Thanks for the feedback, I do use the servo and ramp libraries but I didn't make any special effort to think about the servo slew rates or PID.
      There is definitely an element of variability between the servos that is more noticeable when trying to coordinate motion with them.

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

    Thank you very much bruv! This helped me out a ton..❤

  • @messerschmidtfpv4419
    @messerschmidtfpv4419 9 місяців тому +1

    Hello, thanks for the tutorial. where can I find the STL file to print myself?

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  8 місяців тому +1

      I will have a look back for the files and try to get them online in the next week - though it is not the best design.

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

    can you create a pnuematic wall climbing hexapod ?

  • @guilhermeconstantinov
    @guilhermeconstantinov 5 місяців тому

    why were these values added?
    const double Y_Rest = 70.0;
    const double Z_Rest = -80.0;

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  5 місяців тому

      These values were added so that the movements can be made relative to a ‘resting’ position, without them it’s not as practical to plan movements from the centre of J1.

    • @guilhermeconstantinov
      @guilhermeconstantinov 5 місяців тому

      @@JustAnotherMakerChannel got it, thanks for the explanation

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

    Great video!

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

    What about the horizontal YX kinematics?

  • @guilhermeconstantinov
    @guilhermeconstantinov 5 місяців тому

    should the angle really be negative? depending on the value, the J3 is negative

  • @Kingnauta
    @Kingnauta 2 місяці тому

    What is the name given to this inverse kinematics method? I would like to research further

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

    could this math be used for a biped reversed knee style robot?

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

      I think you could use it for any similar configuration, might need to re-orientate the co-ordinate system, I’ll look into it and maybe do a video

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

      @@JustAnotherMakerChannel also how much harder would the math/ coding be with 2 more servos/axis added?

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

      Well it depends on how the axes are oriented, it could become quite a bit more complex, with some 5 and 6 DOF (degree of freedom) robot arms there can be infinite solutions for a single point in space, I am planning to to a 6 DOF robot arm in the future but I’m having to brush up on my matrices math and manipulation first!

  • @brandonheat5262
    @brandonheat5262 6 місяців тому

    does it matter if J1 has offset away from J2? I see there are many designs of 3 dof leg in this way.

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  6 місяців тому

      Yes it would have an effect on the XY solution, I think you would need to calculate the angle for J1 first, then using that angle and the offset to J2 calculate the X and Y value for where J2 is now located and subtract those from the X and Y used to calculate J2 and J3

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

    You are incredible

  • @rezageraldy-gn1jw
    @rezageraldy-gn1jw 5 місяців тому

    could i ask you sir. we kinda have problem when it comes to writing j3 and j2 arduino. we use your formula but the output show nan. we are not missing any single information for video even though it only one mistake. so pls help us this for high school project.

  • @Hyun_.18
    @Hyun_.18 Рік тому

    how can i code at 10:33 to servo move on 40mm like that?i understand what you said about algorithm but how to write command line to make servo move like this, thanks you

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

    You deserve more likes and subs

  • @senaalfarabi4077
    @senaalfarabi4077 6 місяців тому

    I want ask something, in minute 3:25 . Are L variable is range between servo 2 and the lowest point of foot point can be?

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  6 місяців тому

      L is from servo 2 to the position of the foot, where we want to position it, there will be a range of motion that can be achieved depending on the lengths J2L and J3L. I hope this answers your question :)

    • @senaalfarabi4077
      @senaalfarabi4077 6 місяців тому

      Another question at 9:37 , where you can get y,90 and z,-60?

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  6 місяців тому

      No problem, those are physical measurements, I obtained them from the CAD model of the design with the leg in the 'resting' position that I wanted.

    • @senaalfarabi4077
      @senaalfarabi4077 4 місяці тому

      Thank you for the explaination sir

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

    i would be thankful if you could share me the components parts links so that it will easier for me to print

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

    hi do you have a link to the 3d printed parts?

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

    where can I get the design ?

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  8 місяців тому

      Sorry for the delay, the files can be found here: www.thingiverse.com/thing:6463619

  • @panmaneecnc
    @panmaneecnc 5 місяців тому

    Thank you very much for your information and I have taken your information to study and adapted it into python for learning. If anyone is interested, you can follow and test and try it at this link. colab.research.google.com/drive/1tpKsER2IazlSDh9AVQmRVnxvxA4uU8Hm?usp=sharing

    • @JustAnotherMakerChannel
      @JustAnotherMakerChannel  5 місяців тому +1

      Thank you for the positive feedback and thank you for this contribution!

    • @panmaneecnc
      @panmaneecnc 5 місяців тому

      @@JustAnotherMakerChannel You are amazing. I will continue to share the knowledge you have given me with my friends.

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

    This popup sound is really annoying

  • @sub2seany
    @sub2seany Рік тому +4

    My brain has exploded

  • @saveusfromidiocracy35
    @saveusfromidiocracy35 6 місяців тому +2

    Hexapod with Parkinsons 😂. Good effort. Try using better servos