Inverse Kinematics for SpotMicro robotics | example and demo

Ғылым және технология

This video discusses inverse kinematics as they are used in my SpotMicro robot dog. We delve into the math of inverse kinematics and provides examples and demonstrations of inverse kinematics used in my SpotMicro. These algorithms can be more widely used in the field of robotics and should be applicable to all robot dog style quadruped robotics.
Chapters:
0:00 Intro
1:26 Review
1:57 Equasions
5:16 Demo

Пікірлер: 24

  • @denisbujoreanu5993
    @denisbujoreanu5993Ай бұрын

    Hi, I tried applying the formulas to my quadruped robot setup using my robot's limb lengths but the values for the angles I get from the formulas seem to be off. I suspect it has to do with each servo's orientation and offset from center as well as where the origin point is considered to be for each leg. Are you using any specific origin, orientation for your mini? My robot's body is using MG90s servos, so not the most reliable ones, but they do work well enough if I use them in a forward kinematics scenario I developed. Now that I'm trying to make it more configurable and basically parametrized, i.e. specify the height at which the legs to go and keep it like so during the walk cycle, the IK approach seems to be the way to go as I my current forward kinematics is a interpolation between known stances, which are supposed to be stable positions defined by sets of servo angles, 12 for each "frame". I'd like to reach a position where specifying a variable value for the Y or X axis will move both femur and tibia servos accordingly, I'm not yet aiming for hip servo adjustment as I want to get it working in the XY plane first.

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    Ай бұрын

    The origin point that I use is the shoulder joint where it connects to the chassis. This is convenient as it allows all legs to use the same equation. These equations will just calculate the angle of the for the joints. Depending on how you mounted your servos, you may need to apply and offset angle or invert the angle to match rotation direction of your servo. Hope this helps. I may need to do a more complete video in the future that includes using an origin from the center of mass and how to apply the equations angles to your servos.

  • @denisbujoreanu5993

    @denisbujoreanu5993

    Ай бұрын

    @@AdvancedHobbyLab thanks for the response. I think we're using the same origin system, I had to offset and change direction for some of the servos in my robot's legs as the servos are mounted to fit the 3d-printed legs, which btw are those of the OpenCat project I found and which of course does not quite work for my servos; apparently MG90S servos made and sold in factories in Shenzhen aren't the same as MG90S servos made and sold by factories in Honk Kong. But anyways, I digress :) . So after some guesstimating the offset and orientation of various servos I got the legs to move along both the X and Y axis based on input value but I noticed that there is a rather limited range for each of the axis that I can specify, I was expecting that, but still it seems that the full 0 to 180 deg for the servo does not quite cover the fully extent or retracted position of the leg, especially on the tibia or the foot end of the leg which seems to stop at one of the ends of the range (either 0 or 180 deg) without becoming fully aligned with the femur, the next up section. It could be that the "center" set to the middle of the servo's range, e.g. 90 deg, isn't such a good choice but without encoders to properly know where the servo is relative to the joints, it will have to do.

  • @martinsvoboda1237
    @martinsvoboda12373 ай бұрын

    Hello, could you please share the code for inverse kinematics iam totally lost with it in my project.

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    3 ай бұрын

    Thank you for your interest. I'm in the process of cleaning it up to be released. I'm trying to get it released this weekend.

  • @martinsvoboda1237

    @martinsvoboda1237

    3 ай бұрын

    @@AdvancedHobbyLab Thank you, I'm glad to hear that.

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    3 ай бұрын

    @martinsvoboda1237 I've pushed my code to my GitHub page: github.com/AdvancedHobbyLab/SpotMicro. Let me know what you think.

  • @martinsvoboda1237

    @martinsvoboda1237

    3 ай бұрын

    @@AdvancedHobbyLab Hey, I think that's okay from what I've seen so far. I'll take a closer look later. I just have 1 question, what do you mean by "keyframe" what does that mean? And how did you determine the shoulder offset? Do you have any others social? Can i send you my concept of robot dog? Otherwise, great job, thank you so much.

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    3 ай бұрын

    I use keyframe animation to animate the walking cycle. Each keyframe defines the x, y, z position of the foot. In my work, I don't use a shoulder offset. The x, y, z position of the feet are relative to their own shoulder. You can connect with me on facebook: facebook.com/profile.php?id=61552517657914. I'd love to see what your working on.

  • @ManoBiletsky
    @ManoBiletsky4 ай бұрын

    Please can you share this code?🙏🙏🙏

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    4 ай бұрын

    Thank you for watching! I don't plan to share any code yet. This video just discusses the inverse kinematics math. I'm working on a video to discuss the walking gait algorithm and how to apply the inverse kinematic equations which might be more helpful if you're working on your own SpotMicro build.

  • @ww-sf7bw

    @ww-sf7bw

    4 ай бұрын

    I'm looking forward to watch that video. Thanks for this great explanation.@@AdvancedHobbyLab

  • @ManoBiletsky

    @ManoBiletsky

    3 ай бұрын

    ​@@AdvancedHobbyLab the only thing holding me back from programming my spot micro, is that i don't know how to translate all this inverse kinematics stuff into arduino code. I have my spot ready for 4 years now. But no-one will share their code. I know how to implement walking gaits (since i have experience with that). So all i need is the code with the IK where i can input the foot positions. Nothing more.

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    3 ай бұрын

    I hope I can help. I do have plans to post the code, I just need to clean it up first. However, my code was written for Raspberry Pi in Python and will need to be translated for arduino. I hope that won't be too difficult.

  • @martinsvoboda1237

    @martinsvoboda1237

    3 ай бұрын

    @@AdvancedHobbyLab could you share the code for rraspberry in python please?

  • @martinsvoboda1237
    @martinsvoboda12375 ай бұрын

    Hello, could you please share the code?

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    5 ай бұрын

    Thank you for your interest. I'm a little hesitant to share my code as I think you get more out of the video by coding it yourself. If you have any questions about the math, let me know and I'll try to help.

  • @martinsvoboda1237

    @martinsvoboda1237

    5 ай бұрын

    ⁠@@AdvancedHobbyLab How do you enter the xyz inputs in your demo for example to move the leg up and down or forward backward? And then for the leg step? Thank you

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    5 ай бұрын

    For these demos, the xyz values where hard coded values that I iterated between in a for loop. The trick to achieving smooth transitions and controlling the speed between two foot locations is with interpolation. You have to divide the path between two points into smaller segments and use the inverse kinematic equations to calculate the servo angles for each segment. I'm working on another video about walking gaits. I hope that will help explain this topic.

  • @martinsvoboda1237

    @martinsvoboda1237

    4 ай бұрын

    @@AdvancedHobbyLaband what are the xyz coordinates values for the demos? I want to try exactly the same values, be able to i could compare your movement and my movement

  • @AdvancedHobbyLab

    @AdvancedHobbyLab

    4 ай бұрын

    I found small step sizes where the most stable. I only moved the feet 20mm off the ground and a maximum of 20mm on the x axis for forward movement. Quick steps also helps with balance. It takes a step about 2 to 3 times a second.