When it comes to programing the logic for your robot to move there are
several paths you can take. Usually you start by specifying the position of
each servo on every movement of the robot, thus giving the angles of the joints
to make the arm gripper go to a certain position. This is called Forward
Kinematics.
The disadvantage with Forward Kinematics is that you need to know the angle of every joint on every instant of a movement, therefore as the complexity of the movement increases it also increases the amount of angles you need to know. This characteristic makes long and tedious the duty to program your robot with the intention to go to variable positions. I started programming some moves to the robot in this way, but I quickly realized about how impractical this technique was.
If your intention is to go into more complex projects, you really don't want to program every position of every joint; you just want to tell your robotic arm (or any robotic chain) "go to X,Y,Z position". Well, that technique is called Inverse Kinematics, were you just specify the desired position of the arm gripper and the robot logic calculates the angle of every joint in order to accomplish that gripper position.
Using this technique allows you to escalate your code for higher levels of complexity, but you need to obtain the inverse kinematics equations for your robot; those are the equations that will give the joint angles (and thus servo positions) when you just input the final gripper position.
To obtain those Inverse Kinematics equations you need to image your robot arm as a series of geometric figures and use geometry principles to obtain the desired angles. I will explain how I did it for my robotic arm, but it varies according to the type of robot and the number of Degrees Of Freedom (DOF) it has.
First I started by dividing the arm assembly into the below figures, then I specified which values will be constants (in this case the lengths from joint to joint and the desired final position) and which angles will be my desired output (in this case the shoulder, elbow and wrist angles).
Geometric figures on my robotic arm |
Now it comes the math-fun part: you can use the Law of
Cosines to obtain the angles of a triangle by knowing the length of its sides.
So we can obtain the elbow angle with the following formula:
Where c is obtained using the known sides of the
triangles and Pythagoras' theorem:
Also by Law of Sines we can obtain angles A and B:
Finally, I substitute the sides of the arms and the
desired extension (E) on those formulas and I used them on some routines on the
Arduino controller that specifies where to extend the arm. Also I created other
routines for raising the arm, rotating the base, opening/closing the wrist and
rotating the gripper.
By using these routines, I was able to scale my code
into simpler instructions, something like: raise, rotate A degrees, go to B
extension, raise, rotate C degrees, go to D extension and so on.
Note that these formulas use always the gripper
perpendicular to the ground and on a 2-Dimensional space, places around the
ground. Next steps will be to create these inverse kinematics equations for a
3-D space.
Hi!
ReplyDeleteI found this really helpful. Do you have the mathematics for a 3D space? Thanks!
Hello!
ReplyDeleteYou have done a great job there. I'm also building a project using the same robotic arm. Do you have knematic equations for 3D space? Thank you!
Hi, unfortunately I haven't write the equations for 3D space. Now that I'm resuming my robotics projects I'm planning to do it. I hope to have them soon.
ReplyDeleteThe answers to your problems are here. These equations are extremely useful. I'm using these calculations for my arm. It's amazing, and simple. (note: it's note my post. credit to maquinapensante1(on youtube))
ReplyDeletehttp://www.maquinapensante.com/robots/robots/Blog/Entries/2011/2/12_Robot_Arm_with_Inverse_Kinematics_%282011%29.html
Thanks Nebiyou! That link looks great, lots of info.
ReplyDeletedamm where the example code tho?
ReplyDeletecuz this did not really explain nothing, just saying
Delete"By using these routines, I was able to scale my code into simpler instructions, something like: raise, rotate A degrees, go to B extension, raise, rotate C degrees, go to D extension and so on."
ReplyDeleteFind Fresher jobs at jobs acid .It is Jobs portal if you are searching fresher jobs then jobs acid is the right place for fresher.
Fresher jobs in durgapur
Fresher jobs in agartala
Fresher jobs in amritsar
Fresher jobs in allahabad
Fresher jobs in ahmedabad
fresher jobs in greater noida
fresher jobs in ghaziabad
fresher jobs in noida
Fresher jobs in bangalore
fresher jobs in chennai
fresher jobs in delhi
fresher jobs in pune
fresher jobs in chandigarh
fresher jobs in gurgaon
fresher jobs in hyderabad
fresher jobs in indore
fresher jobs in mumbai
fresher jobs in faridabad
Fresher jobs in andhra pradesh
Fresher jobs in alwar
Fresher jobs in andaman nicobar
Snapchat Account
ReplyDeleteIf anyone looking for packers and movers services in Hyderabad then choose Ashoka Packers and Movers service. They are one of the best shifting service providers.
ReplyDeletePackers And Movers Hakimpet
Packers And Movers Himayat Nagar
Packers And Movers Hafeezpet
If you are looking for packers and movers services company in Delhi NCR. click here-
ReplyDeletepackers services in noida
packers services in delhi ncr
We are one of the best packers and movers in Noida which is tend to provide you best packers and movers service so if you want to get best packers and movers services so visit on- Noida Packers and movers
ReplyDeleteHi, If you are looking for cheap and moving services provider company in Delhi so visit on Packers Services in Noida and get best moving services.
ReplyDeleteExcellent Blog, I am surely bookmarking this: also have a look into my sites Best Packers Movers in Kochi City and Packers Movers in Ernakulam District get in touch with us
ReplyDelete