transformations in v+, val3, and tpp sebastian van delden usc upstate [email protected]

53
Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate [email protected]

Upload: chloe-dickerson

Post on 04-Jan-2016

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Transformations in V+, VAL3, and TPP

Sebastian van Delden

USC Upstate

[email protected]

Page 2: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

V+

Page 3: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Transformations The built-in V+ trans function creates

a new transformation:

trans(X, Y, Z, Yaw, Pitch, Roll)

Page 4: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Related V+ Functions set curpos = HERE The here function returns a transformation that represents the current

location of the tool frame (NOTE: set needs to be used to populate location variables).

decompose curvals[ ] = curpos The decompose function can be used to return the 6 position values.

dx (location) Returns X value of location

dy (location) Returns Y value of location

dz (location) Returns Z value of location

inverse (transformation) Return the inverse of its parameter

Page 5: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Related V+ Functions RX(angle)

Create a pure rotation transformation of angle degrees around X.

RY(angle) Create a pure rotation transformation of angle degrees around

Y. RZ(angle)

Create a pure rotation transformation of angle degrees around Z.

SHIFT(transformation BY x_shift, y_shift, z_shift) Return a transformation resulting from shifting the translation

values of the transformation parameter.

scale(transformation BY factor) Returns a scaled transformation

Page 6: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Applying Transformations Transformations can be multiplied together using a

colon(:) to create a new location. move trans(10,2,30,90,0,0):rx(30):a

ORDER MATTERS: move rx(30):trans(100,0,0,0,0,0)

Make a 30 degree rotation around robot world X and then translate 100 mm down this direction.

I.e. rotation happen around world frame move trans(100,0,0,0,0,0):rx(30)

Translate 100 mm down the original world X, and then a 30 degree rotation

I.e. rotation happen around tool frame

Page 7: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Tool Transformations/Frames The tool frame is

located on the tool flange.

Usually the tool frame is moved to an appropriate location in the tool. Allows for better tool control

tool trans(X,Y,Z,Yaw,Pitch,Roll) X,Y,Z,W,P,R are manually determine by user.

Page 8: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Tool Transformations

IMPORTANT: Always assign the tool transformation before you teach points AND before you visit those points.

All motion instructions after the tool trans declaration use that tool frame.

The tool can be redefined at any point in the program with another tool trans statement

Page 9: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Tool Transformation Example

What is the tool trans for this tool?

Original tool frame on flange

Desired location of tool frame

Page 10: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Generic Frames A coordinate system, or frame, can be

created in V+ by teaching 3 locations An origin, origin. A location on the X axis, x. A location on the Y axis, y.

set f = frame(origin, x, y, origin) The first parameter is where X and Y cross. This

is usually the origin, but you can move this up or down.

Page 11: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

More on Frames Be careful when moving to a frame. Consider trying to touch the origin of the

frame in the picture with the tip of tool. move f

Will crash the arm in the box move f:trans(0,0,0,0,180,0)

Will align Zs properly

Page 12: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Approaching and Departing Locations appro(A, 50) or appros(A,50)

Go to a location 50 mm “above” A, where “above” is along the Z axis associated with A

depart(50) or departs(50) Move 50 mm away from the current location along

the location’s Z axis.

Page 13: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

VAL3

Page 14: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Tool Transformations/Frames Any number of tool transformations can be

defined as global variables

1. Cursor to “flange”

2. Press “New” Key

- Give the tool transformation a name, for example, “mytool”

Page 15: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Manually Enter X, Y, Z, W, P, R…

Page 16: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Tool Transformation and Motion

Every motion instruction must include a tool transformation as a parameter: movej(somePoint, mytool, motionDescription) movel(somePoint, mytool, motionDescription) movec(viaPoint, somePoint, mytool, motionDescription)

No guesswork!

Page 17: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

• Transformation Variable trsf enables to make computation on

Cartesian points• Ex : Approach on point, Shift in pallet, Compose a new point, ….

• 6 numeric field : x, y, z, rx, ry, rz

• If trsf trShift is defined, two possible ways to populate it with values:

trShift={0,0,-100,0,0,0}

or trShift.x=0 trShift.y=0 trShift.z=-100 trShift.rx=0 ...

Defining Transformations

Not possible to make motions on trsf!! Used ONLY for computation on Cartesian !!

Page 18: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

POINT ← appro(POINT,TRSF) APPRO computes a Cartesian point related to a point on which is applied a transformation

Apply a Transformation using APPRO

pX

Z tool

X pPick-100

Or: movej(appro(pPick,trShiftz),tGrip,mFast)

Or:movej(appro(pPick,{0,0,-100,0,0,0}),tGrip,mFast)

POINT p POINT pPick TRSF trShiftz NUM nDistance=100 are definedtrShiftz={0,0,-nDistance,0,0,0}

p=appro(pPick,trShiftz)

movej(p,tGrip,mFast)

Page 19: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Transformation Example 1

100

180 12

X

ZpPick 3

movej(appro(pPick,{180,0,-100,0,0,0}),tGrip,mSlow) 1

3movel(pPick,tGrip,mSlow))

2movel(appro(pPick,{0,0,-100,0,0,0}),tGrip,mSlow)

Page 20: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Transformation Example 2

movel(pPick,tGrip,mSlow) 1

1

Z

X

pPick

X

ZpPick

2- 20°

2movel(appro(pPick,{0,0,0,0,-20,0}),tGrip,mSlow)

(Blend =off)

Page 21: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Generic Frames

Importance:

The robot is in production,

The application is working at

full capacity, but ….

Joe is driving the forklift and ...

!!!! DISASTER !!!!!

… one day for re teaching locations..

Except if ...

Page 22: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Frame Creation

Local Coordinate system :

• to make points re teaching easier

• used to duplicate locations

• shift of points in a pallet

Page 23: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Frame Teaching

fPallet

X

YX

Y

World

Axis x

Axis y

Origin

Defined with 3 points to teach :

• Use a precise tool : pointer

• Define this tool as current

• Teach points as far as possible

each other (+ accurate)X

Y

Page 24: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

POINTS IN A FRAMETeach points using the frame so that they are created in the tree branch of the frame.

• During teaching coordinates are displayed in frame reference

• For the move instruction, it is not

needed to specify the frame:

movej(pA ,tGrip, mFast)

fPallet

X

YX

Y

World

pA

Page 25: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Setting a Frame in the Program

nError = setFrame(pOrigin, pX, pY, fRef)

Frame to compute(A Pass-by-Reference Parameter)

3 points O, X, Y

Error Code :

0 : no error-1 : ptX too close to ptOrigin-2 : 3 points are nearly aligned

Page 26: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Compose can be used to define a new point in the frame

5080

fPallet

X

Y

Compose(point,frame,trsf) : compute a point shifted

by trsf expressed in frame

X

Y

World

p=compose(pFirst,fPallet,{160,50,0,0,0,0})

movel(p ,tGrip,mSlow)

Page 27: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Using 2 Identical Frames

fRef1X

Y

To use a point with same

coordinates in 2 frames :

• Create a point in each frame

• Teach one of the point

• Copy trsf of point in second one

X

Y

World

fRef2

XY

pRef2.trsf=pRef1.trsf

Page 28: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

TPP

Page 29: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining the Tool Transformation/Frame The tool coordinate system is defined by

using the frame setup screen or changing the following system variables.

Ten tool coordinate systems can be defined. The desired one can be selected. $MNUTOOL [ 1, i ] (Frame number i = 1 to 10) is

set the value. $MNUTOOLNUM [ group ] is set the used tool

frame number. Three ways to set a tool frame.

Page 30: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Navigate to the Tool Offset Menu Press the MENU key on the teach pendant and then

navigate to SETUP -> FRAMES.

Page 31: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

You can define up to 10 tool frames Select the one you want to define and click DETAIL.

SETIND sets the current tool frame.

Page 32: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Choose which method you want to use to define the tool frame

Page 33: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Direct (Manual) Method – just type in the X, Y, Z, W, P, R values

Page 34: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Three Point Method Defines the only X, Y, Z location of the tool

center point (TCP). Teach three points that approach the TCP

from different angles The bigger difference in the angles the better.

Use a stationary point. There is no “built-in” three point method in V+

… Exercise: Figure out how to do this in V+/VAL3

Page 35: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

The Three Point Method Idea

Page 36: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Think about the Geometry/Math

Page 37: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu
Page 38: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

TPP walks you through the three point method

The three points to be taught

Page 39: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Six Point Method

Page 40: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Setting the Tool Frame in a Program A taught location can only be revisited if the

active tool frame is the same one it was taught with. The program will generate a run time error if a

different tool frame is active. The tool frame can be changed in the

program using the UTOOL_NUM = … command. To find this, press [INST], then:

Page 41: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Setting the Tool Frame in a Program Set the appropriate

tool frame before the motion instruction

Taught using tool frame 2

Taught using tool frame 1

Page 42: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Generic Transformations/Frames In TPP, you can define “offsets” which can be

applied to any motion command. It can be inserted directly in the motion

command. Example - move to location p[1] with an offset

located in position register 2 (pr[2]):

Page 43: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Step-by-Step Example: Offsets

Recall the previous program a couple slides back:

Let’s add an offset/transformation so that the point P[3] is visited with a -50 Z translation and a 20 degree Yaw rotation (around X).

Page 44: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining the Offset in a Position Register.

1) Press Data Key

2) Press |TYPE| (F1) and cursor to Position Reg

Page 45: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Enter the values: 0,0,-50,20,0,0 and press done when finished

Page 46: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Modifying the Motion Instruction

Press Edit key to get back to program and cursor over to the end of the desired motion instruction. Then press CHOICE.

Page 47: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Navigate to Offset, PR[…]

Page 48: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Finish Inserting the Offset P[3] is now visited with an offset of -50 in tool Z

and a Yaw of 20 degrees.

Page 49: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Offset VERSUS Tool_Offset

Offset Performs the transformation w.r.t the world

coordinate system Tool_Offset

There is also a “Tool_Offset” that you can navigate using the menus which performs the transformation w.r.t the tool coordinate system.

Page 50: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Defining Generic Frames Called User Frames in TPP, these frames are defined

and used almost exactly like how tool frames are. Like with tool frames, navigate to Frames:

Page 51: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

If you are still looking at the tool frames, press the |OTHER| function key and choose User Frame

Page 52: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Manually Enter in the User Frame data or use one of the built-in methods

Page 53: Transformations in V+, VAL3, and TPP Sebastian van Delden USC Upstate svandelden@uscupstate.edu

Selecting the User Frame

Just go back to your program, and insert the

UFRAME_NUM = …

command similar to how a tool frame is declared in the program.