fanuc lr mate 200i simulation and modeling

22
Fanuc LR Mate 200i Simulation and Modeling ME 349: Robotic Manipulators By: Amit Raj Thatipalli Raymond Manis

Upload: grupomecatronica

Post on 10-Apr-2016

138 views

Category:

Documents


9 download

DESCRIPTION

Modelling the kinematics of a robot

TRANSCRIPT

Page 1: Fanuc LR Mate 200i Simulation and Modeling

Fanuc LR Mate 200i Simulation and Modeling

ME 349: Robotic Manipulators

By:Amit Raj Thatipalli

Raymond Manis

Dr. Douglas BristowAssistant Professor, Mechanical Engineering

Department of Mechanical and Aerospace EngineeringMissouri University of Science and Technology

May 13th, 2010

Page 2: Fanuc LR Mate 200i Simulation and Modeling

Copyright © 2010 Amit Raj Thatipalli, Raymond Asa Manis. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

A copy of the license is included in the section entitled "GNU Free Documentation License".

2

Page 3: Fanuc LR Mate 200i Simulation and Modeling

Table of ContentsIntroduction…………………………………………………………………………….4

Procedure……………………………………………………………………………….4

Denavit-Hartenberg Convention Method……………………………………….4

Thatipalli-Manis Simulation Method……………………………………………5

Robot Measurements……………………………………………………………6

Blender Codes………………………………………………………………….12

Results………………………………………………………………………………….17

Summary and Conclusion……………………………………………………………....17

Future Work…………………………………………………………………………….18

References………………………………………………………………………………18

3

Page 4: Fanuc LR Mate 200i Simulation and Modeling

z

y

x

x

y

z

z

x

yy

x

z y

x

zz y

x

x

yz

IntroductionFor the ME349 project, modeling and simulation of the Fanuc LR Mate 200i in the robotics lab was chosen. Much insight and information about the manipulator was gleaned from modeling and simulating the robot. Information about how the manipulator moves in the workspace, how the links move in relation to each other, and an overall knowledge of the total movement of the manipulator was found.

To model the manipulator, knowledge of the Denavit-Hartenberg Convention was used. The convention gave a basis for how the manipulator moves in the workspace. Also, the physical information, measurements and orientations, of the manipulator were found. Afterwards, using Blender, a simulation was created to allow the input of angles and an output of the manipulator simulation moving in the workspace.

ProcedureTo begin with, the DH convention for the robotic manipulator was found. There are six links and a tool on the LR Mate 200 I robotic manipulator. Figure 1 shows the DH convention and Table I displays the table of DH variables.

Figure 1: DH Convention Diagram.

Table I: DH Convention Variablesα a d θ0 0 14.321 θ1

-90° 5.711 0 θ2

0 10.388 0 θ390° 3.39 0 θ4 + 90°-90° 8.81 0 θ590° 1.374 0 θ6

4

Page 5: Fanuc LR Mate 200i Simulation and Modeling

z y

x

x

yz

z

y

x

zy

x

z

y

x

z

y

x

z

y

x

The DH Convention could be used to simulate the manipulator. However, in order to simplify the model for future work on the manipulator, a non-rotating frame for each link was used. In other words, the entire manipulator simulation was created by using a standard globally aligned X-Y-Z frame. This greatly simplifies the simulation process by relating each frame to the global frame. Thus, Figure 2 shows the Thatipalli-Manis Simplified Method diagram detailing each frame.

Figure 2: Globally Aligned X-Y-Z Frame Diagram.

Having decided on a globally aligned X-Y-Z frame, the Fanuc LR Mate 200i robotic links were measured and modeled using Unigraphics NX. The measurements and the images were used to create the models to be assembled and simulated.

5

Page 6: Fanuc LR Mate 200i Simulation and Modeling

Figure 3: Fanuc LR Mate 200i Dimensions[1].

6

Page 7: Fanuc LR Mate 200i Simulation and Modeling

Figure 4: Fanuc LR Mate 200i Dimensions[2].

7

Page 8: Fanuc LR Mate 200i Simulation and Modeling

Figure 3: Link 1 of the Fanuc LR Mate 200 using NX.

Figure 4: Link 2 of the Fanuc LR Mate 200i using NX.

Figure 5: Link 3 of the Fanuc LR Mate 200i using NX.

8

Page 9: Fanuc LR Mate 200i Simulation and Modeling

Figure 6: Link 4 of the Fanuc LR Mate 200i using Blender.

Figure 7: Link 5 of the Fanuc LR Mate 200i using Blender.

9

Page 10: Fanuc LR Mate 200i Simulation and Modeling

Figure 8: Link 6 of the Fanuc LR Mate 200i using Blender.

Figure 9: Tool on the Fanuc LR Mate 200i using NX.

10

Page 11: Fanuc LR Mate 200i Simulation and Modeling

Figure 10: Piston mechanism on the Tool using Blender.

These model assemblies had to be modeled such that the coordinate frame and the position of the origins with respect to the respective part should be the rotation point (joint position) for the respective model. Using these link assemblies, they were saved as stereo-lithography files, .stl. Link 4, Link 5, and Link 6, and the piston mechanism were modeled in Blender because of the ease of rotation point control. If the models had not been modeled with respect to the rotational point or the origin, the models could be imported into Blender, and the rotational point or the origin could be changed in Blender. Modeling and taking into account the rotational point is much easier than the latter.

Next, the individual parts were assembled in Blender. The joint positions were calculated using the measurements gathered from the Fanuc LR Mate 200i. Table I shows the measurements from origin to each join position relative to each previous joint. The points had to be calculated in global X-Y-Z frame, and the rotational points of the respective model were placed at the respective joint position. The orientation of the model was manually changed using Euler angles[3]. Next, each link of the robot was named in Blender[3].

After assembly, the ‘parent-child’ relationship[3] for each part was created. Once the relationship between each two adjoining links was created, the base, Link 1, would be the parent for all of the links. In other words, if the base were to move, the rest of the links would rotate as well in the simulation; when the ‘parent’ rotates, the ‘children’ rotate with the ‘parent’. The additional links were created in much the same way.

Next, the Blender code was formulated to allow for simulation. Two sets of codes were formed: a fast simulation that is not very precise, and a slower simulation with a higher resolution of points.

11

Page 12: Fanuc LR Mate 200i Simulation and Modeling

Figure 11: Fanuc LR Mate 200i completed simulation.

Figure 12: Fanuc LR Mate 200i Low Resolution (Fast) Simulation.

 #### authors-Amit Raj Thatipalli & Raymond Asa Manis #### "Copyright 2010 Amit Raj Thatipalli"#This program is free software: you can redistribute it and/or modify#it under the terms of the GNU General Public License as published by#the Free Software Foundation, either version 3 of the License, or#(at your option) any later version.

#This program is distributed in the hope that it will be useful,#but WITHOUT ANY WARRANTY; without even the implied warranty of#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License#along with this program.  If not, see <http://www.gnu.org/licenses/>.

from Blender import *  from Blender import Mathutils as Mathfrom Blender.Mathutils import Matrixfrom math import *try:

12

Page 13: Fanuc LR Mate 200i Simulation and Modeling

  import psyco  psyco.full()except:  print 'For optimal performance on an x86 CPU, install psyco'

linkone= Object.Get('linkone')                 linktwo= Object.Get('linktwo')               

linkthree= Object.Get('linkthree')           

linkfour= Object.Get('linkfour')           

linkfive= Object.Get('linkfive')           

linksix= Object.Get('linksix')           

tool= Object.Get('tool')           

toolpiston= Object.Get('toolpiston')           

######initializing###############max_angle=0theta1=0.0theta2=0.0theta3=0.0theta4=0.0theta5=0.0theta6=0.0theta1_list=[] # creating empty listtheta2_list=[]theta3_list=[]theta4_list=[]theta5_list=[]theta6_list=[]for line in open('angles.txt', 'r'):       ## opens the text file which in the same folder if the text file is in different folder give the path to it example: 'C:\\path to\\angles.txt'    theta1,theta2,theta3,theta4,theta5,theta6 = map( float, line.split(",")) # initializing all the theta angles    theta1_list.append(theta1) #appending theta's to the list created    theta2_list.append(theta2)    theta3_list.append(theta3)    theta4_list.append(theta4)    theta5_list.append(theta5)    theta6_list.append(theta6)

13

Page 14: Fanuc LR Mate 200i Simulation and Modeling

    #####find the max angle of the six angles    find_maxangle=[theta1,theta2,theta3,theta4,theta5,theta6]     for angle in find_maxangle:      if angle<0:         if (angle*-1)>max_angle:           global max_angle           max_angle=-angle      else:         if angle>max_angle:           global max_angle           max_angle=angle####simulation loop#####for j in range(0,len(theta1_list),1):    if j is 0:       theta1=float(theta1_list[j]/max_angle)       theta2=float(theta2_list[j]/max_angle)       theta3=float(theta3_list[j]/max_angle)       theta4=float(theta4_list[j]/max_angle)       theta5=float(theta5_list[j]/max_angle)       theta6=float(theta6_list[j]/max_angle)    theta1_inc=float(theta1_list[j]/max_angle)        theta2_inc=float(theta2_list[j]/max_angle)        theta3_inc=float(theta3_list[j]/max_angle)        theta4_inc=float(theta4_list[j]/max_angle)        theta5_inc=float(theta5_list[j]/max_angle)        theta6_inc=float(theta6_list[j]/max_angle)    for i in range (0 ,  int(max_angle) , 1):                                     linktwo.rot = [0, 0, float(radians(theta1))]##### rotating link two around its pivot point using euler angles               theta1=theta1+theta1_inc                            linkthree.rot =[ 0, float(radians(theta2)), 0]               theta2=theta2+theta2_inc                               linkfour.rot = [0, float(radians(theta3)), 0]               theta3=theta3+theta3_inc               linkfive.rot = [float(radians(theta4)), 0, 0]               theta4=theta4+theta4_inc               linksix.rot = [0, float(radians(theta5)), 0]               theta5=theta5+theta5_inc               tool.rot = [float(radians(theta6)), 0, 0]               theta6=theta6+theta6_inc                toolpiston.rot = [0, 0, 0] ###### there is not rotation here but it is required to

14

Page 15: Fanuc LR Mate 200i Simulation and Modeling

update the object                Redraw()

Figure 13: Fanuc LR Mate 200i High Resolution (Slow) Simulation.

 #### authors-Amit Raj Thatipalli & Raymond Asa Manis #### "Copyright 2010 Amit Raj Thatipalli"#This program is free software: you can redistribute it and/or modify#it under the terms of the GNU General Public License as published by#the Free Software Foundation, either version 3 of the License, or#(at your option) any later version.

#This program is distributed in the hope that it will be useful,#but WITHOUT ANY WARRANTY; without even the implied warranty of#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the#GNU General Public License for more details.

#You should have received a copy of the GNU General Public License#along with this program.  If not, see <http://www.gnu.org/licenses/>.

from Blender import *  from Blender import Mathutils as Mathfrom Blender.Mathutils import Matrixfrom math import *try:    import psyco    psyco.full()except:    print 'For optimal performance on an x86 CPU, install psyco'

linkone= Object.Get('linkone')                  linktwo= Object.Get('linktwo')           

linkthree= Object.Get('linkthree')           

linkfour= Object.Get('linkfour')           

linkfive= Object.Get('linkfive')           

linksix= Object.Get('linksix')           

15

Page 16: Fanuc LR Mate 200i Simulation and Modeling

tool= Object.Get('tool')           

toolpiston= Object.Get('toolpiston')           

######initializing###############theta1=0.0theta2=0.0theta3=0.0theta4=0.0theta5=0.0theta6=0.0theta1_list=[]theta2_list=[]theta3_list=[]theta4_list=[]theta5_list=[]theta6_list=[]for line in open('angles.txt', 'r'): ## opens the text file which in the same forlder if the text file is in difrent folder give the path to it example:'C:\\path to\\angles.txt'    theta1,theta2,theta3,theta4,theta5,theta6 = map( float, line.split(","))    theta1_list.append(theta1)    theta2_list.append(theta2)    theta3_list.append(theta3)    theta4_list.append(theta4)    theta5_list.append(theta5)    theta6_list.append(theta6)####simulation loop#####for j in range(0,len(theta1_list),1):    if j is 0:       theta1=float(theta1_list[j]/320.0)       theta2=float(theta2_list[j]/320.0)       theta3=float(theta3_list[j]/320.0)       theta4=float(theta4_list[j]/320.0)       theta5=float(theta5_list[j]/320.0)       theta6=float(theta6_list[j]/320.0)    theta1_inc=float(theta1_list[j]/320.0)        theta2_inc=float(theta2_list[j]/320.0)        theta3_inc=float(theta3_list[j]/320.0)        theta4_inc=float(theta4_list[j]/320.0)        theta5_inc=float(theta5_list[j]/320.0)

16

Page 17: Fanuc LR Mate 200i Simulation and Modeling

        theta6_inc=float(theta6_list[j]/320.0)    for i in range (0 ,  320 , 1):                                     linktwo.rot = [0, 0, float(radians(theta1))] ##### rotating link two around its pivot point using euler angles               theta1=theta1+theta1_inc                            linkthree.rot =[ 0, float(radians(theta2)), 0]               theta2=theta2+theta2_inc                               linkfour.rot = [0, float(radians(theta3)), 0]               theta3=theta3+theta3_inc               linkfive.rot = [float(radians(theta4)), 0, 0]               theta4=theta4+theta4_inc               linksix.rot = [0, float(radians(theta5)), 0]               theta5=theta5+theta5_inc               tool.rot = [float(radians(theta6)), 0, 0]               theta6=theta6+theta6_inc                toolpiston.rot = [0, 0, 0]###### there is not rotation here but it is required to update the object               Redraw()

The only major difference between the fast simulation and the slow simulation is the maximum angle the manipulator has. The fast simulation moves through the points created by dividing the angle of the link by the largest angle of the six input angles in a single line of the text input; however, the slow simulation moves through the points created by dividing the angle of the link by 320°, which is the maximum angle of rotation of the Fanuc LR Mate 200i robot.

ResultsThe simulation works very well. Using both codes, the manipulator moves fluidly between sets of angle designations. Interfacing with Mr. Adam Nisbett’s “External Robot Control Through a Microcontroller Interface[4]” project, the robot moved through the angles found in the ‘angles.txt’ file, as did the simulation. The speed through which the simulation and robot moved were different because of the speed variability of the robot, and the simulation moved only as fast as the amount of interpolation points provided.

Summary and ConclusionOverall, the project provided insight into the movement of the robot. By knowing how the DH convention worked, the project was found to be much easier to create using a global X-Y-Z frame. The assembly of the manipulator seemed to be the most tedious; finding the points at which each link rotates was a headache, as was the actual assembling of the robot in Blender. Creating the ‘parent-child’ relationships was a pain as well, as knowing how each link manipulates the links farther down the chain was needed. All in

17

Page 18: Fanuc LR Mate 200i Simulation and Modeling

all, the simulation runs well, but more can be done to create a thorough model of the Fanuc LR Mate 200i manipulator.

Future WorkThe project is very open-ended. To begin with, the DH convention could be used to alter the simulation, therefore allowing rotation matrices to be easily entered into the program as well as angles. Also, the use of Jacobians could be integrated into the program to allow control over speed and forces of the links, and perhaps yield a more thorough model of the Fanuc LR Mate 200i. Also, the maximum angles through which each link can move could be entered into the code. Singularities and collision detection could be added into the simulation to ensure proper functioning of the simulation. Instead of angles, Jacobian matrices can be used to create vectors to move the links around using attraction-repulsing fields. Different tools can be modeled into the simulation, to allow simulation of material or metal deposition, milling (Boolean operation available in Blender), etc.

References[1] RobotWorx, May 13th, 2010,http://www.robots.com/showimages.php?type=robots&tag=323&index=5.[2] RobotWorx, May 13th, 2010, http://www.robots.com/showimages.php?type=robots&tag=323&index=4.[3] “Introduction to Modeling,” April 9th, 2010, http://wiki.blender.org/index.php/Doc:Tutorials/Modeling/BSoD.[4] Nisbett, Adam. “External Robot Control Through a Microcontroller Interface,” Spring 2010, Missouri University of Science and Technology.

18