1. Introduction
The robotic arm is the most-used robot configuration to approach the human arm’s performance. This kind of robotic arm is a multi-articulated rigid limb with many degrees of freedom (DoF) that provide flexibility and agility, allowing a single task to be executed using various postures and different trajectories. For this, the solution of the inverse kinematics (IK) has become one of the techniques for this task, which is the problem of determining an appropriate joint configuration so that the end-effector moves to a desired target position.
A human arm’s basic configuration is described as 3-DoF at the shoulder, 1-DoF at the elbow, and 3-DoF at the wrist. Thus, a 7-DoF robotic arm can interact naturally in a designed human environment. One advantage of this configuration is that the elbow creates a self-motion manifold on a circular path, avoiding joint limitations and singularities. For these reasons, it is desired to have the same design in a humanoid robot.
One of the main difficulties when working with this kind of configuration is that there may be many or infinite appropriate joint configurations (which is the common case), a unique solution, or no solution for the same task, i.e., a set of solutions may exist to carry the hand (end-effector) from an initial pose to a final one. This problem is known as redundancy and makes the inverse kinematics more complex than solving it for kinematics chains with lower DoFs for which redundancy is not present.
Many approaches tackle the redundancy problem, and in general, analytical and numerical methods are the most-used. Other techniques use geometric and trigonometric solutions to take advantage of the strong geometric structure representation of a rigid robot arm and combine the classical representation of direct kinematics to solve the problem. For instance, the main issue of the analytical method is that the computations of the joints become difficult to find when the kinematic chain becomes larger due to the complex system of equations that results in an unfeasible algorithm for real-time implementation. Regarding numerical solutions, they are based on iterative methods for which a cost function has to be minimized.
The algorithm proposed here is based on the logic that a geometric method facilitates the intuition to pose a solution to the problem but is formulated on the conformal geometric algebra (CGA) mathematical framework. This algebra allows working with geometric primitives such as circles, lines, planes, and spheres naturally. These geometric entities can be represented in this algebra as linear combinations of its base, where parts of its base are the canonical base of the Euclidean vector space , and also, it includes rigid transformations defined in terms of geometric entities called rotors, translators, and motors. Using the algebra characteristics, as the rigid transformation of geometric entities, it is possible to define an algorithm that solves the inverse kinematics problem without using matrices or numerical methods. The resultant algorithm allows us to impose geometric constraints based on the physical possibilities of the arm.
Although our previous work [
1] involves the inverse kinematics for a leg with 6-DoF using the same mathematical framework, the extension to 7-DoF through the use of CGA is not trivial given the redundancy caused by one extra degree of freedom, for which we had to define more geometric entities to find one extra appropriate joint angle.
Furthermore, extensive research can be found related to the problem of solving the inverse kinematics of redundant robotic arms [
2,
3,
4,
5]. For example, in the works [
6,
7], the solution of analytical inverse kinematics for a 7-DoF robotic arm are given in such form that some restrictions to avoid joint limits are included, and many complex operations must be solved along with a stage of forward kinematics, increasing the computational burden of the algorithm. In [
8], many matrix multiplications are needed to find a solution for the problem. However, as in the previous two related papers, the authors define a geometric restriction using a rotating plane. Still, given that matrix algebra is not suited to work efficiently with this kind of entity, it is natural to find a mathematical framework to solve this problem. Other approaches to the solution of inverse kinematics in redundant robotic arms are given in the works [
9,
10], wherein the solution is given using the Jacobian matrix. Its inverse is obtained using numerical methods to optimize the solution of the inverse kinematics. Also, extended approaches can be found, such as [
11]. However, this method also poses a pseudo-inverse-like problem; this is in contrast with the purpose of our method, wherein analytical constraints are exploited to produce solutions in a geometrical manner and, as the comparisons demonstrate, with less computational time.
Unlike previous works, our method has the advantage that the use of analytical or numerical solutions is not needed to find appropriate joint angles given a desired pose of the end-effector. This work is an extension of our previous work [
12], which solves the inverse kinematics for a 5-DoF manipulator and which was then extended to a 6-DoF leg [
1] of a humanoid robot. These results were used as inspiration for this algorithm for a 7-DoF arm, but many improvements are included. In summary, our contributions concerning the state-of-the-art are:
We propose an algorithm for the inverse kinematics for a 7-DoF robotic arm on a 5D conformal geometric algebra CGA instead of working only on the 3D vector space . The intuitive representation of geometric entities in CGA and the operations that we can make of them allow us to find the joint positions (in Cartesian space) and joint angles of the robot arm by taking into account the outer and inner product that CGA possesses, which avoids analytical or numerical methods. The geometry entities available in the arm structure are used to define CGA entities, e.g., circles are determined to find elbow position. Thus, all the possible configurations for the arm are in those circles, which takes advantage of the dexterity.
We provide a comparison with state-of-the-art algorithms to demonstrate the superior performance of our proposal.
The rest of the paper is structured as follows:
Section 2 provides a brief introduction to CGA.
Section 3 presents the proposed method to solve the inverse kinematics, including images that clarify the steps of the algorithm. The comparison with the state-of-the-art algorithms is shown in
Section 4. Finally, some discussions are presented in
Section 6.
The principal aim of this research work is to develop an inverse kinematics algorithm using conformal geometric algebra that allows us to extend the previous work we have been doing to redundant robotic arms with seven degrees of freedom. With our proposal, the calculation time is reduced by exploiting the properties of the mathematical framework with which we are working. By using this algorithm, we hope to improve the performance of this type of manipulator arm in real time.
Comparisons with other algorithms show that conformal geometric algebra has advantages over other mathematical systems; we take advantage of these differences in our proposal. Unlike other approaches, for which it is necessary to use direct kinematics to find a possible solution to the configuration of the robotic arm, our algorithm uses geometric constraints to resolve the inverse kinematics. Furthermore, the geometric entities defined in the inverse kinematics solution can be used to find other configurations that allow us to take advantage of the redundancy of the robotic arm.
2. Mathematical Background
2.1. Geometric Algebra
Geometric algebra (GA), also known as Clifford algebra, was introduced by William K. Clifford (1845–1879) and recently has been increasingly applied in physics and engineering. GA is a mathematical framework that allows for treating of the geometry of objects as algebraic entities.
Let
be a vector space over the field
. We can generate a geometric algebra
from
, where
p,
q, and
r stand for the number of basis vectors that square to 1, −1, and 0, respectively: that is, there are
with
such that
The geometric algebra
has a base given by these elements:
where
is called as the pseudoescalar.
So
(called a multivector) is expressed in terms of its base elements: namely,
where each
is the
j-vector part.
For instance, the Euclidean geometric algebra
has a base
where
, and any multivector
M can be written in the form
.
The main product of is called the geometric product; it is associative and distributive over addition but not necessarily commutative.
The geometric product of two multivectors
can be written as the sum of its anticommutaror and commutator parts:
Moreover, if
for some
, then it is called a
k-versor. A
k-blade is a
k-versor of orthogonal vectors, and the linear combination of
k-blades give rise to a
k-vector.
In particular, the geometric product of two vectors
is given by the sum of a symmetric and antisymmetric part:
where
and
are the inner product and wedge product, respectively. The inner product of two 1-vectors is the standard cross product in the Euclidean vector space.
The inner product operator is used for the computations of the angles between lines, planes, etc.; the wedge product is mainly used for the construction and intersection of geometric entities, while the geometric product is used for the description of transformations.
2.2. Conformal Geometric Algebra
It is well known that objects, such as points, lines, circles, spheres, etc., can be described in
. However, in this vector space, we cannot make an operation on these objects. Then, it is natural to think of how to make this possible. Then, we should use a 5D geometric algebra: for this, take an orthonormal base for
, say
, and join it with this orthonormal base
, which is the base of a Minkowski plane such that
In this case, we have
as in (
1); then, we have
, which gives
. This GA is called
conformal geometric algebra (CGA), by which geometric entities such as points, lines, and spheres can be represented as vectors that have two algebraic representations: the inner product null space (IPNS) and the outer product null space (OPNS).
Also, CGA has the sphere as its unity of calculus; this means that the representation of the other geometric primitives such as lines, points, planes, circles, and point pairs can be obtained from the representation of the sphere, as we will see in the next subsection.
From the Minkowski plane base,
gives rise to another base that has these elements:
where
and
are the point at infinity and the origin point, respectively.
These new vector bases satisfy
that is,
and
are null vectors, and also, their inner product satisfies
Often the null vectors are used to represent the geometric entities instead of and .
In the base of
given in (
5), we have the pseudo-scalar
this can be multiplied with the bivector
leading to the pseudo-scalar
in
, which is used for computing the dual of the multivectors in CGA.
For instance, the dual of a multivector
is given by
from now on, we will use the symbol
to identify the dual of a multivector in this algebra.
Now, the principal geometric primitives used in this work are defined, and rigid transformations are introduced to give the background of the proposed algorithm of inverse kinematics.
2.3. Used Geometric Primitives
A
point is represented in the 5D conformal space by taking the linear combinations of some elements of its base:
that is,
where
Note that can be seen to be embedded in CGA.
We know that the equation of a
sphere with its center at
and radius
is given by
The sphere can be mapped to
as
where
is the center of the sphere; (
21) corresponds to the so-called inner product null space (IPNS) representation.
Note that when
, we again obtain this point: that is,
. Taking into account the pseudo-scalar
I, we can obtain the dual of the sphere
, which is represented as a 4-vector. This means that a sphere can be described by making the wedge product of four points that lie on it: namely,
If we make
, then we obtain a
plane:
A plane is a sphere with an infinite radius.
The plane
is also represented in IPNS form as follows:
where
n and
d are the normal vector and Hesse distance, respectively.
In
, we can also find a line that is normal to a plane
as
where
E is the Minkowski plane and
I is the pseudo-scalar in CGA that we defined at the end of the above subsection.
Let
be two spheres. We can obtain a
circle z as the intersection of
and
: that is,
which is given in IPNS, and its dual form can be expressed by three points lying on the circle (similarly to the dual of a sphere) as
Given the circle
z as in (
26) and from (
27), it follows that the plane
in which the circle lies is given by
Now, we can have a line that passes through the center of the circle that is normal to the plane
as
These properties of the primitives will be used as a part of the proposed algorithm of inverse kinematics.
Similar to the case of planes,
lines can be defined by changing
in (
27), which gives
A line can also be expressed as
in the standard IPNS form, where
and
are the line orientation and moment, respectively.
Finally, the
point pair is used as two possible solutions of a joint that is given by
by using the wedge product of the two points
and
. Alternatively, we can also get the point pair as the intersection of a line and a sphere, a line and a circle, or a circle and a sphere.
Given
, we can compute
as
2.4. Translation, Rotation, and Motor
Rigid transformations can be expressed in CGA by composing plane reflections. For any geometric entity, say
Q, the reflection with respect to a plane
is given by
The translation can be seen as the reflection with respect to the planes
. It follows that the translation is given by
where
,
, and
is called the reversion.
Similarly, the rotation can be described as the composition of two reflections with respect to
, which is
where
, and
is double the angle between
and
.
A rigid-body motion that includes translation and rotation is described by a motor (also called a displacement versor)
. Thus, the rigid body motion of
Q is described by
3. Inverse Kinematics Methodology
The human upper limb is described as a system of three segments: the upper arm, the forearm, and the hand; it includes seven degrees of freedom. This configuration is basic to emulate human movements and is used in this paper. We present a summary of the algorithm proposed in Algorithm 1. To explain the IK of a humanoid robot arm, an anthropomorphic 7-DoF arm is used; the configuration of the real robot to implement the IK is represented in
Figure 1.
Usually, the desired trajectory of the hand of a humanoid robot is given to satisfy complex tasks, i.e., around an object, to achieve the desired position, etc. Then, the amount of joint rotation of the wrist, elbow, and shoulder must be found with this information.
The desired position and attitude of the gripper at the hand are given in the form:
for the
,
, and
axes, and the pitch, yaw, and roll are
with respect to the frame coordinates fixed to the center of the torso. We define
as the distance between the shoulder and the elbow joint,
as the distance between the elbow and the wrist, and finally,
as the distance from the wrist to the gripper, as shown in
Figure 1, where
and
are the distances between the shoulder frame with respect to the fixed torso frame in the
and
directions, respectively.
Algorithm 1: Inverse Kinematics for 7-DoF Manipulator. |
Input:
Output:
Links: Joints:
|
Development of the algorithm is separated into the following two sections: In the first section, we define the geometric entities that will be used in the algorithm: in particular, those used to compute the joint positions in CGA. In the second section, we use the definition of the inner product to find the angles of each joint. The proposed method is based on our previous works [
1,
12] given that the first four joint angles are calculated in the same way for a 5-DoF robot arm or 6-DoF leg.
3.1. Defining the Geometric Entity References
First, we define the Euclidean positions representing the initial joint positions that are shown in
Table 1.
Since
and
are fixed with respect to the world coordinate system, their conformal representations are given by
and similarly for
Three rotors describing the desired pitch, yaw, and roll of the gripper are created in the form:
where
,
and
are bivectors.
Thus, the general rotor describing the entire desired attitude is given in the form:
Then, with the desired Euclidean coordinates, a translator is formed:
where
.
Using the rotor (
45) and translator (
46), a motor describing the desired pose of the gripper in terms of the fixed torso frame is given in the form:
It follows that the pose of the gripper is given by
where
w is a conformal point of (
42) representing the origin of the world coordinate system.
Now, it remains to calculate the joint positions and ; to this end, several geometric entities are defined.
First, a sphere and a line are created about the zero conformal point
using the distance
between the wrist and the gripper as follows:
Then, the sphere and the line given in (
49) are translated and rotated by the motor
to the desired pose of the end-effector:
such that the center of this translated sphere
is the gripper position of
, and the line
meets this point.
The sphere and the line defined in (
50) are intersected to obtain a point pair that represents the two possible solutions for the conformal positions of the wrist and are given by
The point pair can be separated using the equation
which gives the wrist a conformal joint position.
An illustration of how to get
when implemented is given in
Figure 2.
Now, two spheres have been defined: one with its origin at the point
after mapping
(
Table 1) in CGA and the second one with its center at the point
obtained from (
52); the radii of the spheres are the distances
and
, respectively, as shown in
Figure 1, and are defined as
The intersection of the two spheres from (
53) gives a circle that contains all the possible positions of the elbow and is given by
this circle will be intersected with a plane to find the elbow position. This circle contains an infinite number of points to place the robot’s elbow; when intersecting it with the plane, we find a pair of points, and it is necessary to select one of them to define the configuration of the arm, If we want to find another configuration, it is possible to take the initial point and rotate this point with respect to the center of the circle and find a new one. With this procedure, it is possible to take advantage of the redundancy of the seven degrees of freedom of the arm: for example, in obstacle avoidance tasks. The development of these operations can be found in our previous work [
12].
The plane is constructed as follows:
As shown in
Figure 3, a line normal to the circle of (
54) is calculated in the form
this line can be used to find a plane in which the arm lies and, as future work, could help to design systems for obstacle and self-collision avoidance.
Next, a reference line parallel to the
axis is translated to the point
; this is given using a translator defined as follows:
and the reference line is given by
where
and
.
Now, using the lines
and
, the plane is defined as
Then, a point pair representing the two possible positions of the elbow can be found: to do this, the circle in (
54) is intersected with the plane of (
58) using the equation
As before, the point pair is separated, and the elbow point is given by
Finally, using the previously found points, four lines representing the links of the arm are calculated; these lines are shown in
Figure 5 and are given by
These lines will be used in the next subsection to find some of the joint angles by taking into account their inner product.
3.2. Computing the Joint Values of the Arm
With the points and geometric entities defined, the angles of each joint are calculated: the first four are calculated as in [
1,
12].
First, to find the rotation of
, a plane parallel to the axes
and
is defined; then, using a translator, this plane is translated to the point
as follows:
The amount of rotation is given by the angle between the planes of (
58) and (
62) and is calculated by
The joint value
is defined as the angle between the lines
and
of (
61) and is obtained as
In order to find
, two planes are defined as
and
is defined as the angle between the planes defined in (
65) and is calculated as
The angle
is defined as the angle between the lines
and
defined in (
61); this angle is obtained as
In the same way, the joint value
is the angle between the lines
and
in (
61) and is given by
The angles
and
are difficult to compute because of the redundancy of the 7-DoF robotic arm; for that reason, in conventional approaches such as matrix representation, direct kinematics are used to know where the arm is based on previously computed angles, and this leads to many computations, which costs time to compute the inverse kinematics in real-time. To avoid the need to use direct kinematics in this approach, four planes are defined as geometric restrictions to compute the two angles: these planes are shown in
Figure 6 and
Figure 7.
First, using the plane
defined in (
65), a line normal to this plane is calculated; then, this line is translated to the calculated point
as follows:
where
is given similar to (
56).
Using the computed point
and the goal position
, two planes are defined as follows:
After that, a plane is defined using the calculated points and the goal position as
The angle
is defined as the angle between the planes
and
as
Finally, to compute the joint angle
, the next steps are followed. First, we obtain the normal line to the plane
, and as in (
69), this line is translated to the goal position
as follows:
where
is the translator given in (
46).
Now, using this line
and the point
, a plane is defined as
The joint value
is defined as the angle between the planes
and
and is given by
Therefore, we have solved the inverse kinematics problem, where given a desired pose
we find the appropriate joint angles in order for the end-effector of the 7-DoF robotic arm to move to that desired pose.
5. Real-Time Results
Several experiments were performed to demonstrate the effectiveness of the proposed method. As explained before, a simulation was done using the time-dependent reference given by (
77). Note that all the position dimensions are in meters, and the orientation goals are in radians.
Using the pose reference, a simulation was done using Clucalc [
13,
14]; the joint values obtained from the simulation are shown in the
Figure 8.
Finally, online implementation was done in a full-sized humanoid platform. Seven DoFs configure the humanoid arm, each with a Dynamixel series servomotor. Three printed fingers conform to the gripper, each wired to one DC motor. Composite images of the experiment are shown in the
Figure 9. The complete video of an example of the experiments can be found in the
Supplementary Materials. With this real-time experiment, we demonstrate that our algorithm can be implemented in robot platforms. First, we designed a desired trajectory for the end effector, a circle inside the plane formed by
and
, with different radius and a distance in
direction such that it lies in the workspace of the robot arm. The home position of our arm is the same as presented in
Figure 1, meaning the arm is fully stretched. Thus, we described the circle trajectory by restricting the orientation of the robot hand and moving the
and
coordinates according to the circle equation discretized up to a delta time of 0.1s. The inverse kinematics is computed at each time step, and the joint angles calculated are commanded to the Dynamixcel motors.
6. Conclusions
In this paper, a novel method to solve the inverse kinematics for seven degrees of freedom for a redundant robotic arm using the conformal geometric algebra framework is proposed. Taking advantage of geometric entities defined in this algebra, it was possible to find a solution to the problem without using forward kinematics, numerical solutions, or many matrix multiplications.
This property allowed us to decrease the amount of calculations needed to reach the desired goal. A comparison with the state-of-the-art algorithms was presented and demonstrated the superior performance of the algorithm discussed here.
As future work, the addition of geometric restrictions to avoid joint limits will be considered: including algorithms to avoid self-collision and for obstacle avoidance.
Moreover, an online implementation in a real robot and a complexity analysis of the proposed algorithm must be done.