Programming And Controlling Puma Arms

131
Programming and Controlling PUMA Robot Arms PUMA Robot Arms 1989 1999 2005 1989, 1999, 2005 Gyoung H. Kim, Ph.D. 1
  • date post

    15-May-2015
  • Category

    Technology

  • view

    4.637
  • download

    5

Transcript of Programming And Controlling Puma Arms

Page 1: Programming And Controlling Puma Arms

Programming and ControllingPUMA Robot ArmsPUMA Robot Arms

1989 1999 20051989, 1999, 2005

Gyoung H. Kim, Ph.D.

1

Page 2: Programming And Controlling Puma Arms

Contents

I. Controlling PUMA Robot Arms with VAL, g ,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 2005time Linux/PC, 2005.

2

Page 3: Programming And Controlling Puma Arms

Controlling PUMA Robot ArmsWith VAL RCCL Kali or ALVINWith VAL, RCCL, Kali, or ALVIN

19891989

Gyoung H. Kim, Ph.DGyoung H. Kim, Ph.D

3

Page 4: Programming And Controlling Puma Arms

Contents

• PUMA

Contents

• PUMA- MK I controller- MK II controller- MK III controller- UNIVAL controller

• RCCL

• Level II

• Kali

4

• ALVIN

Page 5: Programming And Controlling Puma Arms

PUMAPUMA

5

Page 6: Programming And Controlling Puma Arms

PUMAPUMA(Programmable, Universal Machines for Assembly)

• Vendor: Unimation,Inc.

• Arm Types:260 Series, 550 Series 560 Series 552 Series 562 Series550 Series, 560 Series, 552 Series, 562 Series760 Series

• Controller Types:Mark I, Mark II, Mark III, UNIVAL

• Robot Programming Language:VAL VAL II

6

VAL, VAL II

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

PUMA MK III Controller Configuration

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[5] A interface card[6] B interface card[7] digital servo boards[7] digital servo boards [8] arm signal interface board

26

Page 27: Programming And Controlling Puma Arms

2 power card set2. power card set

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

27

Page 28: Programming And Controlling Puma Arms

Servo Code Block Diagram

Main Timer Host

Initialization

Wait for interrupt

Interrupt

Disable Host Interrupt

Read Encoder C t

Host Interrupt

Save command

YESExecute

immediate

NO Deferred Command ?

Counter

Enable Host Interrupt

Position/current control

command in buffer

immediate command

Return

control

Deferred Command Execution

R tReturn

28

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

UNIVALUNIVAL

32

Page 33: Programming And Controlling Puma Arms

UNIVAL Block Diagram

Torque Processor

BoardServo

Control Module

Expansion Memory

(Optional)

Unival Controller

CX Module

Arm Interface BoardDistribution

Board

Major Power Minor Power

VDTDisk DriveAux. PortSmart I/O

Teach Pendant

Major Power Amplifier

Minor Power Amplifier

Signal Connection Board

Robot Arm

33

Page 34: Programming And Controlling Puma Arms

Typical Controller with Analog Torque Loop

Torque Loop / Amplifier

DAC M

EN AXES Digital Servo

and Robot

Controller

N Axes

34

Page 35: Programming And Controlling Puma Arms

UNIVAL Torque Processor LoopUNIVAL Torque Processor Loop

Torque ++ K Linearli er PWM Power

HardwareSoftware

Torque Command +

++

+

-K p Linearlizer PWM

Chip

Motor

Power Amp

Ki1 - Z - 1

++

Current Offset

A / D

35

Page 36: Programming And Controlling Puma Arms

UNIVAL Signal Loops

Arm Cable

Position and

velocity TPB

SCM AIB

PWM ROBOTCommand

from VAL velocity

Servos AMPS

EncodersFeedback from Robot

Current Feedback

VAL

VAL Potentio-meters

Position Feedback upon Startup

36

Page 37: Programming And Controlling Puma Arms

UNIVAL Servo System Block Diagram

Torque Processor

ModuleServo

and Robot

3 Axes PWM Chip

3 Axes Power AMP

M EArm Interface Module

Module

A / D

Robot Control Module

3 Axes PWM Chip

AMP

3 Axes Power AMP

MUX

Current Feedback

Encoder Feedback

37

Page 38: Programming And Controlling Puma Arms

PUMA Control with VAL1. The hardware does not provide sufficient processing power

it is too slow for real time control

PUMA Control with VAL

--- 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 tocomputer 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 interactions4. Communication with other computers is limited to interactions with VAL.

5. Inverse kinematics software is not available, hence, trajectories , , jcannot be defined off-line.

6. Control of the arm is performed at the joint level, providing only

38

joint position regulation.

Page 39: Programming And Controlling Puma Arms

PUMA Control without VALAdvantages :

PUMA Control without VAL

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.

39

6. The ability to access to a database.

Page 40: Programming And Controlling Puma Arms

Alternative Hardware Configurations

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 bufferbuffer.

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

40

controller is used.

Page 41: Programming And Controlling Puma Arms

RCCLRCCL

41

Page 42: Programming And Controlling Puma Arms

RCCL, Purdue (1983)

RCCL ( Robot Control "C" Library)

(1983)

RCCL, McGill (1985)

RCCL, McGill (1986)

( )

Level II, Cybotech (1987)

RCCL, JPL (1986)

RCCL, McGill (1988)

Timix, U. of Pennsylvania

(1988)

Kali, McGill (1988)

Multi RCCL JPLALVIN Purdue Multi-RCCL, JPL (1990)

ALVIN, Purdue

RWRCCL, RWU(2001)

42

(2001)

Page 43: Programming And Controlling Puma Arms

Ph i l I l t ti f RCCL

VAX ComputerVAX COMPUTER

Physical Implementation of RCCL

p

RCCL PROGRAMRCCL PROGRAM

VAX COMPUTER

HIGH SPEED

SERIAL LINE FOR LOADING I/O

CONTROL PROGRAM

COMMUNICATION

LSI 11 CPUTEACH PENDANT

HIGH SPEED PARALLEL LINK PROGRAM

COMMUNICATION I/O CONTROLLERA/D

CONVERTER

6503 JOINT CONTROLLERS

TO ROBOTUNIMATION CONTROLLER

43

Page 44: Programming And Controlling Puma Arms

RCCL Block Diagram (Purdue)

UNIBUSVAX 780

CRT Floppy Teach pend Aux

Unimation Controller

FIFOSerial

CPU LSI-11 RAM ROM DLV-11J

DRV 11

Qbus

ppy pend.

CLOCK

FIFO

DRV-11

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

Arm Cablecurrent

encoderencoder pulses

PUMA 560 ARM

44

Page 45: Programming And Controlling Puma Arms

45

Page 46: Programming And Controlling Puma Arms

RCCL Block Diagram

Robot Arm

C t d M t t t

Servomotor Control

Arm Interface

Current command Motor state

Robot Controller

Torque-current mapping Angles-encoders

mapping Safety limits

Arm-dependent data

World Model Trajectory Generation

Arm Kinematics

Arm stateSet pointsPositions

Transformations Equations

Cartesian Joint Interpolation

Compliance

Cartesian-joint Jacobian

Arm configuration

QueueMotion requests

Updates

TG state Synchronization

User’s Processq

46

Page 47: Programming And Controlling Puma Arms

Internal Control-level Execution Sequence

NORMAL TASK

Internal Control-level Execution Sequence

NORMAL TASK AND PROCESS

EXECUTIONDRIVER

INTERRUPT HANDLER

TAKES SWITCH TO CONTROL PROGRAM MEMORY

CONTEXT

TAKES CONTROL

EXECUTE CONTROL: CYCLEread data from LSI 11call RCI check routinewrite commands to LSI 11call control function

RESTORE MEMORY CONTEXT

INTERRUPT

NORMAL TASK AND PROCESS

EXECUTION

INTERRUPT HANDLER RETURNS

47

Page 48: Programming And Controlling Puma Arms

CONTROL

Execution Cycle at the Control Level

WAIT FOR

NEXT CYCLE

CONTROL LEVEL TASK

INTERNAL CHECKING

CONTROL DIRECTIVE OPEN

DIRECTIVE

DATA FROM

LSI 11

IDLECONTROL FUNCTIONCOMMAND

CHECKINGCOMMANDS

TO LSI 11

NORMAL EXECUTION

RELEASECLOSE

DIRECTIVE

LSI 11

RELEASE DIRECTIVE

OR ERROR CONDITION

DIRECTIVE

48

Page 49: Programming And Controlling Puma Arms

49

Page 50: Programming And Controlling Puma Arms

P iti E tiAt point p1,

Position Equations

p1 = Z T61 E1T61 = Z-1 p1 E1

-1

= R1 p1 T11 1 1At point p2,

p1 = Z T62 E2T61 = Z-1 p2 E2

-1T61 Z p2 E2= R2 p2 T2

Let 2p1 = R2-1 R1 p1 E1 E2

-1

From point p1 to point p2,T6 = R2

2p1 Drive(s) T2here Dri e(0) Identitwhere Drive(0) = Identity

Drive(1) = 2p1-1 p2

Generally,

50

T6 = R P Drive Comply T

Page 51: Programming And Controlling Puma Arms

LEVEL IILEVEL II

51

Page 52: Programming And Controlling Puma Arms

Th F L l f th R b tThe Four Levels of the RobotProgramming Environment

Application Program

Menu Interface

Level II Library

Application Program

Device Driver

52

Page 53: Programming And Controlling Puma Arms

RC-X Control Boards

Supervisor Board

Geometric Operator

B dEnvironment

Board

Tape Drive

Programming Console

System Securities

Hand Control

I/O

Mother Board

Board Board Board

TTY Sensor

Interface

Axis Board 1 Axis Board 2 Axis Board 3

53

Page 54: Programming And Controlling Puma Arms

54

Page 55: Programming And Controlling Puma Arms

KaliKali

55

Page 56: Programming And Controlling Puma Arms

K liKali(A creature with many arms

i Hi d th l )Characteristics:

in Hind mythology)

1. Programming and control of multiple manipulators operating in close cooperation.p g p

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

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

4. Open architecture design.

56

Page 57: Programming And Controlling Puma Arms

High Performance Computing System

Current trends:

1. Super or mini-super computers.

2. Workstations with special very high performance floating p y g p gpoint accelerations.

3. Special purpose chips such as DSPs (AT&T, TI., etc).3. Special purpose chips such as DSPs (AT&T, TI., etc).

4. Many single board computers operating in parallel.

57

Page 58: Programming And Controlling Puma Arms

Kali Software DirectoryKali Software Directory

58

Page 59: Programming And Controlling Puma Arms

Kali src Directory

59

Page 60: Programming And Controlling Puma Arms

Kali Block Diagram

SUN 3

VSB

SUN 3 workstation

ethernet link

CPU 1 68020

CPU 2 68020

CPU 3 68020

CPU 4 68020

CPU 5 68020

memory board

DAC robot I/O parallel

VME BUS

ethernet board

DAC board

power amplifier

robot I/O board

pI/O board

force/torque sensor

PUMA 560 ROBOT ARM

encoder pulsesbrake

release

power on/off

PUMA 560 ROBOT ARM

60

Page 61: Programming And Controlling Puma Arms

R Ti St t

1 Synchronous processes

Run-Time Structure

1. Synchronous processesi. Trajectory generatorii. Servo controliii I/O processiii. I/O process

2. Asynchronous processi. User processi. User processii.Dynamic computations

Processor Communication

1. Message passing2. Shared memory

61

Page 62: Programming And Controlling Puma Arms

Real time Computing1. Software support

Real-time Computing

Host: Unix-based workstationTarget: real-time operating system (VxWorks) T t h t i ti th tTarget-host communication - ethernet

2 Hardware support2. Hardware support

Servo CPUs: 1 ms servo rate PID control algorithm1 ms servo rate PID control algorithmOne CPU for three joints (CPU3 and CPU4)

Computational CPUs:Computational CPUs:I. User program, trajectory generator, kinematics (CPU1)ii. Dynamic computation (CPU2)iii. Supervisor - all I/O information handling(CPU0)

62

iii. Supervisor all I/O information handling(CPU0)

Page 63: Programming And Controlling Puma Arms

63

Page 64: Programming And Controlling Puma Arms

Kali Graphic SimulatorKali Graphic Simulator

64

Page 65: Programming And Controlling Puma Arms

Kali Graphic Simulator

65

Page 66: Programming And Controlling Puma Arms

Kali Graphic SimulatorKali Graphic Simulator

66

Page 67: Programming And Controlling Puma Arms

Spatial RelationshipsSpatial Relationships(Ring Structures)

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 th d i t fD : the drive transform

C : the goal position of the control frame

67

Page 68: Programming And Controlling Puma Arms

68

Page 69: Programming And Controlling Puma Arms

69

Page 70: Programming And Controlling Puma Arms

ALVINALVIN

70

Page 71: Programming And Controlling Puma Arms

ALVIN(ALmost Very Intelligent, but Not)(ALmost Very Intelligent, but Not)

- Purdue's new robot system

- Named by Prof. C S G Lee

- Advanced system in hardware and software

71

Page 72: Programming And Controlling Puma Arms

7272

Page 73: Programming And Controlling Puma Arms

7373

Page 74: Programming And Controlling Puma Arms

ALVIN Block Diagram(Stage I)

SUN 3 workstation

VSB

workstation

ethernet link

CPU 1 68030

CPU 2 68030

memory board

VMEbus

ethernet board

VMEbus adaptor

Qbus adaptor

Unimation MK I PUMA controller

PUMA 560 ROBOT ARM

PUMA controller

74

Page 75: Programming And Controlling Puma Arms

ALVIN Block Diagram (Stage I)

VSBVMEbus System

VMEbus

Bus Adaptor

CPU 0 68030

CPU 1 68030

Shared-MemoryEthernet

ControllerEngineering Computer Network

DRV-11

Qbus

Unimation MK I Controller Bus Adaptor

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK Arm Cable

PUMA 560 ARM

75

Page 76: Programming And Controlling Puma Arms

ALVIN Block Diagram (Stage II)

SUN workstation

VMEbus System

Engineering Computer Network

workstationCRT

Ethernet CardCPU 0 (68040)CPU 1 (68040)

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

CRTUnimation

MK III Controller

Unimation MK I

ControllerShared Memory

VMEbus AdaptorVMEbus Adaptor

Digital ServoB-interface

ADCA-interface

Qbus AdaptorADC

DRV-11

Arm InterfaceDigital Servo

Qbus Adaptor

Digital ServoPaddle

Arm Cable

gClock / term.Analog Servo

PaddleArm Cable

PUMA 562 Robot Arm

PUMA 560 Robot Arm

76

Page 77: Programming And Controlling Puma Arms

i l

terminal disk driver

teach pendant aux. Super. Alter digimig Spare

Quad serial b d

Quad serial b d

optinal

CPU board

I/O PCAuser connect

CMOS memory board

I/O interface

board board

B interface

A interface

C interface

operator panel

CX PCAPOT

digital servo boards

power amplifier

ENC

servomotors

potentiometers encoders

high power function bd.

arm signal board

PUMA MK III CONTROLLER

77

Page 78: Programming And Controlling Puma Arms

VMEbus adaptor

VME BUS

VME BUS SYSTEM

A

Qbus adaptor

UNIMATION CONTROLLER

B interface

A interface

C interfaceCX PCA

POT

digital servo boards

power amplifier

ENC

servomotors

potentiometers encoders

high power function bd.

arm signal board

PUMA MK III Controller M difi d f ALVIN I

78

Modified for ALVIN I

Page 79: Programming And Controlling Puma Arms

VME BUS

Robot I/O Board

Parallel I/O Board

DAC Board

ADC Board

Motor Current

C interfaceCX PCA

ENC POT

power amplifier

servomotors

potentiometers encoders

high power function bd.

arm signal board

PUMA MK III Controller

79

PUMA MK III Controller Modified for ALVIN II

Page 80: Programming And Controlling Puma Arms

ALVIN Block Diagram (Stage III)

SUN k t ti

CPU 1 68040

CPU 2 68040

CPU 3 68040

CPU 4 68030

CPU 5 68030

memory board

VSB

ethernet board

workstation

parallel I/O board

VME BUS

DAC board

parallel I/O board

ADC board

robot I/O board

Vision Board

CCDpower

amplifierforce/torque

sensor

PUMA 560 & 562 ROBOT ARMS

Unimation MK I & III PUMA

Controllers

CCD Cameras

80

Page 81: Programming And Controlling Puma Arms

R fVME bus / VSB

References

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 1987IEEE 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 multiprocessingarchitecture," 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[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.

81

Page 82: Programming And Controlling Puma Arms

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 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[p ] , y , , ,

[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 terminalPart 2 - Communication with a Supervisory SystemPart 3 - Real-Time Path ControlDec. 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[ ni al 2] Unimation Inc UNIVAL Robot Controller 19 inch Rack Mo nt Eq ipment Man al Apr 1988[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

82

Page 83: Programming And Controlling Puma Arms

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.g g[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[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 1986Robotics 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 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.

KaliV. 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.

83

Page 84: Programming And Controlling Puma Arms

End of Part 1

84

Page 85: Programming And Controlling Puma Arms

RCCL V i tRCCL Variants

1999

G H Ki Ph DGyoung H. Kim, Ph.D

Page 86: Programming And Controlling Puma Arms

RCCL-related Systems

• RCCL v1.0-based

• Multi-RCCL

• RWRCCL

• QrobotQrobot

• ARCL

86

Page 87: Programming And Controlling Puma Arms

RCCL v1 0RCCL v1.0 Configurations

87

Page 88: Programming And Controlling Puma Arms

RCCL (Purdue, 1983)

FIFO

UNIBUSVAX-11780

Serial

Floppy TeachPend. Aux

FIFOSerial

CPU LSI-11 RAM ROM DLV-11J

Qbus

CRT

FIFO

DRV-11

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

currentArm Cable

currentencoder pulses

PUMA 560 ARM

Unimation Controller

88

Page 89: Programming And Controlling Puma Arms

RCCL Architecture

89

Page 90: Programming And Controlling Puma Arms

RCCL RoutinesRCCL Routines

90

Page 91: Programming And Controlling Puma Arms

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():(4) pumatask(): The actual user process. Users write only this routine.

(5) release(): Stop the trajectory generator.(6) setpoint(): The trajectory generator.(7) j d ()(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".

91

Page 92: Programming And Controlling Puma Arms

ALVIN-RCCL (Purdue, 1991)

Bus adapter

68030s/VxWorks

VMEBus

Shared MemCPU #2CPU #1

CRT

Bus adapterShared Mem.CPU #2CPU #1

Qbus

Bus adapter

DRV-11

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

tArm Cable

currentencoder pulses

PUMA 560 ARM

Unimation Controller

92

Page 93: Programming And Controlling Puma Arms

RCCL ALVIN (P d 1998)RCCL-ALVIN (Purdue, 1998)

Bus adapter

Host PC/QNX

PCI Bus

Bus adapter

Qbus

Bus adapter

DRV-11

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

tArm Cable

currentencoder pulses

PUMA 560 ARM

Unimation Controller

93

Page 94: Programming And Controlling Puma Arms

Software Architecture of ALVIN RCCLSoftware Architecture of ALVIN-RCCL

94

Page 95: Programming And Controlling Puma Arms

RCCL / RCI (Standard)

Parallel I/O

Host Computer

Serial

Host computer bus

C

Floppy TeachPend. Aux

Unimation Controller

CPU LSI-11 RAM ROM DLV-11J

Qbus

CRTUnimation Controller

Parallel I/O

DRV-11

Digital Servo

Analog Servo

Power AMP.

SERVO INTERFACE

CLOCK

A C blcurrent

Arm Cableencoder pulses

PUMA ARM

95

Page 96: Programming And Controlling Puma Arms

Multi-RCCL

• Multi-RCCL v5.0John 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 LinuxUnofficial modifications for Linux.

96

Page 97: Programming And Controlling Puma Arms

Hardware Architecture of Multi-RCCL

97

Page 98: Programming And Controlling Puma Arms

RWRCCL

• RWRCCL(Roger Williams RCCL):RCCL modified by Matthew Stein at Roger WilliamsRCCL modified by Matthew Stein at Roger Williams University in 2000.

• Configuration– ARM: a single puma560 only.

H d PC T id t TRC 004/006 b d– Hardware: PC + Trident TRC 004/006 boards.– Software: RCCL ported to rtlinux.

Position control is added to RCCLPosition control is added to RCCL.

98

Page 99: Programming And Controlling Puma Arms

RWRCCL (TRC Boards)

TRC004 board

Host PC/Linux ISA bus

U i ti C t ll

TRC004 board

Unimation Controller

TRC006 Board

Power amplifierPower amplifier

Arm Cable

PUMA ARM

99

Page 100: Programming And Controlling Puma Arms

Hardware Architecture of RWRCCL

100

Page 101: Programming And Controlling Puma Arms

S ft A hit t f RWRCCLSoftware Architecture of RWRCCL

101

Page 102: Programming And Controlling Puma Arms

Graphic Simulator of RWRCCL

102

Page 103: Programming And Controlling Puma Arms

QRobot

A ltit ki QNX/PC b d b t t l t• A multitasking QNX/PC-based robot control system.

• Developed at Clemson University in 1998.

• Target arm: PUMA 560.

• Hardware: PC + MultiQ board + Unimation controller.

103

Page 104: Programming And Controlling Puma Arms

RCCL-QRobot (MultiQ Board)

MultiQ board

Host PC PCI bus

U i ti C t ll

MultiQ board

Unimation ControllerPreamplifiers

filtering circuits

Power amplifierPower amplifier

Arm Cable

PUMA ARM

104

Page 105: Programming And Controlling Puma Arms

ARCL(Advanced Robot Control Language)(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.

105

Page 106: Programming And Controlling Puma Arms

Structure of ARCLStructure of ARCL

106

Page 107: Programming And Controlling Puma Arms

End of Part 2

107

Page 108: Programming And Controlling Puma Arms

Porting and Running the RCCL R l ti Li /PCon a Real-time Linux/PC

2005

Gyoung H Kim Ph DGyoung H. Kim, Ph.D

108

Page 109: Programming And Controlling Puma Arms

RCCL PoringRCCL 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• Patching RWRCCL for a newer Linux.

• Porting RWRCCL to Linux/RTAI.

109

g

Page 110: Programming And Controlling Puma Arms

Test Environment

• RCCL: v1.0 (1983)• Simderella: v2.0.2 (1995)• gcc: 2 9 x 3 0 4 3 2• gcc: 2.9.x, 3.0.4, 3.2 • Linux distribution:

- Redhat 7.3, Redhat 8.0D bi d D bi- 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: yrtai, rtai_sched, rtai_fifos, rtai_shm, rtai_libm

110

Page 111: Programming And Controlling Puma Arms

RCCL v1.0 on Linux

111

Page 112: Programming And Controlling Puma Arms

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.

Si l h dl ll t i t ()- 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().

112

Interrupt service routine calls setpoint_n().

Page 113: Programming And Controlling Puma Arms

Running RCCL on Linux(BSD mode with lib5)

• 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, p g g

(2) Do the following modifications:- Change <signal.h> and <sgtty.h> to

<bsd/signal.h> and <bsd/sgtty.h>, respectively.<bsd/signal.h> and <bsd/sgtty.h>, respectively.- Implement nap( ) with usleep( ). - Insert more FAKE and REAL mode switches for cleaner

compiling.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

113

(3) Link the BSD library with the option, -lbsd.

Page 114: Programming And Controlling Puma Arms

Running RCCL on Linuxg

(1) Ch f BSD t ff t SYSV

(SYSV mode with libc6)

(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:( ) o t e o o g o od cat o s- Add print.c for more printouts.- Add printst( ) to jnsend_n( ) of misc.c- Create linux directory for examples- Create linux directory for examples.- Move main.c from src to linux directory.- Adjust the delay parameter of usleep( ).

Add FAKE DEBUG for better debugging114

- Add FAKE_DEBUG for better debugging.

Page 115: Programming And Controlling Puma Arms

SimderellaSimderella(A general-purpose robot simulator for kinematics)

Current joint angles

Simderellaconnel

(robot controller)

Simderella

simmel(f d ki ti l l t )

Desired joint angles, velocities, accelerations

(forward kinematics calculator)

bemmelHomogeneous matrices ofrobot links

bemmel(X-windows drawing program)

115

Graphic visualization

Page 116: Programming And Controlling Puma Arms

RCCL + Simderella (on-line)RCCL + Simderella (on-line)(Simderella as a graphic simulator of RCCL)

For on-line simulation,1 Modify connel/main c so that desired joint angles are from j61. 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 signalsetpoint_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.p g6. Run Simderella.

116

Page 117: Programming And Controlling Puma Arms

Screenshot of RCCL + Simderella

• Right window: connel’s window printing out joint angles g p g j gfrom a RCCL program.

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

117

the joint angles.

Page 118: Programming And Controlling Puma Arms

RCCL + Simderella (off(off--line)line)

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 kinematicsof connel/moving.c to bypass some dynamics and kinematics calculations.

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

118

Page 119: Programming And Controlling Puma Arms

RCCL v1.0 on Linux/RTAI

119

Page 120: Programming And Controlling Puma Arms

Porting RCCL to RTAI

Software Architecture

Porting RCCL to RTAI

Software Architecture

120

Page 121: Programming And Controlling Puma Arms

Software Components

1. User-space task(1) User command monitor:

- Send start/stop/break/resume command to RT tasks in the- 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 memoryPrint 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)(2) RT task #2: the TG + RTC + moper of RCCL (periodic task)(3) fifo handler:

- Send commands to the RT tasks.R i d f U d it- Receive commands from User command monitor

3. Shared memory: Store all the output data from RT tasks.

121

Page 122: Programming And Controlling Puma Arms

RTAI Porting ProcedureRTAI Porting Procedure1. Kernel memory allocation

Change malloc( ) and free ( ) to kmalloc( ) and kfree( ) respectivelyChange malloc( ) and free ( ) to kmalloc( ) and kfree( ), respectively.

2. File output/stdout/stderrMake 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: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

122

(3) VIA EPIA 800 board: use m586

Page 123: Programming And Controlling Puma Arms

RTAI Running Procedure

1 I t ll t i d l1. Install rtai modulesmodprobe rtaimodprobe rtai_sched modprobe rtai_fifos modprobe rtai_shm modprobe rtai_libm

2. Install the RCCL realtiime moduleinsmod 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.q

5. After the RCCL tasks are finished, joint angles and other information are saved to file “@.out”

123

Page 124: Programming And Controlling Puma Arms

RCCL Porting ResultsRCCL 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 p

communication of Simderella.• RCCL on RTAI

– Clock rate 50Hz (20ms) works without any problem.( ) y p– 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 t ll t t l k d ift

124

controller to prevent clock drifts.

Page 125: Programming And Controlling Puma Arms

RWRCCL on Linux/RTAIRWRCCL on Linux/RTAI

125

Page 126: Programming And Controlling Puma Arms

Analysis Results of RWRCCL

• Routines are fully documented• Routines are fully documented.

• Trace and analysis of the program executionTrace and analysis of the program execution flow are done.

• Documentation on the program execution flowis almost done.

126

Page 127: Programming And Controlling Puma Arms

Updating RWRCCL to a newer RTLinux

• Environment: - debian sarge 3.1r1

3 3 6- 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(1) gcc dependent: newline in a literal string,

sys_errlist, varargs.h(2) imake configuration bug.

127

Page 128: Programming And Controlling Puma Arms

Porting Results of RWRCCL-rtlinux

• Trajectory generation sampling interval: 27ms

• Servo sampling interval: 0.9 ms (position control mode, PID control)(pos t o co t o ode, co t o )

• Simulation mode needs a slower sampling rate due to the slow X11 graphics.

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

128

Page 129: Programming And Controlling Puma Arms

RTAI

Porting RWRCCL to RTAI

• 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)

129

(FREE(x) is also defined at rtai_lxrt.h)

Page 130: Programming And Controlling Puma Arms

Ongoing Projects

• Modifying RCCL for running various arms.

• Porting RCCL v1 0 to Xenomai• 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.independent and/or coordinative modes.

• Running RCCL on Non-X86 CPUs.

130

Page 131: Programming And Controlling Puma Arms

E d f P t 3End of Part 3

131