| Entrambe le parti precedenti la revisioneRevisione precedenteProssima revisione | Revisione precedente |
| robodk [2023/05/25 18:27] – [Adding a tool] admin | robodk [2024/03/13 10:40] (versione attuale) – [Introduction to RoboDK] admin |
|---|
| * extensive support ([[https://robodk.com/doc/en/Getting-Started.html|documentation]], [[https://www.youtube.com/playlist?list=PLjiA6TvRACQd8pL0EnE9Djc_SCH7wxxXl|video tutorials]], [[https://robodk.com/forum/|forum]]) | * extensive support ([[https://robodk.com/doc/en/Getting-Started.html|documentation]], [[https://www.youtube.com/playlist?list=PLjiA6TvRACQd8pL0EnE9Djc_SCH7wxxXl|video tutorials]], [[https://robodk.com/forum/|forum]]) |
| |
| At the moment this software constitutes the best fit for our school as we can get started with robotics before having an actual robot in our labs. Nonetheless, offline programming will still be useful when we buy one since it allows its student to develop its own program individually. | At the moment this software constitutes the best fit for our school as we can get started with robotics before having an actual robot in our labs. Nonetheless, offline programming will still be useful when we buy one since it allows students to develop their own program individually. |
| |
| ===== Lesson 1: Adding a robot and its tool ===== | ===== Lesson 1: Adding a robot and its tool ===== |
| ===== Lesson 2: programming the robot ===== | ===== Lesson 2: programming the robot ===== |
| |
| In a typical robot application you define targets to be reached then write a program consisting of: | In a typical robot application you define targets to be reached then write a program which consists of: |
| * joint movements to reach these targets | * joint movements to reach these targets |
| * actions to be performed | * 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. | Targets are defined by manually moving the robot to the desired position then by 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 different from the robot base frame. Such additional frame can be created by clicking the //add reference frame// button in the toolbar and setting its position according to the robot working environment. It could be a corner of a table where objects are picked, an edge of an object to be painted, and so on. |
| |
| ==== Moving the robot ==== | ==== 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: | In a moment we will see how to move the robot but first 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 default position, but you can always move it back there: |
| * right-clicking on the robot name in the station tree and choosing //Move home// | * by 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 | * by clicking the //Home// button in the //Joint Axis jog// panel in the robot panel window |
| |
| There are different methods to move the robot: | 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 | * 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 above((see also the workspace radio-button options on the right)) | * selecting one translation/rotation axis and using the spinning wheel just above((see also the workspace radio-button options on the right)) |
| * typing-in the coordinates in the //cartesian jog// section (you'll want to use the //tool frame with respect to reference frame// fields) | * typing-in the coordinates in the //cartesian jog// section (you will want to use the //tool frame with respect to reference frame// fields) |
| * holding down the //Alt// button on the keyboard((or clicking the middle white-arrow button in the toolbar)) 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 | * holding down the //Alt// button on the keyboard((or by clicking the middle white-arrow button in the toolbar)) 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. | The last method is by far the most convenient, especially when using the TCP reference frame. |
| |
| ==== Adding an object ==== | ==== Adding an object ==== |
| |
| Now that we know how to move the robot let's add a new reference frame, an object and some targets. | 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 coordinate((this method allows for precise positioning but you can also move the reference frame with the //Alt// key and the mouse)). | 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// by right-clicking it in the station tree and choosing //Rename//. Next change its position by double-clicking its name in the station tree and entering ''800'' in the X coordinate and ''0'' in the Y coordinate((this method allows for precise positioning but you can also move the reference frame with the //Alt// key and the mouse)). |
| |
| 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 tree((now you could try moving the //object frame// and see how the nested box moves with it)). | 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 tree((now you could try moving the //object frame// and see how the nested box moves with it)). |
| ==== Adding targets ==== | ==== 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. | We will now add some targets so that the robot will move to the 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 by using a glue dispensing 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. | Let's add the first target. First 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. | We now need four more targets at each corner of the box. Getting their exact position by manually moving the robot could be tricky; that is why we will 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 will 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 help picking the correct position. If necessary, wrong targets can be deleted by right clicking their names and selecting //Delete// while choosing //Options// from the same menu helps fine tuning the target position. |
| |
| |
| ==== Movements and programs ==== | ==== Movements and programs ==== |
| |
| Once targets are added you can click them, one after another, to move the robot to their respective position. This is indeed useful to preview robot movements. Now it's time to precisely define the robot's behavior creating a program and adding instructions to specify movements and other actions to be performed. To do so click the //Add Program// button in the toolbar (the one with the white sheet and the plus sign). A new item is added to the station tree called //Prog1//; rename it to //approach//. | Once targets are added you can click on them, one after the other, to move the robot to their respective position. This is indeed useful to preview robot movements. Now it is time to precisely define the robot behavior by creating a program and adding instructions to specify movements and other actions to be performed. To do so click the //Add Program// button in the toolbar (the one with the white sheet and 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 then clicking one of the three move buttons in the toolbar (the ones with the yellow arrows): | Movement instructions are added by selecting a target then clicking one of the three move buttons in the toolbar (the ones with yellow arrows): |
| * //Move Joint// results in a curved movement between two joints | * //Move Joint// results in a curved movement between two joints |
| * //Move Linear// results in a curved movement between two joints | * //Move Linear// results in a straight movement between two joints |
| * //Move Circular// results in a circular movement starting from a target and going through two more | * //Move Circular// results in a circular movement starting from a target and going through two extra ones |
| |
| 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 a reference frame, one sets the robot tool and one is the move instruction to the selected target (starting from home). The program we just created 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 all of them from a main program. | 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 will see three items added to the //approach// program: one sets a reference frame, one sets the robot tool and one is the move instruction to the selected target (starting from home). The program we have just created moves the TCP from the home target to the box; we will write two extra ones, one for the box movements and one to get back home, and call all of 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 first one again. Add //Move Linear// instruction to go through each one of them. Once done, execute the program double-clicking //box// in the station tree: you should see the TCP moving straight along the defined path, which is 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. | Let's add a new program and call it //box//. One at a time, select the three remaining targets on the box and then the first one again. Add //Move Linear// instructions to go through each one of them. Once done, execute the program by double-clicking //box// in the station tree: you should see the TCP moving straight along the defined path, which is 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 return to it. |
| |
| There's one thing left: creating a main program that calls 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// with nested calls to 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 using the //Set Speed// instruction). Our simulation is now complete: let's test the program double-clicking //MainProgram//. You'll see the robot move, while executing its program. When the simulation is running a task bar, with a slider and some control buttons, is shown in the lower part of the screen. You can use it to pause or restart the simulation, and keep track of the time taken to complete it. | There's one thing left: creating a main program that calls the three sub-programs. The easiest way to accomplish this is to select the three sub-programs - clicking their names while holding down the //CTRL// key - then by right-clicking and and selecting //Make Main program//. A new item is added to the station tree called //MainProgram// with nested calls to the sub-programs. It is possible to re-arrange the program calls or add more instructions between the calls (for example you could change the robot speed by using the //Set Speed// instruction). Our simulation is now complete: let's test the program by double-clicking //MainProgram//. You will see the robot move while executing its program. When the simulation is running, a task bar with a slider and some control buttons is shown in the lower part of the screen. You can use it to pause or restart the simulation and keep track of the time taken to complete it. |
| |
| ===== Going further ===== | ===== Going further ===== |
| |
| That's it for now. This was a very brief introduction to RoboDK usage. You can learn more on robot simulation starting from the Resources section of [[https://robodk.com/|its webpage]]. | That's it for now. This was a brief introduction to RoboDK usage(({{ ::clil.zip |here}} you can download the project we just created)). You can learn more on robot simulation from the Resources section of [[https://robodk.com/|its webpage]]. |
| |
| |