The code used in this video is available on my GitHub account: github.com/engineerm-jp/Inverse_Kinematics_KZbin
@Midotaha12342 жыл бұрын
Hi , I have a question, is the input to IK x,y,z is obtained from the output of the forward kinematics using readings from servo feedback ? Thanks
@EngineerM2 жыл бұрын
The input to the IK is the coordinate of the desired position. So you can choose any value for x, y, z, as long as that point is physically reachable by the leg/arm of your robot.
@mesutkocak72272 жыл бұрын
First of all, thank you very much for making such a video, but there is a point that I do not understand. Line 63 of your code says theta2=beta+alpha. Shouldn't it actually be theta2=beta-alpha?
@EngineerM2 жыл бұрын
Hi, thank you so much for visiting my channel! That's a good point. Depending on how you set up the P axis we'd have to consider whether theta2 = beta +/- 1alpha. In the video, the value of P (sqrt(x^2 + y^2) will always be greater than zero, so that means alpha's sign is determined by the value of z. That means, if z is negative, then the alpha would be a negative value. So beta+alpha is essentially beta-alpha.
@oaiwjebdlla2 жыл бұрын
How do you set servo position to a negative number if it can only move 0-180°? Your code gives negative number too, also how do you calculate a leg offset? Thanks and great video
@EngineerM2 жыл бұрын
Hi there, you could potentially add an offset to the angle output so that the output angles are in the range of 0~ 180*. For example, if the output is between -90 and 90, then we could do something like, output = output + 90. The leg offsets are values that are phycially measured from the center of the robot to the leg's origin.
@satyananda4389 Жыл бұрын
Thank you so much sir, i was able to implement your inverse kinematics method in Quadruped robot for competition and it works perfectly. Now, i want to change into Hexapod by changing some code on quadruped kinematic inverse. But I have a question, what quadrant is for the middle right leg and the middle left leg in? Thanks Sir, im waiting for your reply ✌
@satyananda4389 Жыл бұрын
@EngineerM How Sir?
@EngineerM Жыл бұрын
Hi, it's great to hear that your robot works! I believe the right one can be any of 1st or 4th, and left can be 2nd or 3rd.
@RajMehta-ck2mg Жыл бұрын
how to implement this for continuously changing coordinates
@EngineerM Жыл бұрын
I think one of the way to do this task is by interpolation. For example, you can keep generating and sending some way points between the initial and the final (desired) position to the IK function.
@satyananda4389 Жыл бұрын
I want to ask sir, Im making quadruped spider robot, How do we know which leg is in which quadrant? and how about the offset angle? im confused about it, Thanks
@EngineerM Жыл бұрын
Hi, it's great to hear that you're making a robot! Regarding the placement of the legs, you can choose whichever order you like. However, I would choose counter-clockwise ordering because the +ve yaw angles is counter-clockwise around the vertical axis. Also, I would recommend making the +ve x-axis as your reference axis (i.e., offset=0 deg) since it's the simplest (i.e., leg1 has 45deg, leg2 135deg, ...).
@satyananda4389 Жыл бұрын
@@EngineerM Thanks for your answer 😁, so i would choose the configuration of the leg like this : Leg Offset Degree = [0, 90, 180, 270] or [45, 135, 225, 315] Front Right Leg : First Quadrant, Offset = 0 or 45 Back Left Leg : Second Quadrant, Offset = 90 or 135 Front Left Leg : Fourth Quadrant, Offset = 270 or 315 Back Right Leg : Third Quadrant, Offset = 180 or 225 Is it correct sir? Im using Trot Gait, and also Dynamixel AX18 Servo. Thanks
@EngineerM Жыл бұрын
Yes, something like that 👍. Just one thing; should the front left leg be in the second quadrant? (back left third, back right fourth so that they are in counterclockwise order). Nice choice of the servos, by the way :)
@satyananda4389 Жыл бұрын
@@EngineerM Thank you for your reply sir In my robot, the front leg and back leg has opposite minimum and maximum angle positions (max angle of the front leg is on the right side, but max angle of the back leg is on the left side) if i choose front left as second quadrant, back left third, back right fourth, the angle of the left foot and right foot has the same change, for example: I want to make the robot move forward (i.e. by reducing the initial coordinate Y of each leg) then the result is: Front Right Angle : Decreased Back Left Angle : Decreased Front Left Angle : Increased Back Right Angle : Increased But if i choose front left as fourth quadrant, back left second, back right third like i said before, the result is: Front Right Angle : Decreased Back Left Angle : Increased Front Left Angle : Increased Back Right Angle : Decreased In Trot Gait, Front Right and Back Left leg has the same movement right? also the Front Left and Back Right. So that's why i choose that configuration, is it okay sir?
@EngineerM Жыл бұрын
Ohh I see. I think that would work nicely 😃
@ahmedbenyoucef32382 жыл бұрын
thank you very much for this video. what is the version of your python that run this work?