cychitivav / industrial_robotics

RobotStudio modules to perform a trajectory with an ABB irb140 robot in several workobjects. Fourth practice lab for Robotics class at Universidad Nacional of Colombia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Industrial robotics

This repository contains the development of the laboratory practice of the robotics class at the Universidad Nacional de Colombia. This practice consists of using the industrial manipulator ABB IRB 140 to traverse a path on a paper and draw the initials of the name of each team member (BJC).

Materials

  • RobotStudio version 5 or higher
  • Datasheet ABB IRB 140
  • ABB IRB 140 industrial manipulator
  • ABB IRC5 controller

Tool design

In order to write on the paper it is necessary to create a tool that is suitable for the flange of the manipulator and that can hold a marker pen. Consequently, it was necessary to review the manipulator datasheet to know the dimensions of the flange along with the location and type of screws to fix the tool.

flange flange

Based on these dimensions we started to design a tool. Initially it was thought to use additive manufacturing to print the structure where the marker goes, but there was a doubt if the piece would be strong enough and not break. Therefore, it was decided to use CPVC pipe for cost and ease of obtaining the components.

tool
OnShape CAD Model

These components allowed us to use more complex geometries as shown in the image above, as the marker is tilted at $45\degree$. CPVC pipe was chosen, as the PVC pipe is a little wider and the markers did not fit properly.

Tool creation in RobotStudio

In order to add the tool to the RobotStudio library, the CAD model was exported to .SAT format, which is correctly read in this software as a single part. For this purpose, an empty station is created and with the help of the import geometry option in the modeling tab, the tool is added to the station.

import geometry window

Once the part is imported, it must be positioned so that the world coordinate frame coincides with that of the manipulator flange. In addition, a frame is added at the location where the TCP (Tool Center Point) is located. To orient the part, it is sufficient to make a rotation in the $z$ axis, while to place the TCP it was necessary to create the frame at the end of the pen housing and then move it to the tip of the pen.

With the TCP created, proceed to create the tool, for this, in the modeling tab, select the option to create tool. After selecting this option a popup window appears where the mass and moments of inertia of the part (provided by the CAD software) are added, then the TCP is added and click on Done.

In order to use the tool for other applications, it is saved in the personal library.


Calibration

For tool calibration we used a method with 4 points to define TCP and 1 elongator point to define $z$ axis. The first is to position robot at home, later we assembly own tool in the robot flange and last we put the reference tip on the floor inside of workspace robot, The idea is that the tip remains still, so we glue it to the floor.


Reference Tip

Now we can use the flexpendant to control robot joints manually and in this way make the TCP reach the reference tip as we can see it in the following image:

Once the reference tip is reached, the information of the current position of the TCP must be saved, then we look for another orientation for TCP and we repeat the previous procedure until we have saved the four required points. Finally, to define the elongator point we must leave the tool in a vertical position to bring it closer to reference tip,as shown in the following image:

When the 4 points and $z$ are defined, tool data is created, also in this moment we can observe the error between the measurements. Finally, with this position the controller compute the tool transformation matriz.

$$ \text{Mean error} = 0.353\ mm $$

Manual calibration vs. RobotStudio calibration

Using the CAD model you can locate the TCP in RobotStudio as defined in section tool in RobotStudio, this way we find:

  • Position:
    • $x=12.254\ mm$
    • $y=-0.002\ mm$
    • $z=214.736\ mm$
  • Orientation
    • $q_1=0.923879533$
    • $q_2=0$
    • $q_3=0.382683432$
    • $q_4=0$

Whereas with manual calibration, we find:

  • Position:
    • $x=7.62994\ mm$
    • $y=4.36555\ mm$
    • $z=211.035\ mm$
  • Orientation
    • $q_1=0.819285$
    • $q_2=0.523964$
    • $q_3=-0.19619$
    • $q_4=-0.125471$

Path planning

In order to write on the paper, the robot has to follow a path which is described by the following waypoints

These waypoints are called targets in RobotStudio.

Targets

The targets in RobotStudio not only contain the position of the waypoints, they have two other properties that are very important: the orientation with which they arrive at that position and the configuration of the robot.

The position of each point on the path is as follows:

Point $x(mm)$ $y(mm)$ $z(mm)$
$P_1$ $35$ $135$ $0$
$P_2$ $35$ $85$ $0$
$P_3$ $35$ $25$ $0$
$P_4$ $60$ $25$ $0$
$P_5$ $55$ $85$ $0$
$P_6$ $75$ $115$ $0$
$P_7$ $85$ $60$ $0$
$P_{7u}$ $85$ $60$ $30$
$P_8$ $100$ $135$ $0$
$P_9$ $145$ $135$ $0$
$P_{10}$ $145$ $50$ $0$
$P_{11}$ $125$ $25$ $0$
$P_{12}$ $100$ $50$ $0$
$P_{12u}$ $100$ $50$ $30$
$P_{13}$ $220$ $110$ $0$
$P_{14}$ $225$ $125$ $0$
$P_{15}$ $210$ $133$ $0$
$P_{16}$ $180$ $120$ $0$
$P_{17}$ $162$ $40$ $0$
$P_{18}$ $190$ $25$ $0$
$P_{19}$ $210$ $50$ $0$

Note: The points containing the subindex $u$ (e.g., $P_{7u}$), are positions that are used to lift the tool so as not to scratch the paper while changing letters.

The orientation for each point is defined normal to the surface, i.e. in the $-z$ direction of the workobject. While the configuration is defined as $(0,-1,0,1)$, which corresponds to the right shoulder, elbow up and wrist down configuration. The syntax for defining a tool in RobotStudio is as follows:

tooldata name:=[robhold,tframe[[x,y,z],[q1,q2,q3,q4]],tload[mass,cog[x,y,z],aom[q1,q2,q3,q4],Ix,Iy,Iz]];

Paths

Three basic motion instructions are used to define a path in RobotStudio:

  1. MoveJ: Move the robot to a target position interpolating the joint configuration in joint space.
    MoveJ ToPoint,Speed,Zone,Tool;
    
  2. MoveL: Move the robot to a target position interpolating the joint configuration in Cartesian space.
    MoveL ToPoint,Speed,Zone,Tool;
    
  3. MoveC: Move the robot to a target position on a circular path passing through an intermediate point.
    MoveC CircPoint,ToPoint,Speed,Zone,Tool;
    

In addition, this instructions can receive a \wobj parameter, which is a workobject defined in RobotStudio, in which the trajectory will be carried out.

in this case, the trajectory is performed in 3 stages (one for each letter) plus an approach stage:

  • Approximation: The robot moves to home.
    1. MoveJ Home,v1000,z100,tool0;
  • Brayan: The robot moves along to B letter:
    1. MoveJ P5,v1000,z0,toolBJC\WObj:=whiteBoard;
    2. MoveL P2,v100,z0,toolBJC\WObj:=whiteBoard;
    3. MoveL P1,v100,z0,toolBJC\WObj:=whiteBoard;
    4. MoveC P6,P5,v100,z0,toolBJC\WObj:=whiteBoard;
    5. MoveC P7,P4,v100,z0,toolBJC\WObj:=whiteBoard;
    6. MoveL P3,v100,z0,toolBJC\WObj:=whiteBoard;
    7. MoveL P2,v100,z0,toolBJC\WObj:=whiteBoard;
  • Julian: The robot moves along to J letter:
    1. MoveJ P8,v1000,z0,toolBJC\WObj:=whiteBoard;
    2. MoveL P9,v100,z0,toolBJC\WObj:=whiteBoard;
    3. MoveL P10,v100,z0,toolBJC\WObj:=whiteBoard;
    4. MoveC P11,P12,v100,z0,toolBJC\WObj:=whiteBoard;
  • Cristian: The robot moves along to C letter:
    1. MoveJ P13,v1000,z0,toolBJC\WObj:=whiteBoard;
    2. MoveC P14,P15,v100,z0,toolBJC\WObj:=whiteBoard;
    3. MoveC P16,P17,v100,z0,toolBJC\WObj:=whiteBoard;
    4. MoveC P18,P19,v100,z0,toolBJC\WObj:=whiteBoard;

Note: These instructions are made with respect to the whiteBoard workbject and with the toolBJC tool.

Workobjects

If you want to repeat the path in another position, you can redefine the waypoints in this other position. When you have only a few points, this task can be relatively easy, but when you have several points, the task becomes more time-consuming. For this reason, in RobotStudio we create workobjects, reference frames that can be modified and when the workobject is moved, all the paths defined with respect to it, the controller performs the calculations to find the inverse kinematics in these new points. The syntax for defining a workobject in RobotStudio is as follows:

wobjdata name:=[robhold,ufprog,ufmec,uframe[[x,y,z],[q1,q2,q3,q4]],oframe[[x,y,z],[q1,q2,q3,q4]]];

Robotics toolbox

With the coordinates defined, the peter corke toolbox can be used to perform another visualization, although it has a drawback, the inverse kinematics for robots with the Denavit-Hartenberg convention is not analytically defined. This causes the simulation to jump between configurations because the configuration cannot be defined. The results in the toolbox are:

Video

Using the simulator, we found that the tool correctly traversed the path, but in practice not everything is perfect, so for the inclined plane we adjusted the surface to match as closely as possible (in addition to the spring mechanism inside the marker support to counteract surface irregularities). The development in the lab can be seen in the following video:

YouTube video

RoboticaV3.mp4

Contributors

Acknowledgements

About

RobotStudio modules to perform a trajectory with an ABB irb140 robot in several workobjects. Fourth practice lab for Robotics class at Universidad Nacional of Colombia

License:MIT License


Languages

Language:Batchfile 70.7%Language:AMPL 14.8%Language:Python 14.6%