Top Banner
Practical Training in Robotics Program Prof. Dr.-Ing. Uwe Schwiegelshohn Universität Dortmund Institut für Roboterforschung Abteilung Informationssysteme 17.04.2010
31

Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

Sep 12, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

Practical Training in Robotics

Program

Prof. Dr.-Ing. Uwe SchwiegelshohnUniversität Dortmund

Institut für RoboterforschungAbteilung Informationssysteme

17.04.2010

Page 2: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

2

Contents

............................................................................................................................................Program 3.......................................................................................................................Preparation Exercises 4

..............................................................................................................Session 1 Results and kick-.....................................................................................................................................................off 8

.....................................................................................................................................Session 2 C+........................................................................................................................................................+ 9

.............................................................................................Session 3 Safety rules, introduction & .......................................................................................................................................calibration 14..................................................................................................................................Session 4 User

..................................................................................................................................Programming 16.........................................................................................................................Session 5 Simulator-

..............................................................................................................................................basics 17..........................................................................................................................Session 6 Work cell

..............................................................................................................................................model 21..........................................................................................................................Session 7 Towers of

..............................................................................................................................................Hanoi 23Session 8 ............................................................................................................................................................

..............................................................................................................................................Cubes 25Session 9............................................................................................................................................................

......................................................................................................................................Benchmark 28................................................................................................................................................FAQ 29

...................................................................................................................................Bibliography 31

Page 3: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

3

Program

The aim of this lab course is to confront the student with common problems in robotics. All necessary theoretical foundations have been covered in the Fundamentals of Robotics lecture, which is a prerequisite to attend this course, or are explained in the handset, which will be provided at the Institute for Robot Research (IRF). Strong emphasis is placed on self directed learning as this is a necessary skill in future working life. A maximum of ten students can to attend a lab course. Due to this limitation, students have to submit semester count and progress in their studies for their application. Students with a good grades and a good study progress will be preferred. The lab course will consist of ten sessions. Every session will last between four and eight hours. A successful participation can only be certified if the admitted student takes part in all sessions and solves the exercises as requested. Each session needs preparation, i.e. reading of documents mentioned in the session descriptions in advance. The session descriptions will maintain information about what has to be done, but in most cases the solution strategy has to be developed.

Note!

Plagiarism is not allowed. Both the person who copies sections from another person and the person who lets other students copy his or her work will not be rewarded a point for the copied section. The same principle applies in the lab session. If two or more groups produce completely identical solutions during a session, these groups will fail the session.

Page 4: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

4

Preparation Exercises

During the preparation phase some fundamentals of robot kinematics and examples will be recapitulated. Every student has to present a write up in the first session to be able to participate at the lab course. The exercises will cover the following topics:

• Denavit-Hartenberg specifications• Calculation of the forward transformation of a Manutec R15 robot• Calculation of the forward and backward transformation of a SCARA robot on a

movable platform• Movement duration of the axes of a SCARA robot

Read the chapter ‘Preparation’ in the documentation of the handset. Only a printout from a mathematical calculation program like MATLAB is not sufficient as a calculation. Your methods for arriving at an answer should be shown.

Solve the following three exercises.

Preparation Exercise 1

Prepare the modelling of a Manutec R15 robot as shown in the figure 1. The picture on the right is only there to show the position of the axes.

Figure 1: Manutec R15

Page 5: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

5

Page 6: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

6

The positions of the coordinate systems and rotation axis are given as:

WCP: (0.00, 0.00, 0.00 )Axis 1: (0.00, 0.00, --- )Axis 2: (0.00, --- , 750 )Axis 3: (0.00, --- , 1250 )Axis 4: (0.00, 0.00, --- )Axis 5: (0.00, --- , 2080 )Axis 6: (0.00, 0.00, --- )TCP: (0.00, 0.00, 2180 )

• Write down the two rules for placing intermediate coordinate systems according Denavit-Hartenberg.

• Place the DH coordinate systems in the Manutec R15.

• Make a sketch of the Robot with the coordinate systems.

• Derive the DH parameters and put them into a list.

• Calculate the necessary transformation-matrices.

• Write down how you would derive the overall transformation-matrix from WCP to TCP.

• (Calculate the overall transformation-matrix, if you have access to MATLAB or similar software. Check if the solution supports your previous results.)

Hint: If you could do the placement of the coordinate systems easily you made a mistake! It is a difficult example. (But solvable!)

Preparation Exercise 2

A 4 axes SCARA robot is placed on a movable platform, described by the following DH parameters:

Axis Θ D a α1 Θ 1 500mm 100mm 0°2 0° D2+250mm 250mm 0°

• Calculate the forward transformation of the platform using Θ1 = 0° and D2 = 50mm.

• Calculate the backward transformation of the platform.

• Calculate the overall forward transformation of the platform and the attached

Page 7: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

7

robot using Θ1 = 0°, D2 = 50mm, Θ3 = 0°, θ4 = 0°, D5 = 0mm, Θ6 = 0°.

Axis Θ D a α1 Θ1 500mm 100mm 0°2 0° D2+250mm 250mm 0°3 Θ3 720mm 430mm 0°4 Θ4 −150mm 370mm 180°5 0° D5 0 0°6 Θ6 50mm 0 0°

• The introduction of the platform leads to an ambiguity of the system. Describe this ambiguity and its effect on a backward transformation.

• How many possible configurations do you have in general to reach positions? (in the horizontal plane and in height)

• Make a sketch of the reachable area of the robot alone and on it’s platform in top-view.

Preparation Exercise 3

Given is a 4 axes SCARA robot with the following restrictions:

Axis 1 2 3 4Minimum Joint Value −3.06rad −2.80rad −5.00mm −5.00radMaximum Joint Value +3.06rad +2.80rad +400.00mm +5.00rad

Maximum Velocity ±0.4rad/s ±0.5rad/s ±50.0mm/s ±1.0rad/sMaximum Acceleration ±5.3rad/s² ±3rad/s² ±500mm/s² ±10rad/s²

The robot should be moved in a synchro PTP movement form the start position

[0.0rad, 0.0rad, 0.0mm, 0.0rad]

to the end position

[−2.5rad, +2.8rad, +300mm, +2.5rad]

both in joint coordinates. The interpolation cycle is fixed to 30 ms.Your task is the calculation of the movement duration for each axis.

• Calculate the duration of the acceleration and deceleration phase for each axis.

• Calculate the minimum time required for all axes to reach their end position.

• Sketch the velocity and acceleration profile for each axis.

Page 8: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

8

• Calculate the smallest possible time in which all axes have reached their endpoint. This time must be an integer multiple of the interpolation cycle.

• For simplicity assume the acceleration of each axis is constant with the maximum value. Recalculate all plateau velocities talking into account the new movement time as calculated above.

• Recalculate the duration of the acceleration and deceleration phase for each axis.

• Sketch the new velocity and acceleration profile for each axis.

Session 1 Results and kick-off

We will discuss the results of your write ups in the first session. Every group has to present one part of the exercises. The schedule will be made during the meeting. Afterwards there will be a kick-off meeting. Everybody can feel free to ask questions about the upcoming lab course.

Hint: The next session deals with C++. If you are not an expert, it might be good if you bring a C++ book, that can help you solving the exercises. (The computers in the lab have no internet connection.)

Page 9: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

9

Session 2 C++

During the second session you are supposed to write simple programs using the C++ programming language. The basics of C++ will not be discussed here, good books on the topic are [Str97] and [cplne]. The session will cover the following topics:• Implementation of functionalities to store and manipulate DH frames• Implementation of a synchro-PTP simulationFinally, every group will present briefly their solutions which are discussed by the course.

Note!

The computers of in the Lab are used by many people, who log in with the same account. So nobody as the owner knows, if files are of value or not. Please keep all your data in one folder, to make it easier to determine, which data belongs to whom.

The path might be for example:

C:\RoboticsLab_SS07\###Your-Name###\...

There is enough space on the hard disk for all ‘test-files’ and backups you might create, but please put everything in your own folder!

Exercise 1

• Open the Visual Studio project C:\RoboticsLab_SS07\###Your-Name###\Session2\Ex1\Ex1.dswand implement a C++ mechanism for storing DH parameters. This mechanism can be implemented as a class, a struct or any other possibility offered by the C++ language.

• Implement a C++ mechanism for storing DH matrices. This mechanism can be implemented as a class, a struct or any other possibility offered by the C++ language.

• Write a function which transforms a given DH parameter into a matrix. This function may be part of a DH class.

• Implement a function for multiplying 2 matrices, which may be part of a matrix class and may be implemented as an overloaded operator of this class.

• Using the parameters Θ1 = 0°, D2 = 50mm, Θ3 = 0°, Θ4 = 0°, D5 = 0mm, Θ6 = 0° implement the overall forward transformation of the SCARA robot on the platform as introduced during the preparation phase by storing the DH parameters and transforming them to matrices. These matrices will then be multiplied by an overall movement matrix which contains the desired position of the hand point of the robot. Don’t use the console to input values, they all have to be hard coded.

Page 10: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

10

Axis Θ D a α1 Θ1 +500mm +100mm 0°2 0° D2+250mm +250mm 0°3 Θ3 +720mm +430mm 0°4 Θ4 −150mm +370mm +180°5 0° D5 0 0°6 Θ6 +50mm 0 0°

Exercise 2

Given is a 4 axes SCARA robot with the following DH parameters:

Axis Θ D a α1 Θ1 H1 (+720mm) L1 (+430mm) 0°2 Θ2 H2 (-150mm) L2 (+370mm) α2

3 0° D3 0mm 0°4 Θ4 H4 (+50mm) 0mm 0°

and the following limits of the axes:

Axis 1 2 3 4Minimum Joint Value −3.06rad −2.80rad −5.00mm −5.00radMaximum Joint Value +3.06rad +2.80rad +400.00mm +5.00rad

The robot should be moved in a synchro PTP movement form the start position

[0.0rad, 0.0rad, 0.0mm, 0.0rad]

to the end position

[−2.5rad, +2.8rad, +300.0mm, +2.5rad]

both in joint coordinates. The interpolation cycle is fixed to 30 ms.

Following helper classes are introduced which hold all necessary data for the completion of this exercise.

The joint parameter class

This class describes the static values of a joint such as

• Initial position• Final position• Maximum velocity

Page 11: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

11

• Maximum acceleration• Minimum value• Maximum value

The boundary conditions for the robot are therefore an array of type JointParameter[4].

class JointParameter{public: //variables double start_pos; double end_pos; double max_velocity; double max_acceleration; double min_value; double max_value; . . .};

The joint value class

This class describes the position velocity and acceleration of the joint at some time not specified in the class. The movement of one joint can be expressed as an array of joint values, containing n elements, where n is the number of interpolation cycles needed for the complete movement. The movement of the robot thus can be described as a two dimensional array of type JointValues[n][4].

class JointValue{public: //variables double position; double acceleration; double velocity; . . .};

The profile class

This class stores the velocity and acceleration profile for one axis. The profiles of the robot are therefore held in an array of type Profile[4].

Page 12: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

12

class Profile{public: //variables double distance_acceleration; double distance_plateau; double duration_acceleration; double duration_plateau; double acceleration; double velocity; . . .};

Implementation of the Synchro PTP path

Open the Visual Studio ProjectC:\RoboticsLab_SS07\###Your-Name###\Session2\Ex2\Ex2.dswIn the project locate and open the file “scara_ex2.cpp”. You can ignore all other files in this project. (In fact changing other files may lead to a non working project).

In the function ptp_time() you have to implement the following functionality:

• Calculate the movetime for each axis.

• Calculate the overall movement time.

• Adjust the overall movement time to be an integer multiple of cyletime and store the value in the variable movetime (which is a member variable of the class Scara).

• Calculate the number of cycles necessary for the movement and store the value in the variable movecycles (which is a member variable of the class Scara).

The values necessary for these calculations are stored in an instance of the class JointParameter as described in chapter 6.3.2. The variable jointparam[0] holds the value for the first axis, jointparam[1] for the second and so on.

In the function ptp_profile() you have to calculate the velocity and acceleration profile for each axis. The values are stored in an instance of the class Profile. Assign the values of a axis 1 to profile[0], the values of axis2 to profile[1] and so on.

• Calculate the new plateau velocity with regard to the new movetime calculated in the ptp_time() function and assign the value to the variable velocity of the Profile instance. Since it is assumed that the acceleration remains constant the variable acceleration of the Profile instance has to be assigned the max_accleration variable of the respective JointParamter Instance

Page 13: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

13

• Calculate the new plateau time and assign the result to the variable duration_plateau of the Profile instance.

• Calculate the new acceleration time and assign the result to the variable duration_acceleration of the Profile instance.

• Calculate the new plateau length and assign the result to the variable distance_plateau of the Profile instance.

• Calculate the new distance covered in the acceleration and assign the result to the variable distance_acceleration of the Profile instance.

Implement the function ptp_points(). Finally calculate the target values for each axis and store them in the jointvalue variable which is an instance of the class JointValue. The variable jointvalue[0][0] holds the first JointValue for the first axis, jointvalue[0][1], holds the second value and jointvalue[1][0] holds the first value for the second axis and so on.

• For each move cycle calculate the position of each axis and assign the value to the variable position of the correct instance of JointValue.

• For each move cycle calculate the velocity of each axis and assign the value to the variable velocity of the correct instance of JointValue.

• For each move cycle calculate the acceleration of each axis and assign the value to the variable acceleration of the correct instance of JointValue.

Hint: Do not forget to assign initial

values.

Page 14: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

14

Session 3 Safety rules, introduction & calibration

You should have read ‘Start-up’ and ‘User programming’ in the documentation at home, before you attend this session!

Exercise 1 Safety rules & introduction

In this exercise the safety rules of our lab are introduced and the robot system KUKA KR6/1 will be used.

• Read carefully the chapters ”Introduction”, ”Safety”, ”Lab Order” and ”Robot System” in the documentation, which can be found in the handset. During the session, a briefing will take place to make you familiar with our lab. Afterwards you have to sign a contract that you will follow the safety rules of the IRF.

• You have to make yourself familiar with the chapter ‘Operator Control’ in the documentation.

• Every group has to present one section of the chapter ‘Robot System’. You will get the chance to test out what they will present. A schedule for the presentations will be made during the session.

Exercise 2 Calibration

After you have been introduced to the main parts of the robot system, we start over with the setup of the robot.

• Every group will be asked to unmaster all six axis of the robot. After that you have to master the first three axis of the robot with an electronic measuring tool, the so called EMT. The axis 4-6 must be mastered using the dial gage. No gripper will be mounted on the robot.

• After you have mounted a gripper, the calibration of this gripper has to be accomplished. (In our case we do not have to care about ‘tool load data’.) For calibration we use the ‘4-Point’-Method. You can use ‘numeric input’ to make the numbers you got even. Change to TCP-movements and rotate the tool around the new TCP, to see if it is correct.

• Now mount the calibration-spike (tool nr. 5) to the robot. (Don’t forget to change the tool in the robot-controller as well.) Calibrate a base coordinate system to a point you choose on the small table. Use the ‘3-Point’-Method to do that. (The result will be more interesting if you pan and tilt the small table a bit.) Again you can use ‘numeric input’ to make the numbers you got even. Change to Base coordinate movements and translate the robot, to see if it is correct.

• A schedule has to be made, for the next session.

Page 15: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

15

Hint: Groups who couldn’t finish session 2 in time, and are done with the preparations of the presentation, can use this session to finish the tasks, while the other groups are using the robot.

Page 16: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

16

Session 4 User Programming

You should have read ‘User Programming’ and ‘Start-up’ in the documentation at home, before you attend this session! ´In this session we will use the teach-in-panel of the robot to program 2 different applications.

• In the beginning of the session you will program a ‘slalom course’ between the three obstacles on the table based on point-to-point, linear and circular movements using the teach-in-panel (use relative movements very carefully!). Try the additional parameters you can add to a move instruction. Please make a sketch of the path you want to do before you start programming.

• Afterwards program a ‘pick and place’ application: Change the position of one of the cubes on the small table.

• Finish your programs of session 2, if you are not done with them yet.

• A schedule has to be made, for the next session.

Hints: - The short path, when the work piece enters and leaves the jaws of the gripper should always be a linear movement.- Don’t forget a ‘WAIT’-statement after opening and closing the gripper, to make sure that the gripper is ready, before the robot starts moving. (0.5 seconds are sufficient.)

Page 17: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

17

Session 5 Simulator-basicsDuring the previous sessions we saw that is not convenient to program the robot by the teach-in-panel. It takes much time to program and debug the source code even for a simple pick and place application. In this session you will learn how to use a simulator to solve these problems. The simulation will be done with a cell oriented simulator called Cosimir. The geometric description of models in Cosimir is done with the modelling language EGEMOL (Enhanced Geometric Modelling Language). To get in touch with the simulator and EGEMOL solve the following exercise:

• Open the file C:\RoboticsLab_SS07\###Your-Name###\Session6\Ex1.mod with Visual Studio or any other editor.

• Modify the ASCII file: After the line “include lib: ‘Table.mod’” insert a disc object like you can see it in the figure and save the file.

Please be aware of the hierarchical structure of models in EGEMOL:

Keyword Functionenvironment Name and attributes of the whole work cell ╚object Objects can grip or be gripped, IO-channels ╚section Degrees of freedom ╠hull Modelling of geometrical dimension of a section ╠gripperpoint Ability of an object to grip another ╚grippoint Ability of an object to be gripped by another object

Most problems with model result from wrong placed coordinate systems in this structure.

Example 1: Cube

The coordinate systems:• Environment (WCS)• Object• Section

are still in the same position!

The hullcoordinate system

is shifted outof the section

Environment(WCS)

The hullcoordinate systemhas been shiftedas far as necessary

The object and section coordinate system

are in a logical position(in the centre of the cube)

Wrong! Right!

Figure 2: Disk object

Page 18: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

18

Figure 3: Cube model; incorrect and correct

Page 19: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

19

Example 2: Structure of a gripper model

Struktur Name / Funktionenvironment (WCS) Work cell ╚object Gripper ╠section Base ║ ╠hull Cube 1 ║ ╠gripperpoint Point to grip a piece ║ ╚grippoint Gripped by the robot ╠section Jaw left ║ ╠hull Cube 2 ║ ╚hull Wedge 1 ╚section Jaw right ╠hull Cube 3 ╚hull Wedge 2

• Open the file in Cosimirby double clicking on it,and check your result.

Work cell

Gripper Base Cube 1

Jaw left

Gripperpoint

Wedge 2

Cube 2

Cube 3

Jaw right

Figure 4: Gripper model

Page 20: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

20

• Make yourself familiar with Cosimir:- Zooming, rotation, movement of the work cell display

- The Teach-In box - Show coordinates...

• With the Teach-In Dialog move the ‘disk’ from one table to the other.

• Write a simple IRL (Industrial Robot Language) program, to move the disk object from the first table to the second and back.

• Extend the model by adding another copy of the disk object on top of the existing one.

• Write a IRL program, that exchanges the order of the disks. (The lower one should be on top, and both disks should be on top.)

Page 21: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

21

Session 6 Work cell modelThe sixth session will deal with the development of a work cell which can be simulated. For further information you can use the documentation inside of Cosimir to find out how to achieve that. Look up the chapter ‘Expert Programming’ in documentation for detailed information. Also you have to deal with position lists and program compilation.

Task 1:

• Model the cell. It should consist of the robot KUKA KR6/1, the gripper-changer and the measuring spike (tool nr. 5). The robot will be placed at (0, 0, 0)T in the world coordinate system.

• In reality the robot is mounted on a sheet metal with the height of 25mm. Take this into account by lowering the floor by 25mm.

• Place a table in the work cell. The dimensions of the table are width w = 1000mm, height h = 600mm and depth d = 800mm. The lower right front corner (seen from the robot) of the table has to be placed at the position p = (800,−400, -25)T accordingly to the world coordinate system.

• Calibrate the table in the simulated cell according to the position in the real work cell and vice versa.

Task 2:

• Model one of the small cubes. Place it on one corner of the table.

• Modify a gripper from the library until it matches more or less the real one (tool nr. 1). Mount it to the robot. (Don’t delete measuring spike, just dismount it and place it a little bit outside the working area.)

Figure 5: Robot with table

Figure 6: Output logic

Page 22: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

22

• Model the following logic, to address the gripper with the outputs:

Place the LED’s somewhere outside the working area. (Make them big enough to be seen.)

Hint: Don’t worry if the LED’s don’t work when you change the outputs manually. The logic simulation works only as long as there is a robot-program simulated.

• Write a small program which picks up the cube from one corner and places it on the other corner of the table.If the robot is free. Put you program and position list in the given template. Make sure that both files have the same name (in the program and as filename) and fill out the comment header. Load the program into the robot run it and calibrate the table in the real work cell.

• If you finish in time: improve your model or start modelling the parts for the next session.

• Please read the chapter ‘Expert Programming’ in the documentation at home! As more instructions and concepts you know as easier will it be for you in the next sessions.

Hint: Don’t use ‘Tabulator’ in your program! It is Ok in Cosimir, but the real robot might not accept them.

Template for the file :;--------------------------; - Robotics Lab -;--------------------------; Session: ###########; Written by: ##########; Status: Can be deleted!;---------------------------

Figure 7: Work cell with cube on the table

Page 23: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

23

Session 7 Towers of Hanoi

You should have read ‘Expert Programming’ in the documentation at home, before you attend this session!The work cell will be extended to play the game ‘Towers of Hanoi’ with the robot. The task of the robot is to transport all disks from the spike close to the robot to the one on the other side of the small table. The rules of the game have to be respected.

Reuse your model from session 6. Place the small table on top of the already existing table. You will have to measure the dimensions directly from the objects.

• Model the disks.

• Modify a gripper from the library until it matches more or less the real one (tool nr. 3). Please note, that the gripper cannot pick all disks in the same way.

• One group should calibrate a base coordinate system on top of the first spike (the other spikes in x-direction).

• Adjust the model according to the received data.

• Write the program. (Use the base coordinate system in the first spike. This will make the programming much easier.)

• Put your program in the template and test your program on the real robot, if it is free.

Figure 8: Work cell for ‘towers from hanoi’

Page 24: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

24

• If you finish in time: improve your model or start modelling the parts for the next session.

Hints: - Read the chapter ‘Expert Programming’, TCP and Base coordinate system handling are explained there. Use the data type AXIS to define your ‘HOME’-position, because it’s independent of changes of the TCP and the Base coordinate system.- It’s more efficient to type in the robot-positions directly (use data type FRAME to avoid reachability problems), as to use the long way of teaching (driving the Robot to a position -> teaching -> exporting a ###.dat file).

Rules of the game:It’s not allowed: 1. to place the disks anywhere else as on the spikes 2. to move more than one disk at a time 3. to put a bigger disk on top of a smaller one

Page 25: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

25

Session 8 Cubes

In this Session we will deal with the cubes on the small table.

Task 1:

• Write two functions which are able to pick tool nr. 1 out of the tool-tray and to put it back. The tool-position will be given.

The risk of collisions and other mistakes during this manoeuvre is very high! So please write your code carefully and check it properly.The five steps for putting and picking the tool in the tray can be seen in the following image:

Figure 9: Steps of putting a tool in the tool-tray

Hints: - The tool-position should be about {X 919, Y -1292, Z 760, A 47.6, B 0, C 90} in WCS. These values can change a bit after every new calibration of the robot.- Be sure that you don’t forget to handle your TCP and Base coordinate system! Your functions should work always!

• Test your functions, on the real robot if it is free.

Task 2:

• Model the cubes and the red board. Take the measurement from the reality. (Fill the two rows close to the robot with 10 cubes.)

Page 26: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

26

• One group calibrates a base coordinate system on top of the first cube (see figure: 10). Pease make sure, that the values are precise! Test them!

• Adjust the model according to the received data.

• Write a program that moves all cubes from the two rows close to the robot to the other two rows. The program starts and ends with the robot in home position without a mounted tool. (This counts for all following programs)

Hints: - Functions for the pick place movement would make the code easier.- There are better ways than teaching every cube position. Loops could shorten up your code drastically.

• Test your program, on the real robot if it is free.

Task 3:

• Model the sensor on the small table.

• Consider only the first column of positions. Assume the position of the two cubes would be unknown. Write a program that puts the cubes in the two positions close to the robot. In whatever initial position they are.

• Test your program, on the real robot if it is free.

Task 4:

• Find a way to extend the program of the last task from the first column to the whole board. It is known that exactly 10 cubes are on the board, while their positions are unknown. The robot has to find the cubes and sort them into two rows of your choice.

• Test your program, on the real robot if it is free.

• If you finish in time: improve your model or start modelling the parts for the next

(1. column)X

Z

(1. row) Y

Figure 10: Base coordinatesystem in the first cube

Page 27: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

27

session.

Page 28: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

28

Session 9 Benchmark

Finally you will be challenged with a robot benchmark. You will have to assemble a complex mechanical structure. The program should start and end in the ‘HOME’-position without a mounted tool. You will have to program a gripper exchange process. Try to write the program in the most efficient way.

• Reuse your model. Model the structure, gripper nr. 4 and roughly the tool-tray.

• One group should calibrate a base coordinate system on the benchmark structure. (All groups should find an agreement over position and rotation of the coordinate system.)

Adjust the model according to the received data.

• Write the program to mount the structure.

• Put your program in the template and run it on the robot.

• Clean up your computer and backup the data you need. All data you ever created during the lab should be in your folder.

• Please give back this folder to the IRF.

• Go Home! Good luck in the rest of the semester!

Figure 11: Benchmark structure

Page 29: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

29

FAQ

Cosimir:

Cosimir shows ‘no main module’ after compiling:• Check under ‘Execute’ -> ‘Project Management...’

Set your project to ‘active’ check that if files ###.src and ###.dat are included (and nothing else).Only the ###.src should be selected as ‘Mainprogram’

• If it didn’t work:Save all and close CosimirDelete your project file (###.prj)Start Cosimir again (press Ok when it complains)Compile your programSelect your ###.src file in the window and make a new project file

Cosimir runs always only a part of the program (or an old version) after compiling:• Compiling was not successful• You pressed only ‘Compile’ not ‘Compile and Link’

Cosimir shows an error in the last line after compiling:• Press ‘Enter’ after the ‘END’-Instruction.

(There must be a blank line after the ‘END’-Instruction.)

Cosimir shows ‘Position not reachable or singular’ after you tried ‘Set XYZ Position...’ in the ‘Teach-In’-panel:

• There is no known solution. This function is not working properly

Any problem with the Model:• Check if the coordinate systems of the objects are where they are supposed to be

not just somewhere in space.• Check if the coordinate systems of the sections are where they are supposed to

be not just somewhere in space.

Opening and closing of the Gripper is not possible:• The outputs of the Robot are not activated (renamed).• The I/O Connections are not installed.

The gripper is not gripping the objects:• Check if the gripper has a Gripperpoint in the right position. • Check if the object has a Grippoint in the right position.• Check if the Gripperpoint is actually in the range of the Grippoint• Is the number of Inputs to the gripper is equal to the number of Gripperpoints

The robot is gripping several objects:• The range of the Grippoints is too big.• Your “objects” are not really own objects. They are they only sections or hulls of

Page 30: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

30

one object.

The installed logic in the I/O connections is not working:• The logic simulation works only as long as there is actually a robot-program

simulated.

Cosimir runs a ‘IF ... THEN’ statement even if it should not:• Cosimir has problems with long conditions (connected with ‘AND’ or ‘OR’). Put

the conditions behind each other, only one condition per ‘IF .... THEN’

‘View Point invalid’ message, after some rotations of the work cell display. The window appears again and again:

• Save allClose CosimirDelete your Configuration File: #YourModelname#.iniATTENTION!!! You will lose more information like I/O-Connections, Floor- and Lightning-Configurations...(Perhaps you can use an old version of #YourModelname#.ini to avoid loss of data.)

Robot:

The Robot is not moving:• The robot is not in jog mode1 (slow test mode).• The ‘traversing mode’ is wrongly selected (left upper corner on the screen).• The emergency stop button on the panel is pushed.• Not all emergency stops are acknowledged.• Press the ‘enabling switch’ wait until the drives are ready (the red ‘O’ changes into

a green ‘ I ‘) and try again• If one direction is not working try another one.• Select ‘Joint coordinate system’ and try again.

The program is not running:• The program is not really selected but only opened in the editor.• The robot is in jog mode (Test1).• The emergency stop button on the panel is not pushed.• Not all emergency stops are acknowledged.• Press the ‘enabling switch’ wait until the drives are ready (the red ‘O’ changes into

a green ‘I’).• The program ran completely already; use ‘Reset program’

The message ‘Start movement is inadmissible’ appears when the first program line, who moves the robot, is executed:

• The first movement line has to be PTP #YOUR-HOME-POSITION-NAME#• The home position must be defined in the ###.DAT-file• The data-type of home position must be AXIS

Page 31: Practical Training in Robotics 20100417 - TU Dortmund - Fakult¤t

31

The message ‘Start movement is inadmissible’ appears when a program line, who moves the robot, is executed:

• Only a part of a data type is defined. The robot does not give undefined variables a default ‘0'. (COSIMIR does)

{X 10, Y 10, Z 10} doesn’t work; {X 10, Y 10, Z 10, A 0, B 0, C 0} works.

A movement command is not executed. The Robot complains about one specific Axis (velocity, workspace ....):

• The LIN movement is to complex. Try PTP• Drive first in ‘HOME’-position and then execute the movement• You used a triple linkage PTP POINT:OFFSET:OFFSET2. Supported are only

two.

Bibliography

[cplne] http://www.cplusplus.com/doc/tutorial/, 2005 June.[Str97] B. Stroustrup. The C++ Programming Language. Addison-Wesley, Reading, Mass., 3. edition, 1997.