Upload
wellington-souza
View
226
Download
0
Embed Size (px)
Citation preview
8/19/2019 irVision Fanuc
1/38
8/19/2019 irVision Fanuc
2/38
Basic Introduction
• The FANUC robot is a LRMate 6 axis robotic arm with R-30iA Mate controller.
• The robot can be controlled using a teaching pendant.• THe teaching pendant is used to increment each joint
angle. The speed of the robot can also be changed here.
8/19/2019 irVision Fanuc
3/38
Control Block diagram
MATLAB VisualBasic
PCDKlibraries
RobotController
MATLAB isused tocalculate orgeneratethecoordinatesof the endeffector
Thecoordinatesare thentransferredto VB wherethe programto move therobot iswritten.
Thecompilationof theprogramuses thePCDKlibraries tocall therequiredfunctions.
Theprogram isthentransferredto the robotcontroller,whichmoves therobot.
8/19/2019 irVision Fanuc
4/38
Form And Code
8/19/2019 irVision Fanuc
5/38
Code's Structure
First we made buttons on the form and the by definingsome functions for those buttons we tried to programthe robots motion.
Outlines:1) Through IP gets Connected2) Joint angles are determined3) Gripper position is determined4) End effector is moved
8/19/2019 irVision Fanuc
6/38
8/19/2019 irVision Fanuc
7/38
We have defined a new user frame. According to
this user frame we want to move the robot. Also we want to take images and calibrate them.The coordinates of this user frame relative to
world frame and joint position are in thispicture:
Define your desired
User Frame on TeachPendant
8/19/2019 irVision Fanuc
8/38
iRvision
8/19/2019 irVision Fanuc
9/38
8/19/2019 irVision Fanuc
10/38
8/19/2019 irVision Fanuc
11/38
iRvision : By typing the " IP "(192.168.1.18) of the robotcontroller on the address bar we can get access to the
iRvision software:
Put the IP in
the address bar
8/19/2019 irVision Fanuc
12/38
First of all we have to calibrate the images that weget from the camera by starting a new calibrationprocedure:
This button is for creation of CameraCalibration tools, because of softwareissues, it has no specific shape on it.
Created as a newCalibration Tool
8/19/2019 irVision Fanuc
13/38
With the sheet that belongs to the calibration method wecalibrate the images (note that robot's gripper has to be sat in
the origin of the user frame when the procedure is going on). Also note to the data and combo bar's adjustments:
8/19/2019 irVision Fanuc
14/38
Read the gradespacing from
here
8/19/2019 irVision Fanuc
15/38
Focal distance is an
important parameter, which can be foundfrom Fujinon's catalogue. It has to beright to give us correct"Z" height.
Note to the camera andapplication frame(userframe)'s positions :
The height of Camerarelative to the
Calibration Grid(Surface)These data are generated after
setting the setup (you canalways check for their validity)
Read it fromFujinon’sCatalogue
8/19/2019 irVision Fanuc
16/38
Calibration gives the coordinate of points on the
screen:
Coordinatesof
CalibrationPoints
8/19/2019 irVision Fanuc
17/38
Points coordinations bar
from a closer sight:
X
Y
Origin
8/19/2019 irVision Fanuc
18/38
Don't forget to save the calibrationprocedure aftercompletion ofcalibrating
procedure. After removing thecalibration sheet, we still can see thecalibrated points are on the screen:
Save the Calibration after you are done with it.
8/19/2019 irVision Fanuc
19/38
8/19/2019 irVision Fanuc
20/38
In the beginning there is one GPM locator that can only beadjusted to detect one specific object , you can see the adjustmenttoolbar in the next slide for this specific object among the otherobjects.
After adjusting thesearch window press OKRed box
search window
Set the search window
8/19/2019 irVision Fanuc
21/38
One should use the application foreach button from the manual. Inbrief, three buttons have the mostapplication:
1)Teach Pattern2)Set Origin3)Set Search Window
8/19/2019 irVision Fanuc
22/38
After setting the
adjustments wecan detect thespecific objects among the otherobjects ; byadjusting thecontrast we candetect the other 3similar objects.
Not detectedbecause of low
contrast
Not detectedbecause it’s out ofthe search window
FindingModel ID 1
8/19/2019 irVision Fanuc
23/38
Here the contrast has
been adjusted and theseven similar objectshave been detected bythe process. Note thatthe 8th object is out ofthe blue search window which wasadjusted in the previoussteps, so, it has not been
detected.
FindingModel ID 1
8/19/2019 irVision Fanuc
24/38
Here we have three
kinds of objects , inthe following slides we are going todetect each one ofthem, here objectsmodel id 1 havebeen detected:
8/19/2019 irVision Fanuc
25/38
You can add new GPM (geometricpattern match) locator tools foreach new object. Then, just adjustthe pattern, origin and the search window if it is necessary.
8/19/2019 irVision Fanuc
26/38
The new object is
detectedaccording to itsGPM locator:
FindingModel ID 2
8/19/2019 irVision Fanuc
27/38
GPM locator adjustment and
the 3rd detected object in theimage:Finding
Model ID 3
8/19/2019 irVision Fanuc
28/38
After everything is done with the GPM locators we candetect all the objects together:
8/19/2019 irVision Fanuc
29/38
Each item has its own number on the screen; here wehave
eight objects of model id 1,one of model id 2 andone of model id 3 :
Use the propercalibration (check
slides 12-18)
8/19/2019 irVision Fanuc
30/38
The coordinate of items
relative to thecalibration grid frameand model id numbers aresorted in the table belowiRvision's screen:
8/19/2019 irVision Fanuc
31/38
Example:In this random
image, we want todetect objects ofmodel id 1 amongthe other objects:
8/19/2019 irVision Fanuc
32/38
Using the FTP connection betweenPC and robot'scontroller, we can
generate this picture:
8/19/2019 irVision Fanuc
33/38
Detected model id 1 objectsamong the other ones; compare
the pictures:
Not detectedbecause it’s out ofthe search window
8/19/2019 irVision Fanuc
34/38
We can open the generated picture with MATLAB andusing the image processing commands detect the origin of each cross :
The directory in
8/19/2019 irVision Fanuc
35/38
The directory in which the FTP
generated pictureis.
8/19/2019 irVision Fanuc
36/38
Pixel Coordinates of 7 th detected object’s middle
cross
8/19/2019 irVision Fanuc
37/38
Origin of the cross
has been detected,and a dot has beensat up there to showthat we can have theorigin coordinates ofeach detected items.
In this picture you seethe dot points in themiddle of crosses:
Dots in the middleof the crosses to
show that weknow their exactpixel coordinates
8/19/2019 irVision Fanuc
38/38
1) Making difference among the crosses for different
objects .
2) Transferring the pixel coordinates to Matlab 2-D .3) Moving the gripper of the robot to the top of the
object and picking it up and then, putting it in adesired location.
The future goals are: