Description
Write down a Python program to calculate end point and velocity of 2-joint arm, using forward kinematics.
- Set the window title to your student ID and the window size to (640, 640)
- Start from LabAssigment10-code-skeleton.py.
- When program begin, you can see white boxes(2 joint arm) on x axis.
- You can rotate these boxes by changing matrix R1 and R2. iii. R1 and R2 should be calculated by XYZ Euler Angles.
- You should rotate 2 joints, by changing rotation matrix R1 and R2.
- The joint R1 should be t rad rotated by Y axis when t seconds have elapsed since the program was executed. (Rotation angle for X, Z axis is 0)
- The joint R2 should be t rad rotated by X axis and t rad rotated by Z axis when t seconds have elapsed since the program was executed. (Rotation angle for Y axis is 0) D. You should mark end point of arm, with some lines or little box.
- End SRLQWLVFHQWHURIVHFRQGMRLQWĜVRXWHUSODQH
- You should draw line for showing velocity of end point.
- The velocity vector can be calculated between current end point and before end point.
- Multiply 10 to the length of line(magnitude of velocity vector) for visible.
- The velocity vector is started at current end point and direction is to next frame.
- Expected result: Uploaded LabAssignment10-1.mp4
- 7RFRPSDUH\RXUUHVXOWZLWKYLGHRURWDWHFDPHUDE\SUHVVNH\ěĜ, 4 times.
- Write down a Python program to show animation of 2-joint arm, using interpolation of rotation matrix.
- Set the window title to your student ID and the window size to (640, 640) B. Start from LabAssignment10-code-skeleton.py. It is same as lab assignment 10-1.
- You should make 61 frames animation(0 ~ 60).
- Frame 0, Frame 20, Frame 40, Frame60 was given. You can calculate R1 and R2 to draw each frame. Make inner frames using interpolation method(Slerp) that you implemented at LabAssignment9.
| Frame | Rotation(XYZ Euler Angle, degree) |
| 0 | (R1: X 20 Y 30 Z 30) (R2: X 15 Y 30 Z 25) |
| 20 | (R1: X 45 Y 60 Z 40) (R2: X 25 Y 40 Z 40) |
| 40 | (R1: X 60 Y 70 Z 50) (R2: X 40 Y 60 Z 50) |
| 60 | (R1: X 80 Y 85 Z 70) (R2: X 55 Y 80 Z 65) |
- Use red color for 0 frame, yellow color for 20 frame, green color for 40 frame, blue color for 60 frame and white color for all inner frames.
- Expected result: Uploaded LabAssignment10-2.mp4
- 7RFRPSDUH\RXUUHVXOWZLWKYLGHRURWDWHFDPHUDE\SUHVVNH\ěĜtimes




