sir library

24
7/27/2019 Sir Library http://slidepdf.com/reader/full/sir-library 1/24 Software Library for the SIR-1 Serial Port Controlled Robot Andrew Rosca University of Bridgeport 

Upload: priyanksadasivuni

Post on 02-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 1/24

Software Library for the

SIR-1 Serial PortControlled Robot

Andrew Rosca

University of Bridgeport 

Page 2: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 2/24

Purpose of the Project

•Functionality can be added to a simple,

limited robot through software

•Outline of the problems and pitfalls•Software control means flexibility and

remote operation

•Why SIR-1?

Page 3: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 3/24

In This Presentation

•The SIR-1 Robot

•Limitations and Problems, Challenges

•The Inverse Kinematics Problem

•Enhancing the Command Set

•Abstract of the Function Library

Page 4: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 4/24

The SIR-1 Robot

• 5 DOF

• 6 electrical motors (1 for 

gripper)• 5 mechanical limit sensors, 1

optical limit sensor (wrist roll)

• Programmable controller unit with programming pad,

RS-232 serial interface

Page 5: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 5/24

Work Envelope of the

SIR-1

X

 Y

Z

Z

X

 Y

Page 6: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 6/24

Controller Unit

•Controller Unit receives signals regarding robot linkstatus, but does not convey it to the serial

interfacesignificant drawback for a software interface

•Receives simple ASCII commands for moving the links,

setting movement speed, etc.

to robotto PC COM

port

Page 7: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 7/24

Software InterfaceProblems and Limitations

•No information about the link position or status is received

from the controller —the software is ―blind‖ 

•The home configuration can be changed via the

hardwaresoftware must be updated with the current home

•Robot must be homed before receiving any move

commands from the software (can be done by the program)

•Movement commands do not specify magnitude in degrees,but ―steps‖ 

•Number of steps each link can move is unlimited (!) (a

physical limit exists)

Page 8: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 8/24

Software Interface

Problems (continued)

•Simple conversion from ―steps‖ to degrees 

•Number of steps each link can move determinedexperimentally

•Number of degrees each link can move specified in SIR-

1 documentation (verified experimentally)

•Inverse Kinematics

Non-classic mathematical model

Page 9: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 9/24

Mathematical Model

Classic Model

 As one angle is

increased, all

other anglesremain constant

with respect to

the previous link

SIR-1

 As one angle is

increased, all

other anglesremain constant

with respect to

the horizontal

CONST CONST

Page 10: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 10/24

Mathematical Model 

 z 

 y

 x

P

E

S

B

R

900

lB

lS

lE

lR

lG

DK equations can be

derived directly fromthe geometrical

model

Page 11: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 11/24

Direct Kinematics

Equations

x = (lS cos S + lE cos E + lP cos P + lG sin P sin R ) cos B 

y = (lS

cos S

+ lE

cos E

+ lP

cos P

+ lG

sin P

sin R

) sin B 

z = lB + lS sin S + lE sin E + lP sin P - lG cos P cos R

Constraints can be set by specifying wrist PITCH

and ROLL (P and R) 

Page 12: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 12/24

With specified values for P and R

x = (lS cos S + lE cos E + lP cos P + lG sin P sin R ) cos B

y = (lS cos S + lE cos E + lP cos P + lG sin P sin R ) sin B

z = lB + lS sin S + lE sin E + lP sin P - lG cos P cos R

Inverse Kinematics

K1 

K1 

K2 

Page 13: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 13/24

x = (lS cos S + lE cos E + K1 ) cos B

y = (lS cos S + lE cos E + K1 ) sin B

z = lS sin S + lE sin E + K2

y / x = sin B / cos B

B = tan-1 (y / x) 

Inverse Kinematics

Page 14: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 14/24

lS cos S + lE cos E + K1 = x / cos B = y / sin B = T1 

lS sin S + lE sin E + K2 = z 

cos S = (T1  – K1 - lE cos E) / lS T1  – K1 = R1

sin S = (z – K2 - lE sin E) / lS z – K2 = R2

By squaring and adding the two equations

(R1 - lE cos E)2

 + (R2 - lE sin E)2

  = lS2

R1 cos E + R2 sin E = R12 + R2

2 + lE2  – lS

2

Inverse Kinematics

R

Page 15: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 15/24

cos E = (1 – t2) / (1 + t2) sin E = (2t) / (1 + t2)

t = tg (E / 2)

R1  – R1t2 + 2tR2 = R + Rt2 

Quadratic equation with 2 solutions, one is

discarded as being outside the work envelope.

E = 2 tan-1 t

S = sin-1 [(z  – K2 - lE sin E) / lS]

Inverse Kinematics

Page 16: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 16/24

Programming

SIR-1 accepts commands from serial port as

 ASCII strings

For instance:

M 100, 0, 0, 0, 0, 0

will move the first link (base rotation) 100 steps

M 100, 0, 0, 0, 34, 0

S 0, 345, 0, 0, 5, 0

Page 17: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 17/24

Available Commands

M --moves links a certain number of steps 

S --sets the speed of links 

P --pauses the robot H --sends robot to home position 

T --switches to ―teach mode‖ 

Relatively scarce set of commands—enhanced

through additional overhead on the PC

Page 18: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 18/24

Enhancements

Conversion from steps to degrees

• Accomplished through simple proportional

correspondence

Current and limit positions•maintained in variables that keep track of all

commands that have been issued since the

last time the robot was homed

Individual link movement and speed setting

•By using the basic commands

Inverse kinematics capability

Page 19: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 19/24

Function Library

int SIR1_Handshake() Initiates communication with robot. 

int SIR1_MoveLink(link L, int degrees) 

Moves one link a specified number of degrees.int SIR1_MoveRobot(int AlphaBase, int AlphaShoulder,

int AlphaElbow, int AlphaPitch, int AlphaRoll, int

PercentGripper) 

Moves all links a specified number if degrees.void SIR1_HomeRobot(); 

Sends robot to HOME position.

Page 20: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 20/24

Function Library

int SIR1_GotoXYZ(int X, int Y, int Z, int ROLL, intPITCH); 

Moves the center of the gripper fingers to coordinates

X, Y, Z, with a specified roll and pitch of the gripper 

segment.void SIR1_SetSpeedLink(link L, SPEED S); 

Sets the speed of a link to a specified value.

void SIR1_SetSpeedLinks(SPEED B, SPEED S, SPEED

E, SPEED P, SPEED R, SPEED G); 

Sets the speed of each link to a specified value.

Page 21: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 21/24

Function Library

int SIR_SetSpeedRobot(SPEED S); 

Sets the speeds of all links to the specified value.

void SIR1_Pause(int TIME); 

Pauses robot for 1/100 * TIME seconds.

int SIR1_LinkPosition(link L); 

Returns the position of each link (in degrees) relative to

the absolute system of coordinates defined for the robot.

void SIR1_SetPort(int port); Sets the address of the port we are talking to.

int SIR1_IsActive(link L); 

Checks to see if link L is active. 

Page 22: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 22/24

Sample Application

Page 23: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 23/24

•Although the SIR-1 is not well suited for real-life

projects, it illustrates important principles

•Software platform (ANSI C / Windows 9x)

•Other implementations

•Future possible improvements and plans

Conclusions

Page 24: Sir Library

7/27/2019 Sir Library

http://slidepdf.com/reader/full/sir-library 24/24