DeepAI

# Closed-form solutions for the inverse kinematics of serial robots using conformal geometric algebra

This work addresses the inverse kinematics of serial robots using conformal geometric algebra. Classical approaches include either the use of homogeneous matrices, which entails high computational cost and execution time or the development of particular geometric strategies that cannot be generalized to arbitrary serial robots. In this work, we present a compact, elegant and intuitive formulation of robot kinematics based on conformal geometric algebra that provides a suitable framework for the closed-form resolution of the inverse kinematic problem for manipulators with a spherical wrist. For serial robots of this kind, the inverse kinematics problem can be split in two subproblems: the position and orientation problems. The latter is solved by appropriately splitting the rotor that defines the target orientation into three simpler rotors, while the former is solved by developing a geometric strategy for each combination of prismatic and revolute joints that forms the position part of the robot. Finally, the inverse kinematics of 7 DoF redundant manipulators with a spherical wrist is solved by extending the geometric solutions obtained in the non-redundant case.

• 2 publications
• 2 publications
• 19 publications
11/10/2022

### Canonical Subproblems for Robot Inverse Kinematics

Inverse kinematics of many common types of robot manipulators may be dec...
11/15/2017

### IKBT: solving closed-form Inverse Kinematics with Behavior Tree

Serial robot arms have complicated kinematic equations which must be sol...
03/06/2019

### Multiple configurations for puncturing robot positioning

The paper presents the Inverse Kinematics (IK) close form derivation ste...
10/01/2021

### Dynamic Models of Spherical Parallel Robots for Model-Based Control Schemes

In this paper, derivation of different forms of dynamic formulation of s...
11/13/2018

### Robust H-infinity kinematic control of manipulator robots using dual quaternion algebra

This paper proposes a robust dual-quaternion based H-infinity task-space...
04/23/2020

### Multi-task closed-loop inverse kinematics stability through semidefinite programming

Today's complex robotic designs comprise in some cases a large number of...
03/25/2021

### On multi-conditioned conic fitting in Geometric algebra for conics

We introduce several modifications of conic fitting in Geometric algebra...

## 1 Introduction

A serial robot is an open kinematic chain made up of rigid bodies, called links, connected by kinematic pairs, called joints, that provide relative motion between consecutive links. The point at the end of the last link is known as the end-effector. Only two types of joints are considered throughout this work: revolute (prismatic) joints, that perform a rotational (translational) motion around (along) a given axis.

The end-effector position and orientation (also known as the pose) is expressed as a differentiable function , where denotes the space of joint poses, known as the configuration space of the robot, while denotes the space of all positions and orientations of the end-effector with respect to a reference frame, known as the operational space of the robot. We say that the workspace of the robot, denoted by , is the volume of the operational space that is reachable by the robot’s end-effector. We attach a frame to each joint of the robot so that it describes the relative position and orientation of the joint. The relations between consecutive joint frames can be expressed by homogeneous matrices based on the Denavit-Hartenberg convention Denavit and Hartenberg (1965). This convention consists of the use of four parameters, the D-H parameters (figure 1): one acting as a joint variable – angle or displacement , depending on the nature of the joint – and the other three acting as constants – length , angle and or depending on which one describes the joint variable Siciliano et al. (2008); Spong et al. (2006). In general, if the nature of the joint is not specified, its joint variable is denoted by

. The vector of all joint variables is denoted by

and is known as the configuration. Therefore, the configuration space is the space of joint configurations. A robot is said to have degrees of freedom (DoF) if its configuration can be minimally specified by variables. For a serial robot, the number and nature of the joints determine the number of DoF. For the task of positioning and orientating its end-effector in the space, the manipulators with more than 6 DoF are called redundant, while the rest are non-redundant.

Therefore, we can associate a homogeneous matrix with each joint frame such that it relates such frame to the preceding one, i.e., joint frame . The first joint frame is related to the fixed reference frame. For each configuration , can be represented using these homogeneous matrices as follows:

 T0n=T01⋅T12⋅⋯⋅Tn−1n (1)

with

 T0n=(Rp01) (2)

where denotes the rotation matrix describing the end-effector orientation with respect to the fixed reference frame and is the vector that describes the end-effector position with respect to that reference frame Denavit and Hartenberg (1965); Siciliano et al. (2008); Spong et al. (2006). An important class of serial robots are those with a spherical wrist. For these robots, the axes of their last three joints intersect at a common point, known as the wrist center point, or are parallel (the intersection point and, hence, the wrist center point, is the point at the infinity). In this context, the end-effector position, , can be moved to the wrist center point by a fixed translation and, thus, the last three joints would only contribute to the orientation of the end-effector.

This paper is focused on one of the most important problems in robot kinematics, namely the inverse kinematic problem. It consists of recovering the joint variables, i.e., the configuration, given a target end-effector pose. This configuration may not be unique, since non-redundant manipulators have up to sixteen different configurations for the same end-effector pose Pieper (1968), while for redundant manipulators this number is unbounded Siciliano et al. (2008); Spong et al. (2006). The opposite problem is known as the forward kinematic problem and consists of obtaining the pose of the end-effector given the value of the joint variables.

The inverse kinematic problem plays a major role in robotics, specially in robot kinematics, motion planning and control theory. There are different methods used to solve it and they are usually categorized in two groups:

• Closed-form methods: all the solutions are expressed in terms of the entries of

. These methods strongly depend on the geometry of the manipulator and, therefore, are not sufficiently general. However, it is clear that they have advantages over the numerical methods such as, for instance, lower computational cost and less execution time. Additionally, they give all the solutions for a given end-effector’s pose. Some closed-form methods include strategies based on machine learning

Jiokou Kouabon et al. (2020), matrix manipulations Pieper (1968); Paul (1981), the definition of the arm angle parameter Jung et al. (2011); Yu et al. (2012) and different geometric methods Huang and Jiang (2013); Liu et al. (2015); Wei et al. (2014).

• Numerical methods: a good approximation of one of the solutions is derived iteratively. Although these methods usually work for any manipulator, they suffer from several drawbacks such as, for example, high computational cost and execution time, existence of local minima and numerical errors. Moreover, only one of the sixteen (infinite) possible solutions is obtained for non-redundant (redundant) manipulators. The most common numerical approaches are the Jacobian-based methods Aristidou et al. (2018); Buss (2009); De Luca and Oriolo (1991); Lau and Wai (2002); Wang et al. (2012); Wampler (1986).

Among all the methods presented in this section, the closed-form methods are the most suitable for serial robots since they allow us to obtain the set of all solutions with a small computational cost. This paper proposes a formulation of the inverse kinematic problem based on conformal geometric algebra. This formulation allows us to avoid the use of matrices and, due to its inherent geometric nature, provides a geometrical description of the problem with which the inverse kinematics can be solved easily. These properties are exploited in this work to solve the inverse kinematics of serial robots with 6 DoF and spherical wrist. For these manipulators, this problem can be decoupled into two subproblems: the position problem and the orientation problem. For the former, a classification of the different combinations of prismatic and revolute joints that describe the position part of the manipulator is made and a geometric strategy is developed to solve each one of them, while, for the latter, we split the rotor that defines the target orientation into three simpler rotors, each one of them depending on a unique joint variable. Finally, the inverse kinematics of redundant serial robots with 7 DoF and spherical wrist is solved by extending the geometric solutions obtained in the non-redundant case.

The rest of the paper is organized as follows: Section 2 reviews the related work and presents a basic introduction to geometric algebra. In Section 3, a description of the forward kinematics of an arbitrary serial robot based on conformal geometric algebra is given. The formulation of the inverse kinematic problem and its solution are developed in Sections 4 and 5. In Section 6, the inverse kinematics of 7 DoF redundant serial robots is solved by extending the strategies introduced in Section 6. Finally, Section 7 presents the conclusions.

## 2 Related work and mathematical preliminaries

### 2.1 Related work

As mentioned in the introduction, some closed-form methods are usually difficult to formulate and solve for non-redundant robots even if they have a spherical wrist. For instance, the Pieper method Pieper (1968) allows us to obtain the solutions of the inverse kinematics as the solutions of a set of polynomials and, for a general serial robot with a spherical wrist, at least one of these polynomials is of degree four, which is, in general, difficult to solve.

On the other hand, the Paul method Paul (1981) consists of the manipulation of the homogeneous matrices of the relation (1) so the following family of matrix equations is obtained:

 (Ti−2i−1)−1⋯(T01)−1⋅T0n=Ti−1i⋯Tn−1n for i=2,…,n. (3)

The objective is to isolate those non-linear equations that contain just one joint variable. However, even if we find those equations, solving them analytically is, in general, difficult. Similarly, the formulation and implementation of geometric methods is also difficult. If, for instance, the circle intersection of a plane with a sphere is considered, then a system of two equations (one of them non-linear) must be solved. In this context, geometric algebra turns to be very useful. As stated in the introduction, geometric algebra and, in particular, the conformal model of three-dimensional Euclidean space, provides a framework for modeling the kinematics and dynamics of rigid bodies that avoids the use of matrices. In addition, the geometric entities such as points, lines, planes or spheres can be represented with elements of the algebra.

Regarding the contributions using this framework, in Bayro-Corrochano and Kähler (2001); Selig (2001) analogous versions to the Paul and Pieper methods are presented. In both works, an easy and compact formulation of the problem is presented using the language provided by geometric algebra. However, they have the same drawbacks as the original methods. The approach presented in Aristidou and Lasenby (2011)

develops a fast and heuristic method that solves the inverse kinematics of arbitrary redundant serial robots. Nevertheless, the orientation problem is not treated and, since it is a numerical method, only one solution is obtained. Similarly, the approach presented in

Hildenbrand et al. (2008) only solves the position problem for an anthropomorphic manipulator.

Other approaches are focused on the development of geometric strategies based on conformal geometric algebra for particular robots. For example, in Hrdina et al. (2017), a kinematic model of a planar redundant manipulator is developed, while in Kim et al. (2015) the inverse kinematics and the singularity problem are formulated and solved for a class of parallel robots. A 5 DoF serial robot is considered in Zamora and Bayro-Corrochano (2004), where the geometric strategy followed is the same as in Hildenbrand et al. (2008). There, different geometric objects are defined. These objects, as well as the relations between them, are described using conformal geometric algebra. The angles between such geometric entities correspond to the unknown joint variables. Finally, the approach developed in Campos-Macías et al. (2017) solves the inverse kinematics of a 6 DoF humanoid leg. In Tørdal et al. (2017), the authors solve geometrically the position problem of the 6 DoF Comau Smart-5 NJ-110, while in Kleppe and Egeland (2016), particular solutions of the inverse kinematics of the UR5 and Agilus KR6 R900 are given. All of these works are based on the strategies introduced in Hildenbrand et al. (2008); Zamora and Bayro-Corrochano (2004).

In this work, an approach to solve the inverse kinematics of arbitrary 6 and 7 DoF serial robots with a spherical wrist is presented. This approach is not focused on a particular robot but applies to an entire class of manipulators. Although not every single case is covered, the majority and most representative ones are treated in this work. This allows to illustrate the power of conformal geometric algebra when applied to the inverse kinematics of serial robots with spherical wrist as well as to provide a set of easy-to-implement geometric strategies which, in turn, is the main goal of the present work In particular, the position problem is solved geometrically by extending the particular contributions of Hildenbrand et al. (2008); Tørdal et al. (2017); Lavor et al. (2018); Hadfield et al. (2020); Zaplana (2021), while a novel method is developed for solving the orientation problem. This method involves splitting the rotor that defines the target orientation into three rotors, so that each one depends on just one joint variable. The main advantage of this strategy lies in the fact that this approach is still a closed-form method, i.e., all the solutions are obtained as analytical expressions in terms of the end-effector pose. In addition, we are dealing with arbitrary serial robots of 6 and 7 DoF, not just a particular robotic geometry. Finally, due to the simplicity of the problem formulation and the geometric nature of conformal geometric algebra, such expressions are obtained easily than with other closed-form approaches (such as, for instance, the ones reviewed here).

### 2.2 Mathematical preliminaries

Geometric algebra provides strong advantages with respect to more common approaches such as, for instance, that geometric objects and Euclidean transformations live in the same algebra, that the expressions from the algebra are coordinate free and that it is well adapted to deal with more general fields in science and engineering. In particular, it provides a compact and neat formulation of robot kinematics and its main problems. Throughout this section, a brief overview of both geometric algebra and conformal geometric algebra is presented. A more detailed treatment of the subject can be found in Doran and Lasenby (2003); Dorst et al. (2007); Lasenby et al. (2004).

#### 2.2.1 Geometric algebra

Let us consider the real vector space with orthonormal basis . The geometric algebra of , denoted by , is a vector space where the operations defined in , i.e., the addition and multiplication by scalars, are extended naturally. An additional operation, the geometric product, is defined on the algebra and, acting on vectors is defined as:

 v1v2=v1⋅v2+v1∧v2, for v1,v2∈Rn, (4)

where denotes the inner or dot product and denotes the outer product.

The outer product of two vectors is a new element of , which is termed a bivector, is said to have grade two and is denoted by . By extension, the outer product of a bivector with a vector is known as a trivector and is denoted by . Clearly, trivectors have grade three. This can be generalized to an arbitrary dimension. Thus,

 (v1∧v2∧⋯∧vr−1)∧vr (5)

A bivector can be interpreted as the oriented area defined by the vectors and . Thus, has opposite orientation and, from that, the anticommutativity of the outer product can be deduced. Analogously, a trivector is interpreted as the oriented volume defined by its three composing vectors. Since the volume generated by is the same as the volume generated by , it is also deduced that the outer product is associative. Therefore, -blades can be denoted simply as:

 v1∧v2∧⋯∧vr. (6)

Linear combinations of -blades are known as -vectors, while linear combinations of -vectors, for , are called multivectors.

Applied to the basis elements , the geometric product acts as follows:

 eiej={1fori=jei∧ejfori≠j (7)

Then, can be expanded to a basis of that contains, for each , grade elements:

 Scalar: 1Vectors: e1,…,enBivectors: {ei∧ej}1≤i

This allows to extend the geometric product defined in equation (4) to arbitrary multivectors. Readers interested in a detailed explanation of this extension are referred to Doran and Lasenby (2003). The grade element is known as the pseudoscalar and is usually denoted by . Pseudoscalars allow us to define one of the main operators of geometric algebra, the dual operator. Its action over an -vector is:

 A∗r=InAr, (9)

where is an -vector. In particular, we have that for two multivectors and , the following identity holds:

 (A∧B)∗=A⋅B∗. (10)

For , the geometric algebra has the following basis:

 {1,e1,e2,e3,e12,e13,e23,I3}, (11)

where .

In , bivectors play an important role since they can be used to describe spatial rotations. Indeed, in geometric algebra, rotations are described using rotors. If a point is rotated by an angle around an axis , the rotor defining such a rotation is:

 (12)

where is the unit bivector, i.e., , representing the plane normal to . The rotated point is calculated by sandwiching between and its reverse :

 x′=Rx˜R (13)

where

 ˜R=cos(θ2)+sin(θ2)B (14)

and . Furthermore, equation (13) can be extended to arbitrary multivectors. In addition, to specify what unit multivectors are, a norm is defined in . For an arbitrary multivector , it is:

 ∥A∥=√⟨A˜A⟩0, (15)

where is the grade-0 projection operator, i.e., it extracts the scalar elements of the argument multivector.

It will be seen in the following subsection that translations can also be described by rotors in the conformal geometric algebra, a five-dimensional representation of three-dimensional Euclidean space. In addition, general geometric entities (such as points, lines, planes, circles, etc.) and the relations between them are also easily described in conformal geometric algebra.

#### 2.2.2 Conformal geometric algebra

The conformal model extends the real vector space by adding two extra basis vectors, and , with the property:

 e2=1,¯¯¯e2=−1. (16)

The enlarged vector space is usually denoted by . In addition, these two extra vectors allow us to define two null vectors, i.e., vectors whose square vanishes:

 n0=12(¯¯¯e−e),n∞=¯¯¯e+e, (17)

where is associated with the point at infinity and with the origin. However, in order to avoid confusion with the number of DoF of the robot, denoted by , an alternative yet accepted notation will be used throughout the rest of the paper:

 e0=12(¯¯¯e+e),e∞=¯¯¯e−e, (18)

where, again, is associated with the point at infinity and with the origin,

Thus, the conformal geometric algebra of is denoted by and can be seen as a geometric algebra of higher dimension (specifically, the geometric algebra of ). Now, the two null vectors and allow an intuitive description of translations, that are formulated through translators as follows:

 Tv=1−ve∞2, (19)

where the translation is performed in the direction of . Since , translators can be seen as rotors in which the bivector squares to zero. Thus, the translation of an element is done as with spatial rotations:

 A′=TvA˜Tv, (20)

where:

 ˜Tv=1+ve∞2. (21)

One of the most important advantages of conformal geometric algebra is that it provides a homogeneous model for the -dimensional Euclidean space. In particular, every point is associated with a null vector of (including the origin and the point at the infinity). This is done via the Hestenes’ embedding:

 X=H(x)=12x2e∞+e0+x, (22)

where is said to be the null vector representation of . Now, we can easily deduce the following relation Dorst et al. (2007):

 X1⋅X2=−12d(x1,x2)2, (23)

where are the null vector representations of and denotes the Euclidean distance. As a consequence, the distance between two null vectors of can be defined via the Euclidean distance:

 d(X1,X2)=√−2(X1⋅X2). (24)

The relation (23) gives us a way to define geometric objects as elements of . Let be a geometric object, then is said to be the inner representation of if for every point , . Now, using the relation (10), we have that so is also a representation of . In this case, we say that is the outer representation of and, in order to avoid confusion, we will denote it by .

Now, for two different geometric objects and with outer (inner) representations and ( and ), we define its meet or intersection as the multivector

 k1∨k2=(k1∧k2)∗=k1⋅K2. (25)

Analogously, if the outer representations of and have the same grade, the angle defined by them is computed as follows:

 ∠(O1,O2)=cos−1(K1⋅K2|K1||K2|). (26)

To describe the geometric objects we are going to use throughout this work, let be four different points with null vector representation . Then:

• (with ) is a bivector and the outer representation of the pair of points and .

• (with ) is a trivector and the outer representation of the line with direction to . Its inner representation is the bivector , where is its direction vector.

• (with ) is a trivector and the outer representation of a circle passing through the points and . Its inner representation is the bivector , where and are the inner representations of the plane and sphere whose intersection defines the circle.

• (with ) is a 4-vector and the outer representation of a plane passing through the points and . Its inner representation is the vector , where denotes the vector normal to the plane and , its orthogonal distance to the origin.

• is a 4-vector and the outer representation of a sphere passing through the points and . Its inner representation is the vector , where is the null vector representation of the center of the sphere and , its radius.

## 3 A conformal geometric algebra formulation of forward kinematics

The conformal model of the three-dimensional Euclidean space provides an elegant and compact way of describing the forward kinematics. Contrary to the classical approach, where we use the homogeneous transformation matrices constructed with the D-H parameters, this approach is entirely based on the use of rotors.

As stated in section 1, each joint frame is described with respect to the preceding one, i.e., the -th joint frame is constructed from the -th joint frame by the successive application of rigid motions (translations and rotations). Since both are described in by rotors, for each joint , the following rotors are defined:

 Tdi=1−dizie∞2,Rθi=cos(θi2)−sin(θi2)xi∧yi,Tai=1−aixi−1e∞2,Rαi=cos(αi2)−sin(αi2)yi−1∧zi−1. (27)

where (resp. ) denotes the three basis elements of the -th (resp. -th) joint frame. Then, two main rotors can be constructed from the previous ones:

 Mθi=TdiRθi,Mαi=TaiRαi. (28)

Notice that rotor contains both joint variables, while is a constant rotor. represents a screw motion around the -th joint axis, , while represents a screw motion around the axis of the -th joint frame.

Now, we can formulate the forward kinematics of a serial robot of DoF as follows:

 X′=Mθ1Mα1⋯MθnMαnX˜Mαn˜Mθn⋯˜Mα1˜Mθ1, (29)

where () is the null vector representation of either the end-effector (reference frame) position vector or the vectors defining the end-effector (reference frame) orientation. We can compactly rewrite identity (29) as follows:

 X′=M1(q1)⋯Mn(qn)X˜Mn(qn)⋯˜M1(q1)=M(q)X˜M(q), (30)

where and . Basically, what we are doing is to transform the fixed reference frame (usually placed at the base of the robot) into the end-effector frame according to configuration .

## 4 Pose representation in conformal geometric algebra

If the desired end-effector pose is represented in matrix form as:

 T=(Rp01), (31)

then it is possible to construct a rotor that also represents such a pose. Indeed, given the matrix representation of the reference frame:

 T0=(I3001), (32)

we can compute the rotor that transforms into . First, the position vector defines the rotor:

 Tp=1−∥p∥pe∞2, (33)

that applied to give us , i.e., the null vector representation of . Now, to compute the rotor that relates the orientations determined by the rotations matrices and , we notice that both rotation matrices can be seen as two sets of orthogonal vectors in , namely and . Then, the problem is reduced to find a rotor transforming one set of orthogonal vectors into another. In (Doran and Lasenby, 2003, pag. 103), a simple way of computing such rotor is presented. It involves the use of the reciprocal frame. Associated with any arbitrary set of orthogonal vectors , there exists another set of orthogonal vectors, denoted by and defined by the property:

 ei⋅ej=δij for all i,j=1,…,n, (34)

where denotes the Kronecker . Such a set is said to be the reciprocal frame of .

Now, following (Doran and Lasenby, 2003, pag. 103), the following formula is established:

 RI3,R=1+f1e1+f2e2+f3e3|1+f1e1+f2e2+f3e3|, (35)

where, again, is the orientation of the reference frame, while is the desired orientation of the end-effector. Finally, the rotor that transforms into is the product of rotors (33) and (35):

 M=TpRI3,R. (36)

As stated in section 1, for any serial robot with a spherical wrist, the target position can be moved to the wrist center point by a fixed transformation. Then, the new target position is and thus, it can be assured that the first three joints contribute to the position and orientation, while the last three only contribute to the orientation. This allows us to decouple the inverse kinematics into the position and the orientation subproblems.

## 5 Solutions for non-redundant robots with spherical wrist

In this section, the position and orientation problems for a 6 DoF serial robot with a spherical wrist are solved. Again, for the position problem different geometric strategies are defined depending on the nature and disposition of the joints along the kinematic chain. For the orientation problem, the rotor is split into three different rotors from which the joint variables can be obtained.

### 5.1 Position problem

Four different combinations of prismatic and revolute joints that constitute the position part of the robot are analysed (figure 2). For each of them, a geometric strategy is developed. It consists of computing the null vector representation of some auxiliary points placed at each joint to recover the corresponding joint variables as the angle or displacement between two geometric objects defined with such points. For each case, the point at the origin, , is denoted by and is placed at the base of the robot. Similarly, the target position is expressed as a null vector, , obtained through the Hestenes’ embedding (22). Finally, depending on the information available, for a given geometric object it could be convenient to use its inner representation or its outer representation . Clearly, a geometric object described with one of these two representations can be expressed in the other representation by using the dual operator (as explained in section 2.2.2):

 K=I5k. (37)

#### 5.1.1 Three prismatic joints (P+P+P)

A scheme of the position part of a serial robot with three prismatic joints is depicted in figure 1(a). First of all, the case without offsets between consecutive joints is considered, i.e., the axes of each pair of consecutive joints intersect. Given the first translation axis , two of the rotors defined in (27) can be used to obtain the joint axes and as follows:

 z2=Rθ2Rα2z1˜Rα2˜Rθ2,z3=Rθ3Rα3z2˜Rα3˜Rθ3. (38)

The joint axis together with the target position defines a line whose inner representation is:

 ℓ3=z3e123−(pw∧z3)e123e∞. (39)

Now, a plane containing the joint axes and and passing through the point is also defined so its inner representation is:

 π1=z1×z2, (40)

where denotes the cross product between three-dimensional vectors.

Since the end-effector position is not restricted to a fixed plane, there are not parallel prismatic joint axes. Moreover, and, thus, the intersection of the line and plane represented by and is non-empty (as graphically shown in figure 2(a)):

 B=ℓ3∨π1, (41)

where is a bivector (as deduced from identity (25)). Hence, it represents a pair of points in conformal geometric algebra. However, since the intersection between a line and a plane is a single point, the bivector is of the form:

 B=P2∧e∞ (42)

for a null point , that can be extracted from as explained in (Aristidou, 2010, pags. 24-26). With this null point, the following lines are defined through their inner representations:

 ℓ1=z1e123−(e0∧z1)e123e∞,ℓ2=z2e123−(p2∧z2)e123e∞, (43)

where is the vector whose null vector representation is and that is recovered with the projection , that is, the inverse of the Hestenes’ embedding (22). In addition, if and are the outer representations of the two lines and plane defined before, and and, since the joint axes and are not parallel, they have non-empty intersection. This can be seen depicted in figure 2(b). However, this intersection is a special case. Indeed

 ℓ1∨ℓ2=(ℓ1∧ℓ2)∗ (44)

is a grade one element, i.e., a vector. Non-null vectors do not represent any geometric object in conformal geometric algebra. Therefore, we need an alternative method for obtaining the intersection point. In this paper, we follow the same technique as in (Aristidou, 2010, pag. 31) to compute .

Finally, with the null vectors and , the joint variables are recovered using the distance (24):

 d1=d(P0,P1),d2=d(P1,P2) and d3=d(P2,Pw). (45)

Now, the case where there is an offset between two consecutive joints is studied. Offsets are always modeled by the four D-H parameters , , and . If joint is revolute (prismatic), its joint variable can have an offset as well (aligned with the joint axis by definition). In that case, we write (), where () denotes the real joint variable and (), the length of the offset.

Let us suppose, without loss of generality, that there exists an offset of fixed length between the first two joints (the other cases are analogous). Clearly, such offset is either aligned with the common perpendicular between the first and second joint axes and has length or can be decomposed into two components (as depicted in figure 3(a)): one aligned with such a common perpendicular (with length ) and the other one aligned with the first joint axis (with length ). Now, since the plane represented by is defined with the joint axes and and, in this case, offsets do not change the direction of the joint axes, we can translate it in the direction of the common perpendicular by an amount equal to :

 π′1=Ta2π1˜Ta2, (46)

where is defined as in (27). Now, and, therefore, can be obtained from equation (41) as in the case without offsets. With , the inner representation of a line is determined as in (43). Then, this line is transformed as follows:

 ℓ′2=T−¯¯¯d1T−a2ℓ2˜T−a2˜T−¯¯¯d1, (47)

where, again, and are defined as in (27). Now, since the lines represented by and belong to the same plane, they have non-empty intersection and . This completes the solution for this case.

#### 5.1.2 Two prismatic joints and one revolute (P+P+R)

The position part of a serial robot with two prismatic joints and one revolute is depicted in figure 1(b). There are different combinations of two prismatic joints with one revolute but most of them are treated in a similar way. Only the most relevant cases are fully developed here. Again, the case without offsets is considered first.

Let us suppose that the first two joints are prismatic and the third one, revolute. As in the preceding case, given , the joint axes and can be calculated as in (38). Now, the inner representation of the plane that contains and the joint axes and is defined as in (40) and denoted by . Since the robot has 6 DoF, its end-effector position is not restricted to a fixed plane and, thus, there exists an offset at the end of the third link, i.e., between the third link and the set of joints that forms the spherical wrist. In addition, cannot be orthogonal to the plane represented by (if it was, would always belong to a fixed plane parallel to the plane represented by ).

Since the last three joints of the robot do not contribute to the position of the end-effector, they are not considered in the position problem. Therefore, this offset can be seen as a displacement defined in the plane of the third joint frame, i.e., a displacement of length in the direction. Then, it is possible to translate to compensate the offset (as depicted in figure 3(b)):

 P′w=T−a4Pw˜T−a4, (48)

where is defined as in (27). Now, the null point belongs to the intersection of two planes with one sphere. One of these planes is represented by , while the other is defined as follows:

 π2=z3+d(P0,P′w)e∞. (49)

Additionally, the inner representation of the sphere is defined as:

 s1=P′w−12(d23+d24)e∞, (50)

where denotes the length of the third link and , the distance between the origin of the third frame and measured in the direction of the axis. Since the plane represented by does not contain , we translate it in the direction:

 π′2=Td3π2˜Td3, (51)

where

 Td3=1−d3z3e∞2. (52)

The intersection of these geometric objects is graphically depicted in figure 5 and is computed as:

 B=π1∨π′2∨s1, (53)

where is a bivector. Again, this bivector represents a pair of points in the conformal geometric algebra so:

 B=Q1∧Q2, (54)

for some null points and . Clearly, if and belong to the workspace of the robot, then there are two possible null points , namely and . Therefore, we have two possible valid positions for the null point lying between the second and the third joint. As we will see, this means that, in this case, there are more than one set of solutions. Each one of these two null points defines a line whose inner representation, () if () is used, is computed as in (43). Similarly, the inner representation of another line is calculated as in (43). Now, two distinct null points can be obtained. Indeed, for , .

Finally, each pair of null points and allows us to compute the outer representation of an extra plane that is used to calculate the joint variable :

 Π31=P11∧P21∧P′w∧e∞,Π32=P12∧P22∧P′w∧e∞. (55)

Then, using the identities (23) and (26), the joint variables and can be derived easily. Clearly, we are going to have two different sets of joint variables and, therefore, two different solutions:

 d11=d(P0,P11),d21=d(P11,P21)%andθ31=∠(Π1,Π31),d12=d(P0,P12),d22=d(P11,P22) and θ32=∠(Π1,Π32). (56)

As stated in section 1, serial robots with 6 DoF and spherical wrist have up to eight distinct solutions for a given end-effector pose. Since the orientation problem always has two different solutions for each solution of the position problem, there is a maximum of four distinct solutions for the position problem. This maximum is reached only in two cases: (1) when the three joints that constitute the position part of the robot are revolute and (2) when the two of the three joints that constitute the position part of the robot are revolute and the other one is prismatic . Therefore, this case shows how the geometric strategy introduced in this paper gives all the solutions for the inverse kinematics and, thus, it can be considered a closed-form method. However, from now on, in order to simplify the notation for the remaining cases, we are going to consider just one of the two points that can be extracted from a given bivector and, hence, only one of the maximum of four different sets of solutions will be fully developed.

Offsets between consecutive joints are treated analogously as in the previous case. The main difference relies on the geometric object considered:

• If the offset is located between the first and the second joint, then can be derived as in the preceding section, while is computed as the intersection , where is defined as in (47).

• If the offset is located between the second and the third joint, then , where is a component of the offset aligned with the axis. Now, is extracted from:

 B=π1∨π′2∨s′1, (57)

where is the inner representation of the sphere represented by after compensating the offset and are defined as in (27). Since the remaining geometric reasoning does not change, is obtained as in the case without offsets. This situation highlights another advantage of conformal geometric algebra: rotors can be applied to any geometric object which simplifies the formulation and the solution of the problem.

Another relevant case is when the first joint is revolute, while the second and third ones are prismatic. This case is solved in a similar way, but it is interesting to point out some details. First, the null point is obtained as the translation of along an amount equal to the length of the first link, i.e., . Indeed:

 P1=Td1P0˜Td1 (58)

with defined as in (27). Since the second joint is prismatic, is one of the known D-H parameters and, hence, the joint axes and can be computed as in (38). Now, is derived as , where and are defined as in (39) and (43). The joint variables and are determined as in (45). Now, we define the following two planes such as their outer representations are:

 Π1=P0∧P1∧Pw∧e∞,Π′1=P0∧P1∧P′w∧e∞, (59)

where is the null vector representation of the three-dimensional point computed with the obtained values for the joint variables and and with . Clearly, the first joint variable is obtained as .

#### 5.1.3 Two revolute joints and one prismatic (R+R+P)

A scheme of the position part of a serial robot with two revolute joints and one prismatic joint is depicted in figure 1(c). As in the preceding case, there are different subcases that can be treated similarly. Because of that, only the most relevant cases are fully developed here.

First, let us consider the case where the first two joints are revolute and the third one, prismatic. In addition, for this first case, we suppose that there are no offsets between consecutive joints. The null point is computed as in (58). Now, the remaining part of the position part of the robot is restricted to the plane determined by the joint axes and . Furthermore, given the length of the second link, , and the angle between the joint axes and , , a triangle as the one depicted in figure 6 is defined. Using the law of cosines, can be easily obtained from the quadratic equation:

 d(P1,Pw)2=d22+d23−2d2d3cos(α3). (60)

Now, since , equation (60) has always two distinct real solutions. Therefore, we have three different cases: (1) there are two distinct positive solutions; (2) there are two distinct negative solutions and (3) there is one positive and one negative solutions. It is clear that, since the displacements measured by the D-H parameter are always positive, the case with two distinct negative solutions is undesirable. This case only holds when

 d2>d(P1,Pw) and d2cos(α3)<0. (61)

But, however, since , if , then and, thus, . Nevertheless, for those values of , by definition of the D-H parameters. This is clearly the opposite of the first inequality of (61), which means that only the cases (1) and (3) are possible. In addition, if there is a fixed offset aligned with the axis, then can be decomposed as , where, as usual, denotes the length of this offset. It is straightforward to see that, also in this case, the joint variable can be obtained from (60).

Finally, in order to obtain , we define two distinct spheres and one plane through their inner and outer representations:

 s1=P1−12d22e∞,s2=Pw−12d23e∞,Π1=P0∧P1∧Pw∧e∞. (62)

Then, the intersection of these geometric objects is computed (and shown graphically in figures 6(a) and 6(b)):

 B=s1∨s2∨π1, (63)

where two different null points can be extracted from . Since we have already computed , we use the null points and to derive the remaining joint variables, namely and . The following auxiliary geometric objects are defined for that purpose:

• If the revolute joints have parallel joint axes:

 L1=P1∧P2∧e∞ and L2=P2∧Pw∧e∞. (64)
• If the revolute joints have not parallel joint axes:

 Π2=P0∧P1∧P2∧e∞ and Π3=P1∧P2∧Pw∧e∞. (65)

Now, for the parallel case, the joint variable is computed as follows:

 θ2=∠(L1,L2). (66)

Since the joint variables and are already known, the position of the end-effector with can be computed. If we denoted such a three-dimensional point , we can define an extra plane whose outer representations is:

 Π′1=P0∧P1∧P′w∧e∞