• Aucun résultat trouvé

Robotics and Animation

Dans le document Computer Graphics and Geometric Modeling (Page 157-162)

This section is mainly intended as an example of frames and transformations and how the former can greatly facilitate the study of the latter, but it also enables us to give a brief introduction to the subject of the kinematics of robot arms. Even though we can only cover some very simple aspects of robotics here, we cover enough so that the reader will learn something about what is involved in animating figures.

n=(m11m21m31m41m12m22m32m42m13m23m33m43).

Mechanical manipulators are the most important examples of industrial robots and much work has been done to understand the mechanics and control of such manipulators. We begin with some terminology (see [Crai89]).

Kinematics: The science of motion where motion is studied without worrying about what caused it.

Manipulator: This is assumed to be an object that consists of nearly rigid links con-nected by jointsthat allow neighboring links to move. One end is usually fixed to some nonmoving part and the other end is free. See Figure 4.23. The joints may be either revolute joints, which allow rotational motion measured by joint angles, orprismatic joints, which allow sliding motion that is measured by joint offsets.

Degrees of freedomof a manipulator: This is the number of variables that it takes to completely describe the state or position of the manipulator. Typically this is the number of joints since joints can usually be described by one variable.

End-effector: This is the tool at the free end of the manipulator such as a gripper.

Tool frame: The frame associated to the end-effector.

Base frame: The frame associated to the fixed end of the manipulator.

Forward kinematics: This is the problem where one wants to compute the tool frame (intuitively, the position and orientation of the tool) relative to the base frame given the set of joint angles.

Inverse kinematics: This is the problem where one wants to compute all possible sets of joint angles that can give rise to given tool and base frames. This problem is usually more difficult than the forward kinematics problem. There may not even be a solution to a particular problem or there may be more than one solution.

Workspace for a given manipulator: The possible tool frames (position and orienta-tion of the tool) that are achievable by the manipulator.

Trajectory generation: The determination of the trajectories of each joint of a manip-ulator that lead from some initial configuration to a final configuration. Since manipulators are usually moved by actuators that apply a force or torque to each joint, these forces and torques would also have to be computed in order for a solu-tion to be effective.

Figure 4.23. Robot arm terminology.

and qi. Our discussion above basically showed how the latter are derived from the former. One can also show that the link parameters completely define the frames. In practice it is easier for a user to manipulate the link parameters and so the usual problem is to find the frames given their values. As another example, consider a two-dimensional robot with three links and revolute joints. We can think of this as a special case of the general one where all the z-axes of the frames point in the same direction and all the ai and di are zero. Figure 4.25(a) shows the link parameters and Figure 4.25(b), the associated frames.

As one can see, frames play a role in defining the state of a robot, but how are they used to solve problems? Well, the forward kinematic problem is to find the tool frame (“where the tool is”) given the link parameters. This problem will be solved if we can determine the transformation Tn, which, given the coordinates of a point pin Fncoordinates, finds the coordinates of pwith respect to F0. Let dTi, 0 <i£n, denote the transformation that maps coordinates relative to Fi to coordinates relative to Fi-1. It follows that

(4.21) The dTiare relatively easy to compute from the link parameters because they are the composition of four simple maps.

The Computation of dTi and Its Homogeneous Matrix dMi. Let Ti(zi, di) denote the translation with translation vector dizi. Its homogeneous matrix is

1 0 0 0 0 1 0 0 0 0 1 0 0 0 di 1 Ê

Ë Á Á ÁÁ

ˆ

¯

˜

˜

˜˜ Tn =dT dT1o 2o LodTn.

Figure 4.25. Two-dimensional robot arm geometry.

Let Ri(zi,qi) denote the rotation about the ziaxis of the frame Fi through an angle qi. Its homogeneous matrix is

Let Ti-1(xi-1,ai-1) denote the translation with translation vector ai-1xi-1. Its homoge-neous matrix is

Finally, let Ri-1(xi-1,ai-1) denote the rotation about the xi-1 axis of the frame Fi-1

through an angle ai-1. Its homogeneous matrix is

Then

(4.22) and multiplying the matrices for the corresponding maps together (but in reverse order since matrices act on the right of a point), we get that the matrix dMi associ-ated to the transformation dTiis defined by

(4.23)

Equations (4.21–4.23) provide the solution to the forward kinematic problem. In the two-dimensional robot case where aiand diare zero, the matrices dMi specialize to matrices dNi, where

This concludes what we have to say about robotics. For a more in-depth study of the subject see [Crai89], [Feat87], or [Paul82]. The description of mechanical manip-ulators in terms of the four link parameters described in this section is usually called theDenavit-Hartenberg notation(see [DenH55]).

As is often the case when one is learning something new, a real understanding of the issues does not come until one has worked out some concrete examples. The ani-mation programming projects 4.13.1 and 4.13.2 should help in that regard. Here are a few comments about how one animates objects. Recall the discussion in Section 2.11 for the 2d case. To show motion one again discretizes time and shows a sequence of still pictures of the world as it would look at increasing times t1, t2, . . . , tn. One changes the apparent speed of the motion by changing the size of the time intervals between ti and ti+1, the larger the intervals, the larger the apparent speed. Therefore, to move an object X, one begins by showing the world with the object at its initial position and then loops through reshowing the world, each time placing the object in its next position.

Dans le document Computer Graphics and Geometric Modeling (Page 157-162)