HW5: Pose in Robotics ‐ Exponential Coordinates of Robot Motions - madibabaiasl/kinematics-robotic-arms-modern-approach GitHub Wiki

Learning Objectives

  • Represent a rigid motion as a screw motion and describe its axis, amount of motion, and pitch.
  • Translate between a pose written as a transformation matrix and a motion written in exponential coordinates.
  • Build and test small Python functions that perform the core kinematics operations from Lessons 3–6, with clear inputs, outputs, and checks.

Learning Outcomes

By completing this homework, you can:

  • Take a concrete pose and recover a plausible screw axis, rotation amount, pitch, and a point on the axis; sketch that axis and explain what it means physically.
  • Implement and verify a set of reusable Python utilities for rotations, transformation matrices, adjoints, screws, and exponentials/logarithms of motion.

Why This Matters

This homework turns the ideas from Lessons 3–6 into tools you can actually use for the coming projects. The screw/motion view is the cleanest way to describe “how a rigid body got from here to there,” and the code you write here becomes your kinematics toolbox for future projects.

Required Tools

  • Visual Studio Code or any IDE for Python
  • Pen and paper

Part 1: Practice Question

Given

$T = \begin{pmatrix} 0 & -1 & 0 & 2 \\ 1 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0.5 \\ 0 & 0 & 0 & 1 \end{pmatrix}$

find the screw axis $\mathcal{S} = ({\mathcal{S}}_{\omega},\mathcal{S}_v)$ (4 points), the rotation angle $\theta \in [0,2\pi)$ (4 points), the pitch h (4 points), and a point a on the screw axis (4 points). Draw the screw axis (4 points). Explain the physical interpretation of this (4 points).

Part 2: Python Code for All the Math from Lesson 3 up to Lesson 6

Based on the lessons that we have learned starting from Lesson 3: Orientation in Robotics (Rotation Matrices) to Lesson 6: Pose in Robotics (Exponential Coordinates of Robot Motions), develop functions in Python that can calculate the following. Important note: make sure to include the hand-written procedure on how to get that function in your report as well. Reports with only the code will get half credit. For example for the first one, one can include this in their report: the inverse of a rotation matrix is equal to its transpose: $R^{-1} = R^T$. Also include an example output of your program given a sample input. Again for the first part, you should input a rotation matrix R to the program and show that it returns its inverse.

One function

  • gets the rotation matrix R and returns its inverse (4 points). Note that using the inv() function is not allowed.

  • gets a 3-vector $\hat{\omega}$ and gives back the $3 \times 3$ skew-symmetric matrix representation of it (4 points).

  • gets the angle $\theta$ and the unit axis of rotation $\hat{\omega}$ and returns the rotation matrix representing the rotation about $\hat{\omega}$ by $\theta$. This function should be able to handle the special cases of rotation operators about $\hat{x}$, $\hat{y}$, and $\hat{z}$. Use Rodrigues' formula to write this function (4 points).

  • gets the $3 \times 3$ skew-symmetric matrix representation of $\hat{\omega}$ and returns the 3-verctor $\hat{\omega}$ (4 points).

  • gest the 3-vector exponential coordinates for rotation $\hat{\omega}\theta$ and extracts the rotation axis $\hat{\omega}$ and the rotation amount $\theta$ (4 points).

  • gets a $3 \times 3$ rotation matrix R and finds the axis $\hat{\omega}$, and angle $\theta$ representation of it (4 points).

  • gets the rotation matrix $R \in SO(3)$ and a position vector $p \in \mathbb{R}^3$ and returns the $4 \times 4$ homogenous matrix T coressponding to them (4 points).

  • gets the $4 \times 4$ homogenous transformation matrix T and extract the $3 \times 3$ rotation matrix and $3 \times 1$ position vector from it (4 points).

  • gets the $4 \times 4$ homogenous transformation matrix T and computes the inverse of it (4 points). Note that using the inv() function is not allowed.

  • gets a 3-vector and returns its homogenous coordinates (4 points).

  • gets the $4 \times 4$ homogenous transformation matrix T and computes its $6 \times 6$ adjoint representation $[Ad_{T}]$ (4 points).

  • gets the 6-vector exponential coordinates of motion $\mathcal{S}q$ and extracts the normalized screw axis $\mathcal{S}$ and the distance traveled along the screw q (4 points).

  • gets the 6-vector screw axis and computes the matrix representation of it (4 points).

  • gets the screw axis $\mathcal{S}$ and q and calculates the corresponding homogenous transformation matrix $T \in SE(3)$ (4 points).

  • gets the $4 \times 4$ homogenous transformation matrix and computes the screw axis and q (4 points).

Report Requirements for Homework 5

  • Submit reports individually.
  • Don't forget to include a written report for part 2, explaining your procedure and showing an example output of your prgram given the desired input.
  • Title, Name (5 points)
  • Meeting the requirements of each part or question above that has points in front of it.
  • Reflection: A short reflection on any interesting observations, surprises, difficulties, new directions that can be taken and any other feedback you may have (6 points)
  • References: Note that utilizing (or not utilizing) AI should be disclosed here. You can use AI according to the allowed instances in the Syllabus. Also, 100% AI-generated content will get 0 (5 points).

Note: This activity is eligible for "best report" points in our reward system (see the reward system sheet for the criteria).