131
1 1989, 1999, 2005 Gyoung H. Kim, Ph.D. [email protected] Programming and Controlling PUMA Robot Arms

Programming and-controlling-puma-arms

Embed Size (px)

DESCRIPTION

Case study of industrial robot systems. For more information, please visit www.open-robotics.com

Citation preview

Page 1: Programming and-controlling-puma-arms

1

1989, 1999, 2005

Gyoung H. Kim, Ph.D. [email protected]

Programming and Controlling PUMA Robot Arms

Page 2: Programming and-controlling-puma-arms

2

I. Controlling PUMA Robot Arms with VAL, RCCL, Kali, or ALVIN, 1989. II. RCCL Variants and RCCL Porting Guide, 1999.

III. Porting and Running the RCCL on a Real-time Linux/PC, 2005.

Contents

Page 3: Programming and-controlling-puma-arms

3

1989

Gyoung H. Kim, Ph.D

Controlling PUMA Robot Arms With VAL, RCCL, Kali, or ALVIN

Page 4: Programming and-controlling-puma-arms

4

• PUMA

- MK I controller - MK II controller - MK III controller - UNIVAL controller

• RCCL

• Level II

• Kali

• ALVIN

Contents

Page 5: Programming and-controlling-puma-arms

5

PUMA

Page 6: Programming and-controlling-puma-arms

6

• Vendor: Unimation,Inc.

• Arm Types: 260 Series, 550 Series, 560 Series, 552 Series, 562 Series 760 Series • Controller Types: Mark I, Mark II, Mark III, UNIVAL • Robot Programming Language: VAL, VAL II

PUMA (Programmable, Universal Machines for Assembly)

Page 7: Programming and-controlling-puma-arms

7

Page 8: Programming and-controlling-puma-arms

8

Page 9: Programming and-controlling-puma-arms

9

Page 10: Programming and-controlling-puma-arms

10

Page 11: Programming and-controlling-puma-arms

11

Page 12: Programming and-controlling-puma-arms

12

Page 13: Programming and-controlling-puma-arms

13

Page 14: Programming and-controlling-puma-arms

14

Page 15: Programming and-controlling-puma-arms

15

Page 16: Programming and-controlling-puma-arms

16

Page 17: Programming and-controlling-puma-arms

17

Page 18: Programming and-controlling-puma-arms

18

Page 19: Programming and-controlling-puma-arms

19

Page 20: Programming and-controlling-puma-arms

20

Page 21: Programming and-controlling-puma-arms

21

Page 22: Programming and-controlling-puma-arms

22

Page 23: Programming and-controlling-puma-arms

23

Page 24: Programming and-controlling-puma-arms

24

Page 25: Programming and-controlling-puma-arms

25

Page 26: Programming and-controlling-puma-arms

26

1. control card set [1] LSI-11/73 CPU board [2] 64 KW RAM board [3] quad serial board [4] parallel I/O board [5] A interface card [6] B interface card [7] digital servo boards [8] arm signal interface board

PUMA MK III Controller Configuration

Page 27: Programming and-controlling-puma-arms

27

2. power card set [1] C interface board [2] high power function board [3] power amplifier boards - PWM type

Page 28: Programming and-controlling-puma-arms

28

Main

Initialization

Wait for interrupt

Timer Interrupt

Disable Host Interrupt

Read Encoder Counter

Enable Host Interrupt

Position/current control

Deferred Command Execution

Return

Host Interrupt

Save command in buffer

YES Execute

immediate command

NO

Return

Deferred Command ?

Servo Code Block Diagram

Page 29: Programming and-controlling-puma-arms

29

Page 30: Programming and-controlling-puma-arms

30

Page 31: Programming and-controlling-puma-arms

31

Page 32: Programming and-controlling-puma-arms

32

UNIVAL

Page 33: Programming and-controlling-puma-arms

33

CX Module

Torque Processor

Board Servo

Control Module

Expansion Memory

(Optional)

Arm Interface Board Distribution

Board

Major Power Amplifier

Minor Power Amplifier

Signal Connection Board

Robot Arm

Unival Controller

VDT Disk Drive Aux. Port Smart I/O

Teach Pendant

UNIVAL Block Diagram

Page 34: Programming and-controlling-puma-arms

34

Torque Loop / Amplifier

DAC M

E N AXES Digital Servo

and Robot

Controller

N Axes

Typical Controller with Analog Torque Loop

Page 35: Programming and-controlling-puma-arms

35

Torque Command +

+ +

+ +

- K p Linearlizer PWM

Chip

Current Offset

A / D

Motor

Power Amp

Hardware Software

K i 1 - Z - 1

UNIVAL Torque Processor Loop

Page 36: Programming and-controlling-puma-arms

36

Arm Cable

Position and

velocity Servos

VAL

AMPS TPB

SCM AIB

PWM ROBOT

Encoders

Potentio- meters

Position Feedback upon Startup

Feedback from Robot

Current Feedback

Command from VAL

UNIVAL Signal Loops

Page 37: Programming and-controlling-puma-arms

37

Torque Processor

Module

A / D

MUX

Servo and

Robot Control Module

3 Axes PWM Chip

3 Axes PWM Chip

3 Axes Power AMP

M E

3 Axes Power AMP

Arm Interface Module

Encoder Feedback

Current Feedback

UNIVAL Servo System Block Diagram

Page 38: Programming and-controlling-puma-arms

38

1. The hardware does not provide sufficient processing power --- it is too slow for real-time control.

2. The system is not designed to communicate with external computer in a flexible way. The I/O module is only able to provide control signals and process elementary information received from sensors.

3. Memory resources may not be sufficient for large programs. 4. Communication with other computers is limited to interactions

with VAL. 5. Inverse kinematics software is not available, hence, trajectories

cannot be defined off-line. 6. Control of the arm is performed at the joint level, providing only

joint position regulation.

PUMA Control with VAL

Page 39: Programming and-controlling-puma-arms

39

Advantages : 1. The ability to implement closed-loop control of the manipulator

in both task and joint configuration spaces.

2. The ability to use the more powerful processor for inverse kinematics, for trajectory planning, and for control in real-time

3. The ability to test advanced mathematical models for dynamics

and real-time control 4. The ability to connect sensory devices through serial, parallel or

bus interface 5. The ability to create a new control language which includes

commands not available in VAL. 6. The ability to access to a database.

PUMA Control without VAL

Page 40: Programming and-controlling-puma-arms

40

1. The PUMA's Arm Interface Board is disconnected from the DRV-

11 card and connected to the parallel interface card in the external machine(only for MK I controllers).

2. Both computers are connected through a standard DEC parallel interface, which offers higher data rates than those of a serial interface.

3. A custom-built interface for bus-to-bus connection can be used. This interface contains a FIFO (First In First Out) hardware buffer.

4. Serial interface through the DLV-11J serial card in the PUMA controller is used.

Alternative Hardware Configurations

Page 41: Programming and-controlling-puma-arms

41

RCCL

Page 42: Programming and-controlling-puma-arms

42

RCCL, Purdue (1983)

RCCL, McGill (1986)

RCCL, McGill (1985)

RCCL, McGill (1988)

Level II, Cybotech (1987)

Kali, McGill (1988)

RCCL, JPL (1986)

Multi-RCCL, JPL (1990)

Timix, U. of Pennsylvania

(1988)

ALVIN, Purdue

RWRCCL, RWU (2001)

RCCL ( Robot Control "C" Library)

Page 43: Programming and-controlling-puma-arms

43

VAX Computer

RCCL PROGRAM RCCL PROGRAM

VAX COMPUTER

COMMUNICATION I/O CONTROLLER

LSI 11 CPU

A/D CONVERTER

TEACH PENDANT

6503 JOINT CONTROLLERS

TO ROBOT

HIGH SPEED PARALLEL LINK

SERIAL LINE FOR LOADING I/O

CONTROL PROGRAM

UNIMATION CONTROLLER

Physical Implementation of RCCL

Page 44: Programming and-controlling-puma-arms

44

CPU LSI-11 RAM ROM DLV-11J

DRV-11

Qbus

CRT Floppy Teach pend. Aux

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

Arm Cable current

encoder pulses

PUMA 560 ARM

Unimation Controller

FIFO

FIFO

UNIBUS VAX 780

Serial

RCCL Block Diagram (Purdue)

Page 45: Programming and-controlling-puma-arms

45

Page 46: Programming and-controlling-puma-arms

46

Robot Arm

Servomotor Control

Arm Interface Torque-current mapping

Angles-encoders mapping

Safety limits Arm-dependent data

World Model

Transformations Equations

Trajectory Generation

Cartesian

Joint Interpolation Compliance

Arm Kinematics

Cartesian-joint Jacobian

Arm configuration

Queue

User’s Process

Arm state Set points

Current command Motor state

Motion requests

Positions

Updates

TG state Synchronization

Robot Controller

RCCL Block Diagram

Page 47: Programming and-controlling-puma-arms

47

NORMAL TASK AND PROCESS

EXECUTION

SWITCH TO CONTROL PROGRAM MEMORY

CONTEXT

RESTORE MEMORY CONTEXT

NORMAL TASK AND PROCESS

EXECUTION

EXECUTE CONTROL: CYCLE read data from LSI 11 call RCI check routine write commands to LSI 11 call control function

DRIVER INTERRUPT HANDLER

TAKES CONTROL

INTERRUPT HANDLER RETURNS

Internal Control-level Execution Sequence

Page 48: Programming and-controlling-puma-arms

48

WAIT FOR NEXT

CYCLE

IDLE CONTROL FUNCTION

INTERNAL CHECKING

COMMAND CHECKING

CONTROL LEVEL TASK

CONTROL DIRECTIVE

NORMAL EXECUTION

RELEASE DIRECTIVE

OR ERROR CONDITION

OPEN DIRECTIVE

CLOSE DIRECTIVE

DATA FROM

LSI 11

COMMANDS TO

LSI 11

Execution Cycle at the Control Level

Page 49: Programming and-controlling-puma-arms

49

Page 50: Programming and-controlling-puma-arms

50

At point p1, p1 = Z T61 E1 T61 = Z-1 p1 E1

-1

= R1 p1 T1 At point p2, p1 = Z T62 E2 T61 = Z-1 p2 E2

-1

= R2 p2 T2 Let 2p1 = R2

-1 R1 p1 E1 E2-1

From point p1 to point p2, T6 = R2 2p1 Drive(s) T2 where Drive(0) = Identity Drive(1) = 2p1

-1 p2 Generally, T6 = R P Drive Comply T

Position Equations

Page 51: Programming and-controlling-puma-arms

51

LEVEL II

Page 52: Programming and-controlling-puma-arms

52

Device Driver

Level II Library

Application Program

Menu Interface

The Four Levels of the Robot Programming Environment

Page 53: Programming and-controlling-puma-arms

53

Mother Board

Axis Board 1 Axis Board 2

Supervisor Board

Geometric Operator

Board Environment

Board

Tape Drive

Programming Console

Axis Board 3

TTY Sensor

Interface

System Securities

Hand Control

I/O

RC-X Control Boards

Page 54: Programming and-controlling-puma-arms

54

Page 55: Programming and-controlling-puma-arms

55

Kali

Page 56: Programming and-controlling-puma-arms

56

Characteristics: 1. Programming and control of multiple manipulators

operating in close cooperation.

2. Hybrid force/velocity task space with dynamic compensation.

3. Selection of the largest amount of off-the-shelf computing technology.

4. Open architecture design.

Kali (A creature with many arms

in Hind mythology)

Page 57: Programming and-controlling-puma-arms

57

Current trends: 1. Super or mini-super computers. 2. Workstations with special very high performance floating

point accelerations. 3. Special purpose chips such as DSPs (AT&T, TI., etc). 4. Many single board computers operating in parallel.

High Performance Computing System

Page 58: Programming and-controlling-puma-arms

58

Kali Software Directory

Page 59: Programming and-controlling-puma-arms

59

Kali src Directory

Page 60: Programming and-controlling-puma-arms

60

CPU 1 68020

CPU 2 68020 CPU 3

68020 CPU 4 68020

CPU 5 68020

memory board

DAC board

power amplifier

robot I/O board

parallel I/O board

force/torque sensor

VME BUS

PUMA 560 ROBOT ARM

encoder pulses brake

release

power on/off

VSB

ethernet board

SUN 3 workstation

ethernet link

Kali Block Diagram

Page 61: Programming and-controlling-puma-arms

61

1. Synchronous processes i. Trajectory generator ii. Servo control iii. I/O process 2. Asynchronous process i. User process ii.Dynamic computations

Processor Communication 1. Message passing 2. Shared memory

Run-Time Structure

Page 62: Programming and-controlling-puma-arms

62

1. Software support Host: Unix-based workstation Target: real-time operating system (VxWorks) Target-host communication - ethernet 2. Hardware support Servo CPUs: 1 ms servo rate PID control algorithm One CPU for three joints (CPU3 and CPU4) Computational CPUs: I. User program, trajectory generator, kinematics (CPU1) ii. Dynamic computation (CPU2) iii. Supervisor - all I/O information handling(CPU0)

Real-time Computing

Page 63: Programming and-controlling-puma-arms

63

Page 64: Programming and-controlling-puma-arms

64

Kali Graphic Simulator

Page 65: Programming and-controlling-puma-arms

65

Kali Graphic Simulator

Page 66: Programming and-controlling-puma-arms

66

Kali Graphic Simulator

Page 67: Programming and-controlling-puma-arms

67

B M T A D C = Identity

where B : the Manipulator base transform M : the manipulator transform T : the tool transform A : the accommodation transform D : the drive transform C : the goal position of the control frame

Spatial Relationships (Ring Structures)

Page 68: Programming and-controlling-puma-arms

68

Page 69: Programming and-controlling-puma-arms

69

Page 70: Programming and-controlling-puma-arms

70

ALVIN

Page 71: Programming and-controlling-puma-arms

71

- Purdue's new robot system - Named by Prof. C S G Lee - Advanced system in hardware and software

ALVIN (ALmost Very Intelligent, but Not)

Page 72: Programming and-controlling-puma-arms

72 72

Page 73: Programming and-controlling-puma-arms

73 73

Page 74: Programming and-controlling-puma-arms

74

CPU 1 68030

CPU 2 68030

memory board

VMEbus

PUMA 560 ROBOT ARM

VSB

ethernet board

SUN 3 workstation

ethernet link

VMEbus adaptor

Qbus adaptor

Unimation MK I PUMA controller

ALVIN Block Diagram(Stage I)

Page 75: Programming and-controlling-puma-arms

75

DRV-11

Qbus

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK Arm Cable

PUMA 560 ARM

Unimation MK I Controller

VMEbus

Bus Adaptor

Bus Adaptor

CPU 0 68030

CPU 1 68030

Shared- Memory Ethernet

Controller

VSB

Engineering Computer Network

VMEbus System

ALVIN Block Diagram (Stage I)

Page 76: Programming and-controlling-puma-arms

76

SUN workstation

CRT Ethernet Card CPU 0 (68040) CPU 1 (68040)

CPU 2 (68040) CPU 3 (68030) CPU 4 (68030)

Shared Memory VMEbus Adaptor VMEbus Adaptor

CRT

VMEbus System

Engineering Computer Network

Unimation MK III

Controller

PUMA 562 Robot Arm

Digital Servo Paddle

Arm Cable

B-interface

ADC A-interface

Qbus Adaptor ADC

DRV-11

Arm Interface Digital Servo Clock / term. Analog Servo

Paddle Arm Cable

Unimation MK I

Controller

PUMA 560 Robot Arm

Qbus Adaptor

ALVIN Block Diagram (Stage II)

Page 77: Programming and-controlling-puma-arms

77

digital servo boards

power amplifier

servomotors

B interface

A interface

CPU board

potentiometers encoders

arm signal board

high power function bd.

C interface

operator panel

I/O PCAuser connect

CX PCA

CMOS memory board

I/O interface

terminal disk driver

teach pendant aux. Super. Alter digimig Spare

Quad serial board

Quad serial board

ENC

POT

PUMA MK III CONTROLLER

optinal

Page 78: Programming and-controlling-puma-arms

78

digital servo boards

power amplifier

servomotors

B interface

A interface

potentiometers encoders

arm signal board

high power function bd.

C interfaceCX PCA

ENC

POT

PUMA MK III Controller Modified for ALVIN I

Qbus adaptor

VMEbus adaptor

VME BUS

VME BUS SYSTEM

UNIMATION CONTROLLER

Page 79: Programming and-controlling-puma-arms

79

power amplifier

servomotors

potentiometers encoders

arm signal board

high power function bd.

C interfaceCX PCA

ENC POT

PUMA MK III Controller Modified for ALVIN II

VME BUS

Robot I/O Board

Parallel I/O Board

DAC Board

ADC Board

Motor Current

Page 80: Programming and-controlling-puma-arms

80

CPU 1 68040

CPU 2 68040

CPU 3 68040

CPU 4 68030

CPU 5 68030

memory board

power amplifier

parallel I/O board

force/torque sensor

VME BUS

PUMA 560 & 562 ROBOT ARMS

VSB

ethernet board

SUN workstation

DAC board

Unimation MK I & III PUMA

Controllers

parallel I/O board

ADC board

robot I/O board

Vision Board

CCD Cameras

ALVIN Block Diagram (Stage III)

Page 81: Programming and-controlling-puma-arms

81

VME bus / VSB Wayne Fischer, "IEEE P1014 - A Standard for the High-Performance VME Bus," IEEE Micro, Feb. 1985. Paul L. Borrill, "MicroStandards Special Feature: A Comparison of 32-Bit Buses," IEEE Micro, Dec. 1985. Walter S. Heath, "Software Design for Real-Time Multiprocessor VMEbus Systems," IEEE Micro, Dec. 1987. Shlomo Pri-Tal, "MicroStandards - The VME subsystem bus (VSB)," IEEE Micro, Apr. 1986. Craig MacKenna and Rick Main, "Backup support gives VMEbus powerful multiprocessing architecture," Electronics, Mar. 22, 1984.

VxWorks, VRTX [vrtx 1] James F. Ready, "VRTX: A Real-Time Operating System for Embedded Microprocessor Applications,“ IEEE Micro, Aug. 1986. [vrtx 2] J. Mattox, "A Multi-processor Approach to Using UNIX in a Real-Time Environment,“ WESCON '86 [vrtx 3] S. J. Doyle and P. Bunce, "Real-Time Multiprocessing Requirements,“ WESCON '86 [vxworks 1] Jerry Fiddler and Leslie Kirby, "How to use VMEbus and Ethernet to build real-time distributed systems,“ VMEbus Systems, Sep.-Oct. 1987. [vxworks 2] Jerry Fiddler and David N. Wilner, "VxWorks/Unix Real-Time Network and Development System,“ Mini/MicroNortheast, 1986 [vxworks 3] Wind River Systems, VxWorks version 3.20, 1987.

References

Page 82: Programming and-controlling-puma-arms

82

PUMA/VAL [puma 1] B. Fisher and V. Hayward, "Communication Routines Between the LSI 11-03 and the 6503's", Purdue University, (undated,

unpublished) [puma 2] B. Fisher and V. Hayward, "Robot Controller,“ Purdue University, (undated, unpublished) [puma 3] Unimation Inc., "Controlling the PUMA Series 500 Robot Arm Without using VAL", (undated, unpublished, company confidential) [puma 4] R. Vistnes, "Breaking Away From VAL, or How to use your PUMA without using VAL,“ Stanford University, (undated,

unpublished) [puma 5] A. Melidy and A. A. Goldenberg, "Operation of PUMA 560 Without VAL,“ Robots 9, 1985 [puma 6] S.-Y. Lee, A Study on the Wrist Servo-Controller of PUMA-760 Robot, MS Thesis, Dept of ME, KAIST, Feb., 1986. [puma 7] P. Nagy, "A New Approach to Operating a PUMA manipulator Without Using VAL,“ Robots 12 and Vision '88, 1988 [puma 8] P. Nagy, "The Puma 560 Industrial Robot: Inside-Out,“ Robots 12 and Vision '88, 1988 [puma 9] Unimation Inc., Unimate Puma Robot Volume I - Technical Manual 398H1, Oct. 1981 [puma 10] Unimation Inc., PUMA MARK III Robot 500 Series Models 552/562 Equipment Manual 398AH1, Jan. 1987 [puma 11] R. M. Stanley, Host Control of PUMA 6503-based Servos Communication Protocol and Arm Specific information, June 1986.

Unimation Inc., (company confidential) [puma 12] P. I. Corke, The Unimation PUMA servo system, MTM-226, CSIRO, 1994 [val 1] Unimation Inc., User's Guide to VAL version 12, June 1980 [val 2] Unimation Inc., Programming Manual User's Guide to VAL II version 2.0, Part 1 - Control from the System terminal Part 2 - Communication with a Supervisory System Part 3 - Real-Time Path Control Dec. 1986. [val 3] B. Shimano, "VAL: A Versatile Robot Programming and Control System,“ Proc. COMPSAC 79 [val 4] B. E. Shimano, C. C. geschke, and C. H. Spalding III, "VAL-II: A New Robot Control System for Automatic Manufacturing" IEEE Intl Conf on Robotics, Mar. 1984 [unival 1] E. M. Onaga and L. L. Woodland, "Six-Axes Digital Torque Servo for Robotics,“ Robots 11/ISIR 17, 1987 [unival 2] Unimation Inc., UNIVAL Robot Controller - 19 inch Rack Mount Equipment Manual Apr., 1988 LEVEL II [level II 1] R. Guptill and P. Stahura, "Multiple Robotic Devices: Position Specification and Coordination,“ IEEE Intl Conf. Robotics and

Automation, 1987

Page 83: Programming and-controlling-puma-arms

83

RCCL ( a Robot Control C Library) [rccl 1] V. Hayward, Robot Real Time Control User's Manual, TR-EE 83-42, School of Electrical Engineering, Purdue Univ., Oct. 1983. [rccl 2] V. Hayward, Introduction to RCCL: A Robot Control 'C' Library, TR-EE 83-43, School of Electrical Engineering, Purdue Univ., Oct. 1983. [rccl 3] V. Hayward, RCCL User's Manual Version 1.0, TR-EE 83-46, School of Electrical Engineering, Purdue Univ., Oct. 1983. [rccl 4] V. Hayward, RCCL Version 1.0 and Related Software Source Code, TR-EE 83-47, School of Electrical Engineering, Purdue Univ., Oct. 1983. [rccl 5] J. Roger, "VAX-LSI Interprocessor FIFO", Purdue University, (undated, unpublished) [rccl 6] V. Hayward and R. P. Paul, "Robot manipulator Control Under Unix,“ ISIR 13/ Robots 7, 1983. [rccl 7] V. Hayward and R. P. Paul, "Robot manipulator Control under Unix RCCL: A Robot Control "C" Library," Intl J.

Robotics Research, Vol.5, No.4, 1986. [rccl 8] J. S. Lee, S. Hayati, V. Hayward, and J. E. Lioyd, "Implementation of RCCL, a robot control C library on a

microVAX II,“ SPIE VoL. 726, Intelligent Robots and Computer Vision, 1986. [rccl 9] D. Kossman and A. Malowany, "A Multi-processor Robot Control System for RCCL under iRMX,“ IEEE Intl Conf

Robotics and Automation, 1987. [rccl 10] A. S. Malowany and M. Pilon, "An RCCL Simulator for the Microbo Robot,“ Computers in Eng., ASME, 1988. [rccl 11] J. Lloyd, M. Parker, and R. McClain, "Extending the RCCL programming Environment to Multiple Robots and

Processors,“ IEEE Intl Conf Robotics and Automation, 1988.

Kali V. Hayward, L. Daneshmend, A. Nilakantan, and A. Topper, A Selection of Papers " KALI Project “ McGill Research Center for Intelligent Machines, Aug. 1, 1989. A. Topper, The McGill Robot I/O Board Rev B, May 1989.

Page 84: Programming and-controlling-puma-arms

84

End of Part 1

Page 85: Programming and-controlling-puma-arms

RCCL Variants

1999

Gyoung H. Kim, Ph.D

Page 86: Programming and-controlling-puma-arms

86

RCCL-related Systems

• RCCL v1.0-based

• Multi-RCCL

• RWRCCL

• Qrobot

• ARCL

Page 87: Programming and-controlling-puma-arms

87

RCCL v1.0 Configurations

Page 88: Programming and-controlling-puma-arms

88

CPU LSI-11 RAM ROM DLV-11J

DRV-11

Qbus

CRT

Floppy Teach Pend. Aux

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

Arm Cable current

encoder pulses

PUMA 560 ARM

Unimation Controller

FIFO

FIFO

UNIBUS VAX-11780

Serial

RCCL (Purdue, 1983)

Page 89: Programming and-controlling-puma-arms

89

RCCL Architecture

Page 90: Programming and-controlling-puma-arms

90

RCCL Routines

Page 91: Programming and-controlling-puma-arms

91

Routine Explanation

(1) main(): The main program. (2) startup(): Connect "setpoint_n()" to the clock interrupt. Initialize and check hardware connection. (3) move(park): "park" is a built-in position. Usually the robot starts from this position. (4) pumatask(): The actual user process. Users write only this routine. (5) release(): Stop the trajectory generator. (6) setpoint(): The trajectory generator. (7) jnsend_n(): Send the setpoints to the robot controller in the global variable "chg". (8) getobsj_n(): Get the actual robot position from the global variable "how". (9) getobst_n(): Get the arm currents from the ADC from the global variable "how".

Page 92: Programming and-controlling-puma-arms

92

DRV-11

Qbus

CRT

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

Arm Cable current

encoder pulses

PUMA 560 ARM

Unimation Controller

Bus adapter

Bus adapter

68030s/VxWorks

VMEBus

Shared Mem.

CPU #2 CPU #1

ALVIN-RCCL (Purdue, 1991)

Page 93: Programming and-controlling-puma-arms

93

DRV-11

Qbus

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

Arm Cable current

encoder pulses

PUMA 560 ARM

Unimation Controller

Bus adapter

Bus adapter

Host PC/QNX

PCI Bus

RCCL-ALVIN (Purdue, 1998)

Page 94: Programming and-controlling-puma-arms

94

Software Architecture of ALVIN-RCCL

Page 95: Programming and-controlling-puma-arms

95

CPU LSI-11 RAM ROM DLV-11J

DRV-11

Qbus

CRT

Floppy Teach Pend. Aux

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

Arm Cable current

encoder pulses

PUMA ARM

Unimation Controller

Parallel I/O

Parallel I/O

Host Computer

Serial

Host computer bus

RCCL / RCI (Standard)

Page 96: Programming and-controlling-puma-arms

96

Multi-RCCL

• Multi-RCCL v5.0 John Lloyd and Vincent Hayward, 1992.

Official release of Multi-RCCL. • Multi-RCCL v5.1 John Lloyd, 1997. Simulation mode on Linux. • Multi-RCCL v5.1.4

Torsten Scherer, 1999. Unofficial modifications for Linux.

Page 97: Programming and-controlling-puma-arms

97

Hardware Architecture of Multi-RCCL

Page 98: Programming and-controlling-puma-arms

98

RWRCCL

• RWRCCL(Roger Williams RCCL): RCCL modified by Matthew Stein at Roger Williams

University in 2000. • Configuration

– ARM: a single puma560 only. – Hardware: PC + Trident TRC 004/006 boards. – Software: RCCL ported to rtlinux. Position control is added to RCCL.

Page 99: Programming and-controlling-puma-arms

99

Arm Cable

PUMA ARM

Unimation Controller

TRC006 Board

TRC004 board

Host PC/Linux ISA bus

Power amplifier

RWRCCL (TRC Boards)

Page 100: Programming and-controlling-puma-arms

100

Hardware Architecture of RWRCCL

Page 101: Programming and-controlling-puma-arms

101

Software Architecture of RWRCCL

Page 102: Programming and-controlling-puma-arms

102

Graphic Simulator of RWRCCL

Page 103: Programming and-controlling-puma-arms

103

QRobot

• A multitasking QNX/PC-based robot control system.

• Developed at Clemson University in 1998.

• Target arm: PUMA 560.

• Hardware: PC + MultiQ board + Unimation controller.

Page 104: Programming and-controlling-puma-arms

104

Arm Cable

PUMA ARM

Unimation Controller Preamplifiers

filtering circuits

MultiQ board

Host PC PCI bus

Power amplifier

RCCL-QRobot (MultiQ Board)

Page 105: Programming and-controlling-puma-arms

105

ARCL (Advanced Robot Control Language)

• Developed by Peter I. Corke, 1993.

• Inspired by an early version of RCCL.

• Monitor and Interpreter to run VAL-II programs.

Page 106: Programming and-controlling-puma-arms

106

Structure of ARCL

Page 107: Programming and-controlling-puma-arms

107

End of Part 2

Page 108: Programming and-controlling-puma-arms

108

2005

Gyoung H. Kim, Ph.D

Porting and Running the RCCL on a Real-time Linux/PC

Page 109: Programming and-controlling-puma-arms

109

RCCL Poring

• Porting RCCL v1.0 to Linux.

• Developing a graphic simulator for RCCL v1.0.

• Porting RCCL v1.0 to Linux/RTAI.

• Porting RCCL v1.0 to Linux/Xenomai.

• Patching Multi-RCCL for a newer Linux.

• Patching RWRCCL for a newer Linux.

• Porting RWRCCL to Linux/RTAI.

Page 110: Programming and-controlling-puma-arms

110

Test Environment • RCCL: v1.0 (1983) • Simderella: v2.0.2 (1995) • gcc: 2.9.x, 3.0.4, 3.2 • Linux distribution:

- Redhat 7.3, Redhat 8.0 - Debian woody, Debian sarge

• CPU: Pentium III, Pentium 4, VIA C3 • RTAI

- Linux kernel: 2.4.19 (only for RTAI) - RTAI distribution: 2.4.11 - RTAI modules used by RCCL: rtai, rtai_sched, rtai_fifos, rtai_shm, rtai_libm

Page 111: Programming and-controlling-puma-arms

111

RCCL v1.0 on Linux

Page 112: Programming and-controlling-puma-arms

112

Running Modes of RCCL

(Modes are specified at h/switch.h) 1. PLAN mode (no signal or interrupt) - setpoint_n() is repeatedly called until completed = 0. 2. FAKE mode (signal – simulated interrupt) - At every 28ms, clock() generate a signal. - Signal handler calls setpoint_n(). 3. REAL mode (hardware interrupt) - At every 28ms, a hardware interrupt signal is generated from

the Unimation controller. - Interrupt service routine calls setpoint_n().

Page 113: Programming and-controlling-puma-arms

113

Running RCCL on Linux

• RCCL v1.0 written in pre-ANSI C run on BSD Unix. • While older Linux distributions with lib5 were BSD-flavored,

recent Linux distributions with lib6 are SYSV-flavored. • To port RCCL v1.0 to Linux, (1) Install BSD headers and libraries. On debian, apt-get install altgcc (2) Do the following modifications: - Change <signal.h> and <sgtty.h> to <bsd/signal.h> and <bsd/sgtty.h>, respectively. - Implement nap( ) with usleep( ). - Insert more FAKE and REAL mode switches for cleaner

compiling. - Correct up some K & C C-language syntax. - Remove malloc_l( ) and free_l( ) routines. (3) Link the BSD library with the option, -lbsd.

(BSD mode with lib5)

Page 114: Programming and-controlling-puma-arms

114

Running RCCL on Linux

(1) Change from BSD stuffs to SYSV - sgtty to termio - nap( ) to usleep( )

(2) Change pre-ANSI C stuffs to gcc - const( ) to rccl_const ( ) (3) Change clock( ) location - In RCCL v1.0, separated clock.c and vfork ( ) were used. - Add clock( ) to main.c and replace vfork ( ) with fork ( ). (4) Do the following minor modifications: - Add print.c for more printouts. - Add printst( ) to jnsend_n( ) of misc.c - Create linux directory for examples. - Move main.c from src to linux directory. - Adjust the delay parameter of usleep( ). - Add FAKE_DEBUG for better debugging.

(SYSV mode with libc6)

Page 115: Programming and-controlling-puma-arms

115

Simderella (A general-purpose robot simulator for kinematics)

connel (robot controller)

simmel (forward kinematics calculator)

bemmel (X-windows drawing program)

Desired joint angles, velocities, accelerations

Homogeneous matrices of robot links

Current joint angles

Graphic visualization

Simderella

Page 116: Programming and-controlling-puma-arms

116

RCCL + Simderella (on-line)

For on-line simulation, 1. Modify connel/main.c so that desired joint angles are from j6,

a global variable of RCCL. 2. Combine the main.c of RCCL and the main.c of connel. After

setpoint_n( ), call user_move_robot( ) at each clock signal. 3. Modify user_move_robot( ) and move_robot( ) of connel/moving.c to bypass some dynamics and kinematics

calculations. 4. Adjust D-H parameters of PUMA arms. 5. Link RCCL libraries when compiling connel/main.c. 6. Run Simderella.

(Simderella as a graphic simulator of RCCL)

Page 117: Programming and-controlling-puma-arms

117

• Right window: connel’s window printing out joint angles from a RCCL program.

• Left window: bemmel’s window drawing a PUMA arm with the joint angles.

Screenshot of RCCL + Simderella

Page 118: Programming and-controlling-puma-arms

118

For off-line simulation, 1. Modify connel/main.c so that desired joint angles are read from

an external file, @.out and they are fed into user_move_robot( ). 2. Modify user_mode_robot( ) and move_robot( ) of connel/moving.c to bypass some dynamics and kinematics

calculations. 3. Adjust D-H parameters of PUMA arms. 4. Compile connel/main.c. 5. Run a RCCL program with “-d” option. 6. Copy @.out to connel directory. 7. Run Simderella.

RCCL + Simderella (off-line)

Page 119: Programming and-controlling-puma-arms

119

RCCL v1.0 on Linux/RTAI

Page 120: Programming and-controlling-puma-arms

120

Software Architecture

Porting RCCL to RTAI

Page 121: Programming and-controlling-puma-arms

121

Software Components

1. User-space task (1) User command monitor: - Send start/stop/break/resume command to RT tasks in the

kernel space. - Receive fifo messages from the RT tasks - Print out the content of the shared memory. 2. Kernel-space tasks (1) RT task #1: the main.c of RCCL (non-periodic) (2) RT task #2: the TG + RTC + moper of RCCL (periodic task) (3) fifo handler: - Send commands to the RT tasks. - Receive commands from User command monitor 3. Shared memory: Store all the output data from RT tasks.

Page 122: Programming and-controlling-puma-arms

122

RTAI Porting Procedure 1. Kernel memory allocation Change malloc( ) and free ( ) to kmalloc( ) and kfree( ), respectively.

2. File output/stdout/stderr Make shm_printf( ) and redirect all the file output/stdout/stderr to the shared

memory.

3. Modify kernel vprintf( ) to handle float variables. 4. Replacement of glibc (1) sprintf – kernel’s lib.a (2) strcat, strcpy, strlen - #include <rtai.h> (3) math library – rtai_libm.o module

(4) others – gcc’s bootstarp libgcc.a 5. Follow the compiling/linking options of RTAI. 6. Distribution- or CPU-specific options: (1) Redhat 7.3: use kgcc without -mpreferred-stack-boundary=2. (2) Redhat 8.0: use gcc with -mpreferred-stack-boundary=2. (3) VIA EPIA 800 board: use –m586

Page 123: Programming and-controlling-puma-arms

123

RTAI Running Procedure

1. Install rtai modules modprobe rtai modprobe rtai_sched modprobe rtai_fifos modprobe rtai_shm modprobe rtai_libm 2. Install the RCCL realtiime module insmod rccl.o 3. Start the “user command monitor” as ./rccl_app 4. Type s/q/b/r keys at the prompt of “rccl_app” to

start/quit/break/resume realtime RCCL tasks. 5. After the RCCL tasks are finished, joint angles and other

information are saved to file “@.out”

Page 124: Programming and-controlling-puma-arms

124

RCCL Porting Results

• RCCL on BSD- and SYSV-mode Linux – PLAN/FAKE/REAL modes can be compiled. – PLAN and FAKE modes run correctly. – Clock intervals less than 1 ms work.

• RCCL + Simderella in on-line mode – FAKE mode with 30ms clock interval work. – Faster than 30ms is impossible due to the slow socket

communication of Simderella. • RCCL on RTAI

– Clock rate 50Hz (20ms) works without any problem. – All the examples which do not need a real arm can be

compiled and run correctly. – A faster clock rate is possible when moper functions are

needed. – For the Unination controller still with the digital servo boards,

clock interrupt signals should be received from the Unimation controller to prevent clock drifts.

Page 125: Programming and-controlling-puma-arms

125

RWRCCL on Linux/RTAI

Page 126: Programming and-controlling-puma-arms

126

• Routines are fully documented. • Trace and analysis of the program execution flow are done. • Documentation on the program execution flow is almost done.

Analysis Results of RWRCCL

Page 127: Programming and-controlling-puma-arms

127

• Environment: - debian sarge 3.1r1 - gcc 3.3 6 - glibc 2.3.2 • RTLinux:

- rtlinux-3.2-rc1 - kernel 2.4.27

• Patches (1) gcc-dependent: newline in a literal string, sys_errlist, varargs.h (2) imake configuration bug.

Updating RWRCCL to a newer RTLinux

Page 128: Programming and-controlling-puma-arms

128

• Trajectory generation sampling interval: 27ms

• Servo sampling interval: 0.9 ms (position control mode, PID control) • Simulation mode needs a slower sampling rate due to the slow X11 graphics.

• Dry-running mode in real-time is added.

Porting Results of RWRCCL-rtlinux

Page 129: Programming and-controlling-puma-arms

129

• RTAI: - rtai-3.2 - kernel 2.4.27 • Patches (1) rtlinux-dependent directories: $RCCL/jls (kernel modules) $RCCL/puma (user-space routines) (2) Utilities for the puma interface card: $RCCL/rtlinux (3) Conflicting macro definition: FREE(x) is changed to RCCL_FREE(x) (FREE(x) is also defined at rtai_lxrt.h)

Porting RWRCCL to RTAI

Page 130: Programming and-controlling-puma-arms

130

Ongoing Projects

• Modifying RCCL for running various arms.

• Porting RCCL v1.0 to Xenomai.

• Developing a front-end interpreter for RCCL.

• Modifying RCCL v1.0 for running multiple arms in independent and/or coordinative modes.

• Running RCCL on Non-X86 CPUs.

Page 131: Programming and-controlling-puma-arms

131

End of Part 3