Introduction to Robotics Analysis, Systems, Applications Saeed B. Niku Mechanical Engineering Department California Polytechnic State University San Luis Obispo Prentice Hall Prentice Hall Upper Saddle River, NJ 07458 Contents 1 Fundamentals 1 1.1. Introduction 1 1.2. What is a Robot? 2 1.3. Classification of Robots 2 1.4. What is Robotics? 4 1.5. History of Robotics 4 1.6. Advantages and Disadvantages of Robots 5 1.7. Robot Components 6 1.8. Robot Degrees of Freedom 8 1.9. Robot Joints 11 1.10. Robot Coordinates 11 1.11. Robot Reference Frames 12 1.12. Programming Modes 13 1.13. Robot Characteristics 15 1.14. Robot Workspace 16 1.15. Robot Languages 16 1.16. Robot Applications 20 1.17. Other Robots and Applications 24 vii viii Contents 1.18. Social Issues 25 1.19. Summary 25 References 26 Problems 27 2 Robot Kinematics: Position Analysis 2'. 2.1. Introduction 29 2.2. Robots as Mechanisms 29 2.3. Matrix Representation 31 2.3.1. Representation of a point in space 31 2.3.2. Representation of a vector in space 32 2.3.3. Representation of a frame at the origin of a reference frame 33 2.3.4. Representation of a frame in a reference frame 34 2.3.5. Representation of a Rigid Body 35 2.4. Homogeneous Transformation Matrices 2.5. Representation of Transformations 38 2.5.1. Representation of a pure translation 39 2.5.2. Representation of a pure rotation about an axis 40 2.5.3. Representation of combined transformations 43 2.5.4. Transformations relative to the rotating 46 2.6. Inverse of Transformation Matrices 2.7. 38 48 Forward and Inverse Kinematics of Robots 53 2.7.7. Forward and Inverse Kinematic Equations for Position 54 2.7.2. Forward and Inverse Kinematic Equations for Orientation 59 2.7.3. Forward and Inverse Kinematic Equations for Position and Orientation 67 2.8. Denavit-Hartenberg Representation of Forward Kinematic Equations of Robots 67 2.9. The Inverse Kinematic Solution of Robots 76 2.10. Inverse Kinematic Programming of Robots 80 2.11. Degeneracy and Dexterity 82 2.12. The Fundamental Problem with the Denavit-Hartenberg Representation 83 2.13. Design Project 1: A three-degree-of-freedom Robot 85 2.14. Summary 86 References 87 Problems 88 Contents 3 Differential Motions and Velocities ix 95 3.1. Introduction 95 3.2. Differential Relationships 95 3.3. Jacobian 97 3.4. Differential Motions of a Frame 99 3.4.1. Differential Translations 100 3.4.2. Differential Rotations 100 3.4.3. Differential Rotation about a general axis k 101 3.4.4. Differential Transformations of a Frame 102 3.5. Interpretation of the Differential Change 104 3.6. Differential Changes Between Frames 104 3.7. Differential Motions of a Robot and Its Hand Frame 106 3.8. Calculation of the Jacobian 107 3.9. How to Relate the Jacobian and the Differential Operator 110 3.10. Inverse Jacobian 111 3.11. Design Project 115 3.12. Summary 116 References 116 Problems 117 4 Dynamic Analysis and Forces 4.1. Introduction 119 4.2. Lagrangian Mechanics: A Short Overview 120 4.3. Effective Moments of Inertia 127 4.4. Dynamic Equations for Multiple-Degree-of-Freedom Robots 128 4.4.1. 4.4.2. 4.4.3. 4.4.4. Kinetic Energy 128 Potential Energy 132 The Lagrangian 133 Robot's Equations of Motion 133 4.5. Static Force Analysis of Robots 139 4.6. Transformation of Forces and Moments Between Coordinate Frames 141 4.7. Design Project 143 4.8. Summary 143 119 Contents References 144 Problems 144 5 Trajectory Planning 14. 5.1. Introduction 147 5.2. Path vs. Trajectory 147 5.3. Joint-Space vs. Cartesian-Space Descriptions 148 5.4. Basics of Trajectory Planning 150 5.5. Joint-Space Trajectory Planning 153 5.5.1. Third-Order Polynomial Trajectory Planning 154 5.5.2. Fifth-Order Polynomial Trajectory Planning 157 5.5.3. Linear Segments with Parabolic Blends 157 5.5.4. Linear Segments with Parabolic Blends and Via Points 160 5.5.5. Higher Order Trajectories 161 5.5.6. Other Trajectories 165 5.6. Cartesian-Space Trajectories 165 5.7. Continuous Trajectory Recording 170 5.8. Design Project 170 5.9. Summary 171 References 171 Problems 172 6 Actuators 6.1. Introduction 173 6.2. Characteristics of Actuating Systems 174 6.2.1. Weight, Power-to-Weight Ratio, Operating Pressure 174 6.2.2. Stiffness vs. Compliance 174 6.2.3. Use of Reduction Gears 175 6.3. Comparison of Actuating Systems 178 6.4. Hydraulic Devices 178 6.5. Pneumatic Devices 184 6.6. Electric Motors 186 6.6.1. DC Motors 188 6.6.2. AC Motors 189 6.6.3. Brushless DC motors 189 6.6.4. Direct Drive Electric Motors 189 7i Contents xi 6.6.5. Servomotors 190 6.6.6. Stepper Motors 191 6.7. Microprocessor Control of Electric Motors 6.7.1. Pulse Width Modulation. 209 207 6.7.2. Direction Control of DC Motors with an H-Bridge 210 6.8. Magnetostrictive Actuators 6.9. Shape-Memory Type Metals 6.10: Speed Reduction 212 6.11. Design Project 1 215 6.12. Design Project 2 215 6.13. Summary 7 211 216 References Problems 210 217 218 Sensors 219 7.1. Introduction 219 7.2. Sensor Characteristics 7.3. Position Sensors 222 7.3.1. Potentiometers 222 7.3.2. Encoders 223 7.3.3. Linear Variable Differential Transformers (LVDT) 226 7.3.4. Resolvers 228 7.3.5. Time-of-Travel Displacement Sensor 229 1.4. Velocity Sensors 229 7.4.1. Encoders 230 7.4.2. Tachometers 230 7.4.3. Differentiation of position signal 230 7.5. Acceleration Sensors 7.6. Force and Pressure Sensors 231 7.6.1. Piezoelectric 231 7.6.2. Force Sensing resistor 231 7.6.3. Strain gauges 231 219 230 1.1. Torque Sensors 233 7.8. Microswitches 233 7.9. Light and Infrared Sensors 233 7.10. Touch and Tactile Sensors 234 xii Contents 7.11. Proximity Sensors 236 7.11.1. Magnetic Proximity Sensors 236 7.11.2. Optical Proximity Sensors 236 7.11.3. Ultrasonic Proximity Sensors 237 7.11.4. Inductive Proximity Sensors 237 7.11.5. Capacitive Proximity Sensors 237 7.11.6. Eddy Current Proximity Sensors 238 7.12. Range-finders 238 7.12.1. Ultrasonic Range Finders 239 7.12.2. Light Based Range Finders 240 7.13. Sniff Sensors 241 7.14. Vision Systems 241 7.15. Voice Recognition Devices 241 7.16. Voice Synthesizers 242 7.17. Remote Center Compliance (RCC) Device 242 7.18. Design Project 245 7.19. Summary 246 References 246 8 Image Processing and Analysis with Vision Systems 8.1. Introduction 248 8.2. Image Processing versus Image Analysis 248 8.3. Two- and Three-Dimensional Image Types 249 8.4. What is an Image 249 8.5. Acquisition of Images 250 8.5.1. Vidicon Camera 250 8.5.2. Digital Camera 252 8.6. Digital Images 254 8.7. Frequency Domain vs. Spatial Domain 254 8.8. Fourier Transform of a Signal and its Frequency Content 255 8.9. Frequency Content of an Image; Noise, Edges 257 8.10. Spatial Domain Operations: Convolution Mask 259 8.11. Sampling and Quantization 262 8.12. Sampling Theorem 263 8.13. Image-Processing Techniques 267 Contents 8.14. Histogram of Images 267 8.15. Thresholding 268 8.16. Connectivity 269 8.17. Noise Reduction 271 8.17.1 Convolution Masks 272 8.17.2. Image Averaging 273 8.17.3. Frequency Domain 274 8.17.4. Median Filters 274 8.18. Edge Detection 275 8.19. Hough Transform 8.20. Segmentation 279 282 8.21. Segmentation by Region Growing and Region Splitting 282 8.22. Binary Morphology Operations 8.22.1. Thickening Operation 284 8.22.2. Dilation 285 8.22.3. Erosion 285 8.22.4. Skeletonization 286 8.22.5. Open Operation 287 8.22.6. Close Operation 287 8.22.7. Fill Operation 287 284 8.23. Gray Morphology Operations 288 8.23.1. Erosion 288 8.23.2. Dilation 288 8.24. Image Analysis 288 8.25. Object Recognition by Features 288 8.25.1. Basic Features Used for Object Identification 289 8.25.2. Moments 290 8.25.3. Template Matching 297 8.25.4. Discrete Fourier Descriptors 297 8.25.5. Computed Tomography 297 8.26. Depth Measurement with Vision Systems 298 8.26.1. Scene Analysis vs. Mapping 298 8.26.2. Range Detection and Depth Analysis 299 8.26.3. Stereo Imaging 299 8.26.4. Scene Analysis with Shading and Sizes 300 8.27. Specialized Lighting 301 8.28. Image Data Compression 302 8.28.1. Intraframe Spatial Domain Techniques 302 8.28.2. Interframe Coding 303 8.29. Real-Time Image Processing 304 xiii xiv Contents 8.30. Heuristics 304 8.31. Applications of Vision Systems 305 8.32. Design project 306 8.33. Summary 306 References 307 Problems 308 9 Fuzzy Logic Control 31' 9.1. Introduction 311 9.2. Fuzzy Control: What is needed 313 9.3. Crisp Values vs. Fuzzy Values 314 9.4. Fuzzy Sets: Degrees of Membership and Truth 314 9.5. Fuzzification 315 9.6. Fuzzy Inference Rule Base 316 9.7. Denazification 318 9.7.1. Center-of-Gravity Method 318 9.7.2. Mamdani's Inference Method 318 9.8. Simulation of Fuzzy Logic Controller 322 9.9. Applications of Fuzzy Logic in Robotics 323 9.10. Design Project 327 9.11. Summary 328 References 328 Problems 328 APPENDIX A 3. A.I. Matrix Algebra and Notation: A Review 331 A.2. Calculation of an Angle From its Sine, Cosine, or Tangent 336 Problems 338 INDEX 3