Strumenti Utente

Strumenti Sito


robodk

Questa è una vecchia versione del documento!


Robot simulation with RoboDK

Introduction to RoboDK

RoboDK is a software used to simulate and program a wide variety of industrial robots. It's a commercial software but it has both a free version1) you can use at home as well as an education version, which is the one installed at school. We'll use this application as an mean to introduce robotics in our course.

RoboDK is used to simulate a robot station, that is a robot and its work environment. This allows for testing multiple scenarios before deploying the robot in production and avoid possible mistakes. A large library of robots from different manufacturers is available and, other than simulating them, RoboDK can generate software you can run on the actual robot, thereby acting as a vendor-independent off-line programming tool.

More interesting features are:

At the moment using this software is the best fit for our school because we can get started in robotics before having an actual robot in our labs. That said, offline programming will still be useful when we'll buy one because in a multi-seat classroom environment it allows for each student to write his own program independently.

Lesson 1: Adding a robot and its tool

Let's launch RoboDK and start our first project. The user interface is quite simple: there are a menu and a toolbar on top, a tree view of the robot station on the left and, when opened, a window on the right to manage object properties and control the robot. The rest of the screen is a blue area where the 3D model of the robot and its work environment is drawn.

Every project consist of a robot station plus a number of objects nested inside it:

  • the robot
  • the robot tool
  • a list of targets for the robot tool
  • programs with joint movements and other instructions

In an empty project only one thing is shown: the origin of the robot station with its reference frame. A reference frame is a coordinate system that allows placing objects in the 3D space with respect to it. It appears on screen as a set of three arrows with:

  • the x axis in red
  • the y axis in green
  • the z axis in blue

The axes names can be shown ticking an option in the Display tab reached from Tools|Options in the menu.

A Reference Frame defines the location of an item with respect to another item, with a given position and orientation. An item can be an object, a robot or another reference frame. It must be noted that when a reference frame is moved every nested object moves along with it.

The relationship of one reference frame with respect to another one is also known as a pose, a set of position and orientation data which by default is represented by:

  • the X, Y, Z coordinates
  • the Euler angle orientation in the X→Y→Z format, which is the order of the rotations around the axes of the static reference2)

Adding a robot

Robots can be added to the project with the Open robot library button in the toolbar (it's the world shaped one). Clicking it opens a page in the browser showing all the available robots. It is possible to narrow down the list using filters based on brand, payload, reach and more. Let's say we want to add a Yaskawa HC10 cobot; first we select the Yaskawa brand, the we reduce the payload range and finally, scrolling down, we click Open when we foind the exact model we are looking for. The robot is automatically downloaded from the page, added to the project and displayed in the 3D work space. On the left we can see that two new objects were added to the robot station:

  • a reference frame for the robot base
  • the robot itself

A double click on these object opens a side window on the right. The base frame details window shows its coordinates with respect to the station reference frame. A different reference frame and alternate coordinates formats are available clicking the respective drop-down buttons. It is also possible to move the base frame entering new values in the coordinates fields. The robot panel window has similar reference frame information as well as controls for joint axes movements.

Now in the main window two new sets of arrows are also shown: the robot base and the robot flange reference frames.

Before adding a tool to the robot let's see how navigation in the 3D space works. The main actions are:

  • select, clicking the left button of the mouse
  • pan, clicking the scroll wheel button and moving the mouse
  • rotate, clicking the right button and moving the mouse
  • zoom, using the mouse wheel

Two buttons in the toolbar can be used to set default views:

  • fit all (the one with the four arrows)
  • default views (the one with the blue cube and the drop.down list)

Adding a tool

A robot is useless without an end-effector. Tools ca be added from the robot library just like we did before, just choose tool in the type filter of the library. For our example project let's look for the Generic Dispenser tool and click open. The tool is automatically added to the flange of the robot and a new reference frame is displayed on its end. This new frame is called TPC (tool center point) and is positioned and oriented according to the tool's task. This is the place where the tool action is performed and the is one frame we need to move and control to get the robot's job done. On the robot panel window we can see how its pose is defined with respect to the robot flange or some other reference frame.

Lesson 2: programming the robot

In a typical robot application you define targets to be reached then write a program consisting of:

  • joint movements to reach these targets
  • actions to be performed

Targets are defined manually moving the robot to the desired position then clicking the add new target for the selected robot button in the toolbar. It is good practice to define these targets with respect to some reference frame other than the robot base frame. Such additional frame can be created clicking the add reference frame button in the toolbar and setting its position according to the robot work environment. It could be a corner of a table where object are picked, an edge of an object to be painted, and so on.

Moving the robot

In a moment we'll see how to move the robot but fist it should be noted that every robot imported from the library has its own home position. When first imported in the project the robot is drawn in this default position, but you can always move it back there:

  • right-clicking on the robot name in the station tree and choosing Move home
  • clicking the Home button in the Joint Axis jog panel in the robot panel window

There are different methods to move the robot:

  • using the joint axis jog section of the robot panel, where every axis can be moved independently
  • selecting one translation/rotation axis and using the spinning the wheel just above3)
  • typing-in the coordinates in the cartesian jog section (you'll want to use the tool frame with respect to reference frame fields)
  • holding down the Alt button on the keyboard4) and than, for any reference frame, dragging the arrows, to move along a particular axis or dragging any of the three colored squares, to move in a particular plane

The last method is by far the most convenient, especially when using the TCP reference frame.

Adding an object

Now that we know how to move the robot let's add a new reference frame, an object and some targets.

To add a reference frame just click the Add a Reference Frame button in the toolbar (three arrows and a plus sign). Now rename it to object frame right-clicking it in the station tree and choosing Rename. Next change its position double-clicking its name in the station tree and entering 800 in the X coordinate and 0 in the Y coordinate5).

To add a new object click the Open robot library button then choose Box in the Type section to filter results. Now open the first item, Box 12x7in (Closed). The new object should be nested in the new reference frame. If it's not, drag-and-drop it in the object frame from the station tree6).

Adding targets

We'll now add some targets so that the robot, starting from its home position, moves to a corner in the top of the box, then travels along the four edges and finally comes back to its home position. This kind of path could be used to seal the top of an object using a glue dispenser tool.

Let's add the first target. Fist move the robot to its home position than click the Add new target for the selected robot button in the toolbar (the one with a target and a plus sign). Rename the target as home from the station tree.

We now need four more targets at each corner of the box. Getting their exact position manually moving the robot could be tricky; that's why we'll use the Teach target(s) on Surface feature from the Program menu. When selecting it a window opens on the left side showing some options. We'll select the Automatically extract surface corners button so that when moving the mouse above the top surface of the box the robot follows it while keeping its TCP perpendicular to the surface. Now move the TCP to the four corners and click the left-button to add targets. While doing so panning, rotating and zooming helps picking the correct position. If necessary, wrong targets can be deleted right clicking their name and selecting Delete while choosing Options from the same menu helps fine tuning the target position.

Movements and programs

Once targets are added you can click them, one after another, and move the robot to their respective position. This is useful to preview robot movements. To precisely define the robot's behavior we need to now create a program and add instructions to specify movements and other actions to be performed. To do so click the Add Program button in the toolbar (with the white sheet with the plus sign). A new item is added to the station tree called Prog1; rename it to approach.

Movement instructions are added selecting a target and clicking one of the three move buttons in the toolbar (with the yellow arrows):

  • Move Joint results in a curved movement between two joints
  • Move Linear results in a curved movement between two joints
  • Move Circular results in a circular movement starting from a target and going through two more

Joint movements are the most used but for certain applications, such as moving along the edges of a box, linear movements are required. That said, select the first target on the box and click the Move Joint button. You'll see three items added to the approach program: one sets the reference frame, one sets the robot tool and one is the move instruction the selected target (starting from home). This program moves the TCP from the home target to the box; we'll write two more, one for the box movements and one to get back home, and than call them from a main program.

Let's add a new program and call it box. One at a time, select the three remaining targets on the box and than the fist one again. Add Move Linear instruction to go through each one of them. One done, execute the program double-clicking box in the station tree: you should see the TCP moving straight along the defined path, which is also shown as a yellow line. Let's add one last program and call it retract. Select the home target and add a Move Joint instruction to come back to it.

There's one thing left: creating a main program and calling the three sub-programs within it. The easiest way to accomplish this is to select the three sub-programs, clicking their name while holding down the CTRL key, then right-clicking and and selecting Make Main program. A new item is added to the station tree called MainProgram calling the sub-programs. It is possible to re-arrange the program calls or add other instructions between the calls (for example you could change the robot speed while on the box using the Set Speed instruction). Finally you can test the program double-clicking the MainProgram. You'll see the robot move executing its program while a slider in the lower part of the screen, with controls to pause o restart the simulation, shows the taken to complete it.

1)
with limited features
2)
there are many other different ways to define a pose and each robot vendor has its preferred way
3)
see also the workspace radio-button options on the right
4)
or clicking the middle white-arrow button in the toolbar
5)
this method allows for precise positioning but you can also move the reference frame with the Alt key and the mouse
6)
now you could try moving the object frame and see how the nested box moves with it
Questo sito Web utilizza i cookie. Utilizzando il sito Web, l'utente accetta la memorizzazione dei cookie sul proprio computer. Inoltre riconosci di aver letto e compreso la nostra Informativa sulla privacy. Se non sei d'accordo, lascia il sito.Maggiori informazioni sui cookie
robodk.1684875086.txt.gz · Ultima modifica: 2023/05/23 20:51 da admin