# Line representations in robotics

Line representations in robotics are used for the following:
* They model joint axes: a revolute joint makes any connected rigid body rotate about the line of its axis; a prismatic joint makes the connected rigid body translate along its axis line.
* They model edges of the polyhedral objects used in many task planners or sensor processing modules.
* They are needed for shortest distance calculation between robots and obstacles.
When using such line it is needed to have conventions for the representations so they are clearly defined. This article discusses several of these methods.

## Non-minimal vector coordinates

A line $L(p,d)$ is completely defined by the ordered set of two vectors:
* a point vector $p$, indicating the position of an arbitrary point on $L$
* one free direction vector $d$, giving the line a direction as well as a sense.
Each point $x$ on the line is given a parameter value $t$ that satisfies: $x=p+td$. The parameter t is unique once $p$ and $d$ are chosen. The representation $L(p,d)$ is not minimal, because it uses six parameters for only four degrees of freedom. The following two constraints apply:
* The direction vector $d$ can be chosen to be a unit vector
* the point vector $p$ can be chosen to be the point on the line that is nearest the origin. So $p$ is orthogonal to $d$

### Plücker coordinates

Arthur Cayley and Julius Plücker introduced an alternative representation using two free vectors. This representation was finally named after Plücker. The Plücker representation is denoted by $L_{pl}(d,m)$. Both $d$ and $m$ are free vectors: $d$ represents the direction of the line and $m$ is the moment of $d$ about the chosen reference origin. $m=p\times d$ ($m$ is independent of which point $p$ on the line is chosen!) The advantage of the Plücker coordinates is that they are homogeneous. A line in Plücker coordinates has still four out of six independent parameters, so it is not a minimal representation. The two constraints on the six Plücker coordinates are
* the homogeneity constraint
* the orthogonality constraint

## Minimal line representation

A line representation is minimal if it uses four parameters, which is the minimum needed to represent all possible lines in the Euclidean Space (E³).

### Denavit–Hartenberg line coordinates

Jaques Denavit and Richard S. Hartenberg presented the first minimal representation for a line which is now widely used. The common normal between two lines was the main geometric concept that allowed Denavit and Hartenberg to find a minimal representation. Engineers use the Denavit–Hartenberg convention(D–H) to help them describe the positions of links and joints unambiguously. Every link gets its own coordinate system. There are a few rules to consider in choosing the coordinate system:
* the $z$-axis is in the direction of the joint axis
* the $x$-axis is parallel to the common normal: $x_{n}=z_{n}\times z_{n-1}$ If there is no unique common normal (parallel $z$ axes), then $d$ (below) is a free parameter.
* the $y$-axis follows from the $x$- and $z$-axis by choosing it to be a right-handed coordinate system.
Once the coordinate frames are determined, inter-link transformations are uniquely described by the following four parameters:
* $\theta \,$: angle about previous $z$, from old $x$ to new $x$
* $d\,$: offset along previous $z$ to the common normal
* $r\,$: length of the common normal (aka $a$, but if using this notation, do not confuse with $\alpha$). Assuming a revolute joint, this is the radius about previous $z$.
* $\alpha \,$: angle about common normal, from old $z$ axis to new $z$ axis

### Hayati–Roberts line coordinates

The Hayati–Roberts line representation, denoted $L_{hr}(e_{x},e_{y},l_{x},l_{y})$, is another minimal line representation, with parameters:
* $e_{x}$ and $e_{y}$ are the $X$ and $Y$ components of a unit direction vector $e$ on the line. This requirement eliminates the need for a $Z$ component, since $e_{z}=(1-e_{x}^{2}-e_{y}^{2})^{\frac {1}{2}}$
* $l_{x}$ and $l_{y}$ are the coordinates of the intersection point of the line with the plane through the origin of the world reference frame, and normal to the line. The reference frame on this normal plane has the same origin as the world reference frame, and its $X$ and $Y$ frame axes are images of the world frame's $X$ and $Y$ axes through parallel projection along the line.
This representation is unique for a directed line. The coordinate singularities are different from the DH singularities: it has singularities if the line becomes parallel to either the $X$ or $Y$ axis of the world frame.

## Product of exponentials formula

The product of exponentials formula represents the kinematics of an open-chain mechanism as the product of exponentials of twists, and may be used to describe a series of revolute, prismatic, and helical joints.