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).
- RobotStudio version 5 or higher
- Datasheet ABB IRB 140
- ABB IRB 140 industrial manipulator
- ABB IRC5 controller
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.
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.
These components allowed us to use more complex geometries as shown in the image above, as the marker is tilted at
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.
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
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.
For tool calibration we used a method with 4 points to define TCP and 1 elongator point to define
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
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$
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.
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 | |||
---|---|---|---|
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
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]];
Three basic motion instructions are used to define a path in RobotStudio:
- MoveJ: Move the robot to a target position interpolating the joint configuration in joint space.
MoveJ ToPoint,Speed,Zone,Tool;
- MoveL: Move the robot to a target position interpolating the joint configuration in Cartesian space.
MoveL ToPoint,Speed,Zone,Tool;
- 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.
MoveJ Home,v1000,z100,tool0;
- Brayan: The robot moves along to B letter:
MoveJ P5,v1000,z0,toolBJC\WObj:=whiteBoard;
MoveL P2,v100,z0,toolBJC\WObj:=whiteBoard;
MoveL P1,v100,z0,toolBJC\WObj:=whiteBoard;
MoveC P6,P5,v100,z0,toolBJC\WObj:=whiteBoard;
MoveC P7,P4,v100,z0,toolBJC\WObj:=whiteBoard;
MoveL P3,v100,z0,toolBJC\WObj:=whiteBoard;
MoveL P2,v100,z0,toolBJC\WObj:=whiteBoard;
- Julian: The robot moves along to J letter:
MoveJ P8,v1000,z0,toolBJC\WObj:=whiteBoard;
MoveL P9,v100,z0,toolBJC\WObj:=whiteBoard;
MoveL P10,v100,z0,toolBJC\WObj:=whiteBoard;
MoveC P11,P12,v100,z0,toolBJC\WObj:=whiteBoard;
- Cristian: The robot moves along to C letter:
MoveJ P13,v1000,z0,toolBJC\WObj:=whiteBoard;
MoveC P14,P15,v100,z0,toolBJC\WObj:=whiteBoard;
MoveC P16,P17,v100,z0,toolBJC\WObj:=whiteBoard;
MoveC P18,P19,v100,z0,toolBJC\WObj:=whiteBoard;
Note: These instructions are made with respect to the
whiteBoard
workbject and with thetoolBJC
tool.
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]]];
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:
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:
RoboticaV3.mp4
- Professor: Felipe Gonzalez
- Monitor: Manuel Lugo