Design a method of coordinate transformation which can locate the position of the manipulator in the joint space of the Sawyer.
For this part, we have to design a transformation method, with which the position of the joint angles can be conveniently calculated when the finger-tip are moving on a given x-y plane. This method should be precise and accessible when the robot arm are in a fixed gesture, and should guarantee that the gripper is in an unchangeable direction. Since the robot have to hold a pen and draw with in errors of millimeters, any deviation would destroy the painting. After we chose the arm gesture, we finished these steps:
Get the Cartesian coordinate from the input feature points of the picture. (Base frame)
Transform the Cartesian coordinate to polar coordinate. (Polar coordinate of Base frame)
Transform the polar coordinate to the joints space. (Joint space)
This project only used sawyer as the robotic hardware.
Since our task only needs to draw on a horizontal plan (the end of the gripper will stay in the plane orthogonal to z-axis), set the arm in the above gesture.
Set joint_2, joint_4 and joint_6's angles always zero, which could cut down 3 degrees of freedom and save some calculation.
Build a planar coordinate system to reflect the drawing plan. Using joint_1 as the origin of length, joint_0 as the origin of angle, construct a non-standard polar coordinate by which every position on the plane can be expressed.
Obviously, set joint_0 = angle in polar coordinate, then use r and h to calculate other joints' angles.
To calculate the angles of other joints to represent the height and the length, we abstract the Sawyer into this 2-D model.
By the geometric relation,
we can use α and β to represent all the information that h and r contain.
Using α and β, we can get all the angles in the joint space.
Since we use different origin point to calculate length and angle in the polar coordinate which are also different from the origin of the base frame, so that we need to do one more step when transforming Cartesian coordinate to polar coordinate to make the position more accurate.
Now we get corresponding coordinates for any position (the Sawyer is able to be) under the non-standard polar coordinate system we defined.