Professional Documents
Culture Documents
Clifford Algebras
c 2016 Springer International Publishing Advances in
DOI 10.1007/s00006-016-0705-7 Applied Clifford Algebras
Abstract. This paper describes a novel method for solving the inverse
kinematics of a humanoid robot leg anthropomorphically configured
with 6 degrees of freedom using conformal geometric algebra. We have
used different geometric entities such as lines, planes, and spheres in
order to achieve the desired position and orientation of the body and
the foot, individually reconfiguring the amount of rotation for each joint.
The proposed method can be used in a future work to design obstacle
avoidance and self collision algorithms. The effectiveness of the proposed
algorithm is proved via practical experiments. Results indicate that the
proposed algorithm achieves the expected behavior.
Keywords. Inverse kinematics, Robotics, Bipedal walking, Conformal
geometric algebra, Clifford algebra.
1. Introduction
Humanoid robotics has been one of the most researched fields in the past
twenty years. This is because they are intended to be used in human societies
and are therefore required to have high mobility and dexterity in non con-
trolled environments. The applications of humanoid robots in our daily lives,
requires the adaptability of the bipedal platform to human environments, so
many efforts focus on the development of algorithms and control strategies
to imitate the dexterity, efficiency, stability, effectiveness, and flexibility of
human walking. There are different areas of research working with humanoid
robots; this paper presents a new method for obtaining the inverse kinematics
of a humanoid robot leg with six degrees of freedom (DoF). The reference to
obtain the inverse kinematics is a desired stance of the hip and foot. Using
this reference and all the benefits that the geometric algebra can provide, as
the manipulation of points, spheres, lines, and planes, which can be trans-
formed via rotors, translators, and motors defined in this algebra. Since the
∗ Corresponding author.
L. Campos et al. Adv. Appl. Clifford Algebras
2. Geometric Algebra
One of the main characteristics of the Clifford algebra (Geometric Algebra), is
that it allows representing entities of higher order with a compact symbology
with lineal operations. The lines, planes, or spheres are examples of entities of
higher order and are represented as unique elements of the Clifford Algebra.
In this section, the most basic concepts of Geometric Algebra are summarized.
In this paper, we will specify the geometric algebra Gn by Gp,q,r , where
p, q, and r represent the number of basis vectors which square to 1, −1 and
0, respectively, and fulfill n = p + q + r. The entire basis of Gn is defined as
the ordered set
{1}, {ei }, {ei ∧ ej }, {ei ∧ ej ∧ ek }, . . . , {e1 ∧ e2 ∧ . . . ∧ en }, (2.1)
where ei denotes the basis vector i, and has the following properties:
⎧
⎪
⎪ 1 f or i = j ∈ 1, . . . , p
⎨
−1 f or i = j ∈ p + 1, . . . , p + q
ei ej =
⎪
⎪ 0 f or i = j ∈ p + q + 1, . . . , p + q + r.
⎩
ei ∧ ej f or i = j
The geometric algebra of a Euclidean 3D space G3 has a base in points:
ergo, it works with a vector which represents points in the space, while the
+
motor algebra G3,0,1 works with a base of lines. Using the Minkoswski plane
Inverse Kinematics
3. Inverse Kinematics
The kinematic configuration of the lower limbs is one of the main factors for
imitating human movements. The humanoid leg is composed of two princi-
pal links. The dimensions of these two links determine the performance of
the bipedal walk, such as the length of a step and the unreachable poses
of the robot. The articulation of the human hip is a perfect ball-and-socket
joint, and is reproduced in this bipedal humanoid robot with three concurrent
revolute joints, which are successively orthogonal. The human knee can be
modeled with a single revolute joint; thus, only one motor is placed in that
joint. Finally, the rotations in a human ankle and foot are complex, but note
that two rotational axes are functionally required in the ankle, so a universal
joint is used. This configuration is basic for emulating human movements [3]
and is what is used in this paper.
A 6 DoF robotic leg (Fig. 1) is used in this work, and all joints are
actuated. The motor actuator of each joint has an embedded controller, which
is used to move each link. This actuator has an internal closed loop, with a
PID controller. This paper is focused on the calculation of the references of
each joint and not on the control of each motor to reach the desired reference.
The tuning of the internal PID is given by the motor manufacturer.
L. Campos et al. Adv. Appl. Clifford Algebras
The inverse kinematics of both legs are obtained with the same algo-
rithm and the proper references. For that reason, the formulation of only one
leg is presented. Usually, the bipedal walking algorithm of a humanoid robot
works with a desired trajectory of the body and the feet; this trajectory
is obtained considering the center of mass stability of the robot. Different
methods are used to design these trajectories. In this work, we used a ZPM
algorithm [4] to generate the proper trajectories for bipedal walking. Using
these preestablished trajectories and the proposed algorithm, the joint val-
ues of the 3 DoF hip, the 1 DoF knee, and the 2 DoF ankle are calculated.
There are different methods for solving the inverse kinematics problem, for
example, analytical and numerical methods [6], but these algorithms may
have singularities, also, different frame coordinate systems are needed. Tak-
ing these problems into account, we propose a new method using conformal
geometric algebra.
The desired position and attitude of the body are given as follows:
T
Bodyposition = [xb , yb , zb ] ,
T
Bodyorientation = [αb , βb , γb ] ,
for the x, y, and z position, and the pitch, yaw, and roll with respect to the
world coordinate system. Likewise, the pose of the leg end effector (foot) is
given by
T
Legposition = [xL , yL , zL ]
T
Legorientation = [αL , βL , γL ] .
It is supposed that the position and orientation of the leg are given in
terms of a fixed coordinate system in the body, and for this work we suppose
that this coordinate system is also the world coordinate system. Thus, in
order to simplify the equations, D is defined as the distance between the
Inverse Kinematics
body and the hip joint, and A and B are defined as the upper and lower leg
length, as shown in Fig. 1 [6].
We use three rotors to define the orientation of the leg, given the desired
values for pitch, yaw, and roll, respectively. These motors are defined as
1
RxL = e− 2 αL e23 (3.1)
− 12 βL e31
R yL = e
1
RzL = e− 2 γL e12
and a general rotor describing the entire desired attitude of the leg is given
as
RL = RxL RyL RzL . (3.2)
Then, with the desired Euclidean coordinates, a translator is defined as:
1
TL = e− 2 (xL e1 +yL e2 +zL e3 )e∞ . (3.3)
Using Eqs. (3.2) and (3.3), a motor describing the desired pose of the
leg, in terms of the body frame, is given by
ML = T L R L . (3.4)
A conformal point that describes the fixed frame in the center of the
body, another which describes the initial position of the hip joint using the
known length D, and one last that shows the initial position of the ankle
joint using these A and B constant, are defined as follows:
1
xw = 0e1 + 0e2 + 0e3 + (0e1 + 0e2 + 0e3 )2 e∞ + e0
2
1
xh = −De1 + 0e2 + 0e3 + (−De1 + 0e2 + 0e3 )2 e∞ + e0 (3.5)
2
1
xfw = −De1 − (A + B)e2 + 0e3 + (−De1 − (A + B)e2 + 0e3 )2 e∞ + e0 .
2
In order to find the pose of the ankle joint, the motor of the leg is applied
to Eq. (3.5) as follows:
xf = ML (xfw )M̃L . (3.6)
Two spheres are defined with a center at the points of Eqs (3.5) and
(3.6), and a radius equal to A and B, respectively, as
1
s1 = xh − A2 e∞ (3.7)
2
1
s2 = xf − B 2 e∞
2
and then the wedge product is applied between the two spheres of Eq. (3.7).
The result of the wedge product is a circle, as shown in Fig. 2, and is given
by
Z = s1 ∧ s2 . (3.8)
All possible solutions for the position of the knee of the robot lie in this circle.
In a future work, this result will be able to define a rotor that can be used
to calculate another solution for the inverse kinematics, for example, in the
L. Campos et al. Adv. Appl. Clifford Algebras
case of self collision; and an example of the use of this circle for reconfiguring
a robotic arm is explained in [2].
A line is defined in the e3 coordinate and transformed with the motor
of the leg, in order to find the desired ankle joint, as follows:
L3 = ML (e0 ∧ e3 ∧ e∞ )M̃L . (3.9)
Then, a plane which intersects the circle of Eq. (3.8) in the largest
distance from the center to the edge is formed using Eqs. (3.9) and (3.10)
P = (Lc (e0 ∧ e∞ )) ∧ L3 . (3.11)
This defines two intersection points that represent the intersection of the two
geometric entities of Eqs. (3.8) and (3.11), which are given mathematically
by
pp = Z ∧ (P − I). (3.12)
Equation (3.11) for a particular choice of parameters returns zero which
is helpful, as it denotes an infeasible configuration for the humanoid robot
leg. Moreover, this operation returns to zero when the line Lc of Eq. (3.10)
is parallel to line L3 of Eq. (3.9); this will happen when the reference of
the body must be at the same position in e2 axis as the foot, an obviously
infeasible solution. Figure 3 expresses this statement clearly.
Hence, two possible configurations for the knee joint pose are found, as
shown in Fig. 4. In order to achieve anthropomorphic design, the restriction
of taking the positive point is set. The point pair of the two possible positions
of the knee can be divided as
Inverse Kinematics
ppd = pp − I (3.13)
√
ppd + ppd · ppd
xk = .
ppd · e∞
Hitherto, the points xh , xk , and xf , for the desired pose of the body
and the foot have been found. With these three lines representing the links,
distance between each joint are defined using Eqs. (3.5) and (3.13), and are
given by
LinkD = e∞ ∧ xw ∧ xh (3.14)
LinkA = e∞ ∧ xh ∧ xk
LinkB = e∞ ∧ xk ∧ xf ,
as shown in Fig. 5.
Finally, the values of each joint can be calculated with the defined geo-
metric entities. The angle between lines LinkA and LinkB of Eq. (3.14) is
L. Campos et al. Adv. Appl. Clifford Algebras
To calculate the yaw of the spherical joint in the hip, the angle between
the links described by the lines LinkD and LinkA of Eq. (3.14) is calculated
by
√
π LinkD · LinkA
q2 = − arccos . (3.19)
2 |LinkD ||LinkA |
As regards the universal joint at the ankle, the angle of yaw rotation is
given by the angle between the lines of Eqs. (3.9) and (3.14).
√
π LinkB · L3
q5 = − arccos . (3.20)
2 |LinkB ||L3 |
This can be clearly appreciated in Fig. 6.
After that, the angle rotation of the roll of the ankle is calculated, defin-
ing a line parallel to the sagittal plane of the humanoid robot and transformed
by the motor defined in Eq. (3.4)
L31 = ML (e0 ∧ e1 ∧ e∞ )M̃L . (3.21)
Inverse Kinematics
q3
(LinkB ∧ xh ) · Pvf
q3 = arccos ; (3.29)
|(LinkB ∧ xh )||Pvf |
The planes and lines defined in the previous equations can be oriented
and translated depending on the needs of the humanoid robot. Defining them
with a different pose to achieve a different configuration helps to avoid obsta-
cles. In regard to preventing self collisions, the geometric restrictions imposed
in Eqs. (3.13) and (3.28) help to restrict the movement of the links. More-
over, the radius of spheres (3.7) facilitates obtaining configurations achievable
within the work space of the bipedal humanoid robot.
These equations can only be applied to a robot that has the same config-
uration as in Fig. 1, i.e., if the robot does not have three joint axes intersecting
at one point, a different algorithm will be required.
4. Applications
The verification of the proposed method to solve the inverse kinematics of a
bipedal robot was tested via simulations and in real time. This was applied
to the MexOne humanoid robot in the Automatic Control Laboratory at
The Center for Research and Advanced Studies of the National Polytechnic
Institute—Guadalajara Campus, shown in Fig. 10. The constants in meters
of the humanoid used to test the inverse kinematics algorithm is also shown.
L. Campos et al. Adv. Appl. Clifford Algebras
0.1
xb [m]
−0.1
0 1 2 3 4 5 6 7 8 9 10
Body Trajectory in e3
0.04
zb [m]
0.02
0
0 1 2 3 4 5 6 7 8 9 10
Foot Trajectory in e3
0.04
zf [m]
0.02
0
0 1 2 3 4 5 6 7 8 9 10
Foot Trajectory in e2
0.03
yf [m]
0.02
0.01
0
0 1 2 3 4 5 6 7 8 9 10
Time [sec]
q1 q2
−0.25 0.1
−0.3
rad
0
−0.35
−0.1
−0.4
0 2 4 6 8 10 0 2 4 6 8 10
q3 q4
0.01
0.005 0.9
rad
0 0.8
−0.005
0.7
−0.01
0 2 4 6 8 10 0 2 4 6 8 10
q5 q6
−0.4
0.1
−0.45
rad
0
−0.5
−0.1
−0.55
0 2 4 6 8 10 0 2 4 6 8 10
Time [sec] Time [sec]
The reference trajectories were calculated for execute two steps, with 5
centimeters length in e3 axis, and 2 centimeters of height in e2 axis. Fig. 11
shows xb , zb , zL , and yL . The reference yb , is considered to be zero, xL is
considered as the D constant, and αb , βb , γb , αL , βL , γL are fixed at zero for
the left leg. These trajectory references are obtained as [4].
In Fig. 12, the joint values of each joint can be observed, in order to
follow the body and leg trajectories obtained by the method described in this
work. Finally, a real time implementation of the experiment is shown in Fig.
13.
5. Conclusions
A novel algorithm for inverse kinematics using conformal geometric algebra
was proposed, proving the benefits of using geometric entities such as planes
and spheres in order to modify the amount of rotation of each joint separately
L. Campos et al. Adv. Appl. Clifford Algebras
References
[1] Bayro-Corrochano, E.: Geometric Computing: For Wavelet Transforms, Robot
Vision, Learning, Control and Action. Springer, New York (2010)
Inverse Kinematics
A. Loukianov
e-mail: louk@gdl.cinvestav.mx
E. Bayro-Corrochano
e-mail: edb@gdl.cinvestav.mx
O. Carbajal-Espinosa
Instituto Tecnológico y de Estudios Superiores de Monterrey
Av. General Ramón Corona 2514, Nuevo México
C.P. 45138 Zapopan
Jalisco
México
e-mail: oscar.carbajal@itesm.mx