+ LabAssignment2/
+ 1/
- py
+ 2/
- py
+ 3/
- py
- The submission time is determined not when the commit is made but when the git push is made.
- Write down a Python program to compare 4 orientation interpolation methods. A.First, implement following functions:
- exp & log functions
- exp(rv)
- Converts a rotation vector to a rotation matrix
- You can use Rodrigues rotation formula or the method in 10-Animation slides.
- Returns a rotation matrix log(R)
- Converts a rotation matrix to a rotation vector
- You can use the method in 10-Animation slides.
- Returns a rotation vector (the length of the vector is the rotation angle) C.Interpolation functions:
- slerp(R1, R2, t) slerp
- R1 & R2: rotation matrices for start & end orientations ii. interpolateRotVec(rv1, rv2, t) interpolate each element of two vectors
- rv1 & rv2: rotation vectors for start & end orientations
- interpolateZYXEulerAngles(euler1, euler2, t) interpolate each element of two euler angle tuples
- euler1 & euler2: tuples of ZYX Euler angles for start & end orientations (euler1[0]:
xang, euler1[1]: yang, euler1[2]: zang)
- interpolateRotMat(R1, R2, t) interpolate each element of two matrices
- R1 & R2: rotation matrices for start & end orientations D. For all interpolation functions:
- All interpolation functions return a rotation matrix ii.The parameter t ranges from 0.0 to 1.0
- Start from the uploaded code skeleton (LabAssignment10-1-code-skeleton.py).
- You will need to use
- The given lerp() for interpolateRotVec(), interpolateZYXEuler(), interpolateRotMat() ii.The given ZYXEulerToRotMat() for interpolateZYXEuler() iii. Your exp(), log() implementation for slerp(), interpolateRotVec() G.Program usage (already implemented in the code skeleton):
- When the program is run, only slerp() result is visible ii.A key: Toggle slerp() result iii. S key: Toggle interpolateRotVec() result iv. D key: Toggle interpolateZYXEuler() result
- F key: Toggle interpolateRotMat() result vi.Z key: Hide all results vii. X key: Show all results
- Set the window title to your student ID and the window size to (480,480).
- Expected result: Uploaded LabAssignment10-1.mp4
- Files to submit: A Python source file (Name the file whatever you want (in English). Extension should be .py)
Reviews
There are no reviews yet.