i
i
i
i
i
i
i
i
11.3. Robotic Motion 267
problem: how does the rendering software animate the virtual
figure as it reaches out to grasp your hand and shake it?
Thesoftwarewillknowafewthingsaboutthetask. Thecharacterwill
be standing on the virtual floor, so the position of its feet will be well defined.
It also must grasp your hand at the point in virtual space where the motion
sensor thinks it is located. This leaves a lot of freedom for the software, but
there are other constraints which should be adhered to if realism is to be
maintained. For example, the virtual character’s arms cannot change length
or pass through the character’s body. The angle of the character’s joints, elbow
and shoulders must also conform to some limits; otherwise, it could look like
a very contorted handshake indeed! To overcome these difficulties, we will
need to do the same thing that computer animators do. We need to build a
skeleton into the virtual character and animate it using inverse kinematics.
A large number of animal species have their movements primarily con-
trolled by some form of skeleton that is in essence hierarchical. For example,
a finger is attached to a hand, which is connected to a lower arm, etc. The
skeleton imposes constraints on how an animal behaves (it cannot suddenly
double the length of its legs, for example). For animation purposes, the idea
of a skeleton is very useful. In traditional clay animation, a rigid wire skele-
ton is embedded in the clay, and this allows the animator to manipulate the
model in a realistic way. (The Oscar-winning Wallace and Gromit are excel-
lent examples of clay characters with a wireframe skeleton.)
In computer animation, the skeleton fulfills two important functions:
1. It provides a rigid framework which can be pivoted, twisted and ro-
tated. Vertices and polygons are assigned to follow a specific bone in
the skeleton, and thus the model will appear to take up various poses,
just as the clay model does.
2. The hierarchical nature of the skeleton allows for natural behavior. For
example, pivoting the upper arm about the shoulder in a model of a
human figure will cause the lower arm and hand to execute the same
pivot without the animator having to do it explicitly.
Consider the example shown in Figure 11.3, where the model is pictured
on the left, in the center its skeleton is shown as a thick black line and on the
right is a diagrammatic representation of the hierarchical links in the skeleton.
Using the skeleton, one has the option to pivot parts of the model about
the end points (nodes) of any of its bones. Taking the model in Figure 11.3 as
i
i
i
i
i
i
i
i
268 11. Navigation and Movement in VR
Figure 11.3. A model with its skeleton: In (a), the model is shown; (b) shows the
skeleton (the thick l ines). A pivot point is shown at the end of each bone.Thethin
lines represent boxes that contain all the parts of the model attached to each bone.
In (c), a hierarchical representation of all the bones and how they are connected is
illustrated.
Figure 11.4. Pivoting the leg of the model shown in Figure 11.3 into two poses.
an example, a rotation of the front right upper leg around the hip joint moves
the whole front right leg (see F igure 11.4(a)). If this is followed by rotations
of the lower leg and foot, the pose illustrated in Figure 11.4(b) results.
11.3.1 Specifying Robotic Positions
Any skeleton has what we can term a rest pose, which is simply the form
in which it was created, before any manipulation is applied. The skeleton
i
i
i
i
i
i
i
i
11.3. Robotic Motion 269
illustrated in Figure 11.3 is in a rest pose. With the knowledge of hierarchi-
cal connectivity in a skeleton, a position vector giving the location of the end
(the node or the joint) of each bone uniquely specifies the skeletons rest po-
sition. To be able to set the skeleton into any other pose, it must satisfy the
criteria:
1. Be obtained with a rotational transformation about an axis located at
one of the nodes of the skeleton.
2. Of a transformation is deemed to apply to a specific bone, say i,then
it must also be applied to the descendent (child) bones as well.
For example, consider the simple skeleton illustrated in Figure 11.5. It
shows four bones; bones 2 and 3 are children to bone 1, and bone 4 is a child
to bone 3. Each bone is given a coordinate frame of reference (e.g., (x
3
, y
3
, z
3
)
for bone 3). (For the purpose of this example, the skeleton will be assumed
to lie in the plane of the page.) P
0
is a node with no associated bone; it acts
as the base of the skeleton and is referred to as the root.
Suppose that we wish to move bone 3. The only option is to pivot it
around a direction vector passing through node 1 (to which bone 3 is at-
tached). A rotational transformation is defined as a 4 × 4 matrix, and we
can combine rotations around different axes to give a single matrix M that
encodes information for any sequence of rotations performed at a point. This
matrix takes the form shown in Equation (11.7), whilst the general theory
Figure 11.5. Specifying a rest pose of a skeleton with four bones 1 to 4. In addition
to the positions P
i
of the nodes at the end of the bone, a local frame of reference
(x
i
, y
i
, z
i
) is attached to each node. On the right, a hierarchical diagram of the skele-
ton is shown. P
0
is a root node which has no bone attached and acts a s the base of
the skeleton.
i
i
i
i
i
i
i
i
270 11. Navigation and Movement in VR
Figure 11.6. (a) Posing for the skeleton of Figure 11.5 by a rotation of bone 3 around
the node at the end of bone 1. (b) Co-positional nodes do not imply that two poses
are identical. The nodes here are at the same location as in (a), but the local frames
of reference do not take the same orientation.
of transformation matrices and homogeneous coordinates is given in Sec-
tion 6.6:
M =
a
00
a
01
a
02
0
a
10
a
11
a
12
0
a
20
a
21
a
22
0
0001
. (11.7)
Once M has been calculated, its application to P
3
and P
4
will move them
to appropriate locations for the new pose. The example pose in Figure 11.6(a)
was obtained by a rotation of
round axis y
2
.
There are a few important observations that emerge from this simple
example:
Node 4 is affected by the transformation because it is descended from
node 3.
Nodes 0, 1 and 2 are unaffected and remain at locations p
0
, p
1
and
p
2
. Importantly, the node about which the rotation is made is not
disturbed in any way.
The coordinate frames of reference attached to nodes 3 and 4 are also
transformed; they become (x
3
, y
3
, z
3
) and (x
4
, y
4
, z
4
).
Although node 4 (at p
4
) is moved, its position is unchanged in the local
frame of reference attached to node 3.
When M is applied to nodes 3 and 4, it is assumed that their coordi-
nates are expressed in a frame of reference with origin at P
1
.
i
i
i
i
i
i
i
i
11.4. Inverse Kinematics 271
It is possible to apply additional rotational transformations until any de-
sired pose is achieved. To attain the pose depicted in Figure 11.4(b), sev-
eral successive transformations from the rest position of Figure 11.3 were
necessary.
Note that even if the position of the nodes in two poses are identical,
it does not mean that the poses are identical. Look at Figure 11.6(b); this
shows four bones (four nodes) co-positional with the nodes in the pose of
Figure 11.6(a). Close inspection reveals that the local frames of reference for
the joint at P
4
are very different. Therefor e, the parts of the object attached
to P
4
will appear different. For example, if P
4
represents the joint angle at
the wrist of a virtual character then the character’s hand will have a different
orientation between Figure 11.6(a) and Figure 11.6(b).
As we have already mentioned, if it is necessary to interpolate between
robot poses then quaternions offer the best option. Full details are given
in [1]. This is especially true in animation, where knowledge of the starting
and final position is available. However, for real-time interactive movement,
it is more appropriate to use inverse kinematics. This is another specialized
branch of mathematics that deals specifically with determining the movement
of interconnected segments of a body or material such that the motion is
transmitted in a predictable way through the parts.
11.4 Inverse Kinematics
A lot of fundamental work on inverse kinematics (IK) has been developed as
a result of ongoing research in the area of robotics. In robotics, an important
task is to move the working part of the robot (or more technically, its effector)
into a position and orientation so as to be able to perform its task. As we have
seen previously in this chapter, the way robots move is not dissimilar to the
way animals move, and so the same IK can be applied to their movement.
IK is the ideal way to program the motion of the virtual components of our
handshake scenario.
A rigorous theory of IK calculations is not trivial. It involves solving non-
linear systems of equations in which there are always more unknowns than
equations. Thus, the system is either poorly constrained or not constrained
at all. As we look at IK, we will see how these problems are solved, and
we will finish off this section with a short and simple practical algorithm for
constrained IK motion in 3D.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.66.185