I am doing a project, to draw images provided using robotic arm. Initially edge detection is done on image to be drawn and coordinate value is obtained as (x,y). How to calculate 3 joint angles inverse kinematics from this value.
The manipulator in the figure seems like an planar manipulator with 3 degrees of freedom (DoF). However, from the description it seems that you only have 2 coordinates as reference coordinates. As the 3 DoF of the manipulator suggests, you would need 3.
The simplets is just to set the third one to zero, and solve the IK for (x, y, 0). You can come up with better approaches. If you want to draw something you might have a felt tipped pen where the orientation does not matter or if you have a pen, it might matter. In this case you can derive a way to make sure that the orientation matches the heading direction (you can take the next (x,y) sample to calculate the orientation)
One way you could do it is by creating a hashmap or a LUT(lookup table).
- Create an empty hashmap.
- Iterate through all possible combinations of all thetas (this results in 3 for-loops) and find the resultant (x,y) coordinates.
- Use the coordinates as the key to your hashmap and the angles as the value.
If the length of your robotic arm is constant, you get a better performance in speed after the initial overhead of loading/creating the LUT.