Introduction to Robotics
Mechanics and Control
Third Edition
John J. Craig
PEARSON
Prentice
Hail
Pearson Education International
Vice President and Editorial Director, ECS: Marcia J. Horton
Associate Editor: Alice Dworkin
Editorial Assistant: Carole Snyder
Vice President and Director of Production and Manufacturing, ESM: David W. Riccardi
Executive Managing Editor: Vince O'Brien
Managing Editor: David A. George
Production Editor: James Buckley
Director of Creative Services: Paul Belfanti
Art Director: Jayne Conte
Cover Designer: Bruce Kenselaar
Art Editor: Greg Dulles
Manufacturing Manager: Trudy Pisciotti
Manufacturing Buyer: Lisa McDowell
Senior Marketing Manager: Holly Stark
PEARSON
Prentice
Hall
© 2005 Pearson Education, Inc.
Pearson Prentice Hall
Pearson Education, Inc.
Upper Saddle River, NJ 07458
All rights reserved. No part of this book may be reproduced, in any form or by any means, without
permission in writing from the publisher.
If you purchased this book within the United States or Canada you should be aware that it has been
wrongfully imported without the approval of the Publisher or the Author.
Pearson Prentice Hall® is a trademark of Pearson Education, Inc.
Robotics Toolbox for MATLAB (Release7) courtesy of Peter Corke.
The author and publisher of this book have used their best efforts in preparing this book. These efforts
include the development, research, and testing of the theories and programs to determine their effective-
ness. The author and publisher make no warranty of any kind, expressed or implied, with regard to these
programs or the documentation contained in this book. The author and publisher shall not be liable in
any event for incidental or consequential damages in connection with, or arising out of, the furnishing,
performance, or use of these programs.
Printed in the United States of America
10 9 8 7 6 5 4 3
ISBN
Pearson Education Ltd., London
Pearson Education Australia Pty. Ltd., Sydney
Pearson Education Singapore, Pte. Ltd.
Pearson Education North Asia Ltd., Hong Kong
Pearson Education Canada, Ltd., Toronto
Pearson Educación de Mexico, S.A. de C.V.
Pearson Education—Japan, Tokyo
Pearson Education Malaysia, Pte. Ltd.
Pearson Education, Inc., Upper Saddle River, New Jersey
Contents
Preface
1
Introduction
2 Spatial descriptions and transformations
3 Manipulator kinematics
4
5
Inverse manipulator kinematics
Jacobians: velocities and static forces
6 Manipulator dynamics
7 Trajectory generation
8 Manipulator-mechanism design
9 Linear control of manipulators
10 Nonlinear control of manipulators
11 Force control of manipulators
12 Robot programming languages and systems
13 Off-line programming systems
A Trigonometric identities
B The 24 angle-set conventions
C Some inverse-kinematic formulas
Solutions to selected exercises
Index
v
1
19
62
101
135
165
201
230
262
290
317
339
353
372
374
377
379
387
III
Preface
Scientists often have the feeling that, through their work, they are learning about
some aspect of themselves. Physicists see this connection in their work; so do,
for example, psychologists and chemists. In the study of robotics, the connection
between the field of study and ourselves is unusually obvious. And, unlike a science
that seeks only to analyze, robotics as currently pursued takes the engineering bent
toward synthesis. Perhaps it is for these reasons that the field fascinates so many
of us.
The study of robotics concerns itself with the desire to synthesize some aspects
of human function by the use of mechanisms, sensors, actuators, and computers.
Obviously, this is a huge undertaking, which seems certain to require a multitude of
ideas from various "classical" fields.
Currently, different aspects of robotics research are carried out by experts in
various fields. It is usually not the case that any single individual has the entire area
of robotics in his or her grasp. A partitioning of the field is natural to expect. At
a relatively high level of abstraction, splitting robotics into four major areas seems
reasonable: mechanical manipulation, locomotion, computer vision, and artificial
intelligence.
This book introduces the science and engineering of mechanical manipulation.
This subdiscipline of robotics has its foundations in several classical fields. The major
relevant fields are mechanics, control theory, and computer science. In this book,
Chapters 1 through 8 cover topics from mechanical engineering and mathematics,
Chapters 9 through 11 cover control-theoretical material, and Chapters 12 and 13
might be classed as computer-science material. Additionally, the book emphasizes
computational aspects of the problems throughout; for example, each chapter
that is concerned predominantly with mechanics has a brief section devoted to
computational considerations.
This book evolved from class notes used to teach "Introduction to Robotics" at
Stanford University during the autunms of 1983 through 1985. The first and second
editions have been used at many institutions from 1986 through 2002. The third
edition has benefited from this use and incorporates corrections and improvements
due to feedback from many sources. Thanks to all those who sent corrections to the
author.
This book is appropriate for a senior undergraduate- or first-year graduate-
level course. It is helpful if the student has had one basic course in statics and
dynamics and a course in linear algebra and can program in a high-level language.
Additionally, it is helpful, though not absolutely necessary, that the student have
completed an introductory course in control theory. One aim of the book is to
present material in a simple, intuitive way. Specifically, the audience need not be
strictly mechanical engineers, though much of the material is taken from that field.
At Stanford, many electrical engineers, computer scientists, and mathematicians
found the book quite readable.
V
vi
Preface
Directly, this book is of use to those engineers developing robotic systems,
but the material should be viewed as important background material for anyone
who will be involved with robotics. In much the same way that software developers
have usually studied at least some hardware, people not directly involved with the
mechanics and control of robots should have some such background as that offered
by this text.
Like the second edition, the third edition is organized into 13 chapters. The
material wifi fit comfortably into an academic semester; teaching the material within
an academic quarter will probably require the instructor to choose a couple of
chapters to omit. Even at that pace, all of the topics cannot be covered in great
depth. In some ways, the book is organized with this in mind; for example, most
chapters present only one approach to solving the problem at hand. One of the
challenges of writing this book has been in trying to do justice to the topics covered
within the time constraints of usual teaching situations. One method employed to
this end was to consider only material that directly affects the study of mechanical
manipulation.
At the end of each chapter is a set of exercises. Each exercise has been
assigned a difficulty factor, indicated in square brackets following the exercise's
number. Difficulties vary between [00] and [50], where [00] is trivial and [50] is
an unsolved research problem.' Of course, what one person finds difficult, another
might find easy, so some readers will find the factors misleading in some cases.
Nevertheless, an effort has been made to appraise the difficulty of the exercises.
At the end of each chapter there is a programming assignment in which
the student applies the subject matter of the corresponding chapter to a simple
three-jointed planar manipulator. This simple manipulator is complex enough to
demonstrate nearly all the principles of general manipulators without bogging the
student down in too much complexity. Each programming assignment builds upon
the previous ones, until, at the end of the course, the student has an entire library of
manipulator software.
Additionally, with the third edition we have added MATLAB exercises to
the book. There are a total of 12 MATLAB exercises associated with Chapters
1 through 9. These exercises were developed by Prof. Robert L. Williams II of
Ohio University, and we are greatly indebted to him for this contribution. These
exercises can be used with the MATLAB Robotics Toolbox2 created by Peter
Corke, Principal Research Scientist with CSIRO in Australia.
Chapter 1 is an introduction to the field of robotics. It introduces some
background material, a few fundamental ideas, and the adopted notation of the
book, and it previews the material in the later chapters.
Chapter 2 covers the mathematics used to describe positions and orientations
in 3-space. This is extremely important material: By definition, mechanical manip-
ulation concerns itself with moving objects (parts, tools, the robot itself) around in
space. We need ways to describe these actions in a way that is easily understood and
is as intuitive as possible.
have adopted the same scale as in The Art of Computer Pro gramming by D. Knuth (Addison-
Wesley).
2For the MATLAB Robotics Toolbox, go to http:/www.ict.csiro.au/robotics/ToolBOX7.htm.
vii
Chapters 3 and 4 deal with the geometry of mechanical manipulators. They
introduce the branch of mechanical engineering known as kinematics, the study of
motion without regard to the forces that cause it. In these chapters, we deal with the
kinematics of manipulators, but restrict ourselves to static positioning problems.
Preface
Chapter 5 expands our investigation of kinematics to velocities and static
forces.
In Chapter 6, we deal for the first time with the forces and moments required
to cause motion of a manipulator. This is the problem of manipulator dynamics.
Chapter 7 is concerned with describing motions of the manipulator in terms of
trajectories through space.
Chapter 8 many topics related to the mechanical design of a manipulator. For
example, how many joints are appropriate, of what type should they be, and how
should they be arranged?
In Chapters 9 and 10, we study methods of controffing a manipulator (usually
with a digital computer) so that it wifi faithfully track a desired position trajectory
through space. Chapter 9 restricts attention to linear control methods; Chapter 10
extends these considerations to the nonlinear realm.
Chapter 11 covers the field of active force control with a manipulator. That is,
we discuss how to control the application of forces by the manipulator. This mode of
control is important when the manipulator comes into contact with the environment
around it, such as during the washing of a window with a sponge.
Chapter 12 overviews methods of programming robots, specifically the ele-
ments needed in a robot programming system, and the particular problems associated
with programming industrial robots.
Chapter 13 introduces off-line simulation and programming systems, which
represent the latest extension to the man—robot interface.
I would like to thank the many people who have contributed their time to
helping me with this book. First, my thanks to the students of Stanford's ME219 in
the autunm of 1983 through 1985, who suffered through the first drafts, found many
errors, and provided many suggestions. Professor Bernard Roth has contributed in
many ways, both through constructive criticism of the manuscript and by providing
me with an environment in which to complete the first edition. At SILMA Inc.,
I enjoyed a stimulating environment, plus resources that aided in completing the
second edition. Dr. Jeff Kerr wrote the first draft of Chapter 8. Prof. Robert L.
Williams II contributed the MATLAB exercises found at the end of each chapter,
and Peter Corke expanded his Robotics Toolbox to support this book's style of the
Denavit—Hartenberg notation. I owe a debt to my previous mentors in robotics:
Marc Raibert, Carl Ruoff, Tom Binford, and Bernard Roth.
Many others around Stanford, SILMA, Adept, and elsewhere have helped in
various ways—my thanks to John Mark Agosta, Mike All, Lynn Balling, Al Barr,
Stephen Boyd, Chuck Buckley, Joel Burdick, Jim Callan, Brian Carlisle, Monique
Craig, Subas Desa, Tn Dai Do, Karl Garcia, Ashitava Ghosal, Chris Goad, Ron
Goldman, Bill Hamilton, Steve Holland, Peter Jackson, Eric Jacobs, Johann Jager,
Paul James, Jeff Kerr, Oussama Khatib, Jim Kramer, Dave Lowe, Jim Maples, Dave
Marimont, Dave Meer, Kent Ohlund, Madhusudan Raghavan, Richard Roy, Ken
Salisbury, Bruce Shimano, Donalda Speight, Bob Tiove, Sandy Wells, and Dave
Williams.
viii
Preface
The students of Prof. Roth's Robotics Class of 2002 at Stanford used the
second edition and forwarded many reminders of the mistakes that needed to get
fixed for the third edition.
Finally I wish to thank Tom Robbins at Prentice Hall for his guidance with the
first edition and now again with the present edition.
J.J.C.