# Forward kinematics by torus slicing

06 May 2018Consider a two-link planar robot arm with link lengths $R$ and $r$ and assume for concreteness that $r < R$. Its configuration is determined by angles $\theta$ and $\alpha$, where $\theta$ is the angle between the $x$-axis and the first link and $\alpha$ is the angle between the first link and the second link.

Every choice of angles $(\theta, \alpha) \in \mathbb{T}^2$ uniquely determines the position of the end effector $(x, y) \in \mathbb{R}^2$ through the forward kinematics mapping \begin{equation*} f \colon \mathbb{T}^2 \to \mathbb{R}^2, \quad (\theta, \alpha) \mapsto (x, y). \end{equation*} Note that the configuration space of the two-link arm is the two-dimensional torus $\mathbb{T}^2$. The image of the torus under $f$ is not the whole $\mathbb{R}^2$ but a ring between two circles with radii $R-r$ and $R+r$.

For some background information on such interpretation of forward kinematics, see Numerical Algebraic Geometry and Algebraic Kinematics by C. W. Wampler and A. J. Sommese.

## Why is inverse mapping not unique?

Mapping $f$ is not one-to-one: for any fixed position of the end effector, there are two arm configurationsâ€”one with elbow up and one with elbow down. Such non-uniqueness can be understood as a result of projecting a higher-dimensional object onto a lower-dimensional space. That is, the reachable space is a shadow of the configuration space, and one point on the shadow corresponds to two points on the original object.

## Slicing the torus

There is a nice way to visualize the forward kinematics mapping. Imagine a torus with big radius $R$ and small radius $r$ embedded in $\mathbb{R}^3$ (i.e., think about the surface of a donut). The game is to project this hollow donut onto a ring in $\mathbb{R}^2$. A straightforward approach could be to shine some light from above and treat the shadow of the donut as the image. However, that is not what the forward kinematics is doing.

The forward kinematics projects the donut onto the ring by slicing it and rotating the slices as in a circular salami package. Imagine cutting the donut into thin salami slices; since the donut is hollow inside, salami slices are circles. Then, rotate every circle by $90^{\circ}$ around the horizontal axis that passes through it. Many circles will overlap, with every point of the ring covered by precisely two circles. That explains why there are two points in the configuration space that correspond to one point in the reachable space.

## Can we use this insight to improve inverse kinematics?

Inverse kinematics is by definition a one-to-many mapping. So, in any practical situation, we have to decide which point in the configuration space to return. Since most of the time we donâ€™t care about individual robot postures but want to generate smooth trajectories, we can use the intuition that any smooth robot trajectory corresponds to a smooth curve on the torus. When deciding which robot configuration to return at the next time step, we can assume that it should not differ from the current configuration by too much. That is precisely what Jacobian transpose and Jacobian pseudoinverse methods are doing.