Robot Modelling

Often the necessary components for the construction of a workcell are not present in the preset library, and need to be constructed from scratch. Cell Editor is able to import STEP files and URDF files from ROS Packages to assist with the construction of these work cells. This tutorial will outline this process; from constructing a robot from a STEP file in Cell Editor to simulating the robot in Weld.

Create a Work Cell

To import a step file and begin building the robot, we need to create a new cell.

  1. Press the New button on the ribbon to create a new workcell. Let’s name the cell ‘Generic Robot’, in honour of the robot we will be creating.

  2. Let’s remove the default link and joint by right-clicking joint base_joint and pressing ‘Delete’. We are going to import the robot directly into the world world

../../_images/new-cell1.png

Step 1: Creation of the Generic Robot cell

Import the robot STEP file

Now that we have created a blank cell, we are ready to import our robot.

  1. Download generic_robot.stp from the Verbotics website

  2. Click the world world in the URDF widget to select it

  3. Under the ‘Import’ section of the ribbon, click ‘Import STEP’ to open the STEP file browser

../../_images/step-ribbon.png

Step 3: Open the STEP file browser

  1. Navigate to the directory where the generic_robot.stp file is stored and open it

  2. In the Import STEP Model dialog that appears, set the following parameters

  • Hull Type: Bounding Box

  • Apply bounds to: Individual Objects

  • Collision Margin 5mm

../../_images/import-step.png

For more information about the STEP importer, visit the reference page

  1. Click ‘Import’ to import the selected STEP file.

The imported STEP file will appear in the viewport.

../../_images/generic-robot-imported.png

Generic Robot

Note

The grey boxes in the above image are the Collision bodies for the imported links. These can be toggled on and off with View > Show Collision

Structuring the Document

Currently, our imported STEP file is sitting in the workcell world, with the same structure as it would have originally had when exported from the CAD software where it was created. In this instance, all of the joints (and links) share one global parent transformation (joint robot v2_joint). We need to convert this series of ‘flat’ transformations to local transforms from one link to another.

Without doing this, each link would have a transformation that was independent of the previous joint. When one joint is moved, the rest of the robot would not follow suit.

We can demonstrate the necessity for this in URDF as a generalized format (and one which is used by Cell Editor) by attempting to change our joints now, without restructuring our transform heirarchy.

  1. Select or use the Find feature to locate joint link1 v1_joint. This will be the first joint in our robot.

  2. Using the Properties panel, set the Joint Type to ‘REVOLUTE’

../../_images/properties-revolute.png

Properties panel for a Revolute Joint.

Note

There are three types of joint supported by Cell Editor and Verbotics Weld.

Fixed joints are responsible for simply holding transformations. They have a parent, a child and an origin. Revolute joints are the same as Fixed joints, except they rotate around one of their axis. Prismatic joints are the same as Fixed joints, except instead they translate along one of their axis.

For more information about joint properties, visit the properties reference

  1. Notice the Robots widget on the right-hand side of the screen. You may need to click the Robots tab at the bottom of the pane. There is now a slider representing the new revolute joint. This joint can now be assigned a joint value.

../../_images/first-joint.png

Our first revolute joint

  1. Change the value of the slider. Notice that only the current link that is attached to this joint moves.

../../_images/robot-rotate-first.png

Our robot is defective!

  1. Reset the joint value of the slider back to 0.00° by entering it into the number field next to the slider. In the URDF widget, drag joint link2 v3_joint onto link link1 v1 to set it as a child.

../../_images/move-link.png
  • In the dialog that appears, choose to Keep the global transform of this link.

../../_images/keep-transform.png

Warning

Make sure you have reset the joint value as described in this step. Otherwhise, the ‘Keep’ option we selected will result in the subsequent joint being tied to its current position relative to the previous joint!

Tip

If you make a mistake, you can always hit Ctrl+Z (Command+Z on Mac) to go back.

  1. Once again, try jogging the robot using the Robot widget. This time, joint link2 v3_joint and its children will follow along as we intend.

Building the Robot

Now we are aware that the structure of the document affects the behaviour of the links and joints in the workcell, we are ready to begin building our robot. You probably already have a feel for how we would go about doing this.

  1. Ensure that in the Robot widget, all modifiable joint values are set to their default value (0.00°)

  2. Begin dragging subsequent links to form the robot such that subsequent links are children of their parent links. For all the below operations, when prompted select Keep when asked whether to retain their global transformation.

  3. Expand joint link2 v3_joint, then drag joint link3 v6_joint onto link link2 v3

../../_images/move-link-1.png
  1. Expand joint link2 v3_joint, then drag joint link4 v4_joint onto link link3 v6

../../_images/move-link-2.png
  1. Continue in the same fashion for the next joint, dragging joint link5 v1_joint onto link link4 v4

  2. The tree should now look like this;

../../_images/tree-finished.png

The Kinematic Model

Note

Cell Editor is a tool to easily create kinematic models. Having a kinematic model allows us to derive end-effector position from the joint values (forward kinematics) or joint values from the end effector position (inverse kinematics). Verbotics Weld uses the kinematic model to plan robot motions for offline weld programming.

Our robot is coming along very well. In this step, we will continue to set up the joints on the robot. As in the Structuring the Document step, we are going to continue setting types for joints to control how they move their respective links on the robot.

  1. Using the URDF widget or the Find (Ctrl+F) feature, find joint link2 v3_joint and select it.

  2. In the properties panel, change the type of the joint to REVOLUTE

  3. Using the radio buttons in the properties panel, set the Axis of the joint to Y

../../_images/axis-Y.png
  1. Notice that the joint now appears on the Robot widget. Drag the slider to see how modifying the joint value affects the robot

../../_images/two-joints.png
  1. You may have noticed that the joint can go 180° either direction of where it started. In our case, this means the robot is moving outside of where it would be possible. This is where configuring joint limits comes in handy, to make sure the robot is unable to move outside its physical limits.

  • Set the joint limits. In the properties panel, inside the limits group, set Minimum to -90.00° and Maximum to 160.00°.

  • Uncheck the Unlimited velocity checkbox. Set the Velocity limit to 150.00°/s

    ../../_images/joint-limits.png

Tip

Setting joint limits can significantly improve planning performance and/or feasibility by decreasing the size of the problem space.

  1. Continue setting up the remaining joints to finalize the kinematic model.

  • Change joint link3 v6_joint to be a REVOLUTE joint. Set its Axis to Y and its limits as follows;

    Minimum

    -90.00°

    Maximum

    90.00°

    Velocity

    150.00°/s

  • Change joint link4 v4_joint to be a REVOLUTE joint.

    1. For this joint to behave properly with weld, we need to set this joint to be directly above the previous joint. To do this without changing the position of the visible bodies, we are going to use Origin Mode. Using the transform widget in Origin mode, set the X to 0.00mm

    ../../_images/transform-origin.png

    Step 1: Set the transform type to Origin

    ../../_images/x-zero-origin.png

    Step 2: Set X to 0.00mm

    1. Set its Axis to X and its limits as follows;

    Velocity

    150.00°/s

  • Select joint link5 v1_joint. Note that in the case of this joint, we are going to need to modify the joint origin. With the current origin, Weld will be unable to solve the 6-DOF kinematic model we have provided. To fix this, we will change the origin of the joint such that X is pointing forwards and Z is pointing up.

    1. Using the Transform widget, change the transform type to Origin

    2. Using the toolbar above the viewport, change the snap angle to 90.0°. Click to enable the magnet icon to enable snapping.

    ../../_images/snap-90.png

    Step 2: Set the snap angle to 90°

    1. In the viewport, drag the manipulator around to align the X-Axis to point Forward, relative to the robot.

    ../../_images/drag-manipulator.png

    Step 3: Drag the manipulator to align the joint axis

    1. Now that the axis is aligned, set the joint to be a REVOLUTE joint. Set its Axis to Y and the limits as follows;

    Minimum

    -140.00°

    Maximum

    140.00°

    Velocity

    150.00°/s

    Note

    These are not the only rules that should be followed when creating 6-DOF robots for use in Verbotics Weld. These rules are detailed on the 6-DOF Robots page in the reference section.

Creating a Torch

Tip

As you may have already guessed, this process can be applied to any manufacturer robot model imported into Cell Editor.

Now that we have made sure out Robot is structure correctly in Cell Editor from the CAD model, our next step is the business end of the robot. Normally, a standard torch can be imported from the presets selection. In this guide, we will use the Body Editor to create our own torch.

  1. Create a sixth link. This link is responsible for rotating the torch

  • Select link link5 v1

  • Go to the ribbon menu and switch to the Tools tab. Press link Add Fixed Link

  • In the name field that appears, name the link “link6” and hit Ok

  1. Notice that this feature has created a new joint automatically to locate link link6. Select this joint, named joint link6_joint

  2. With the joint selected, set the joint to be a REVOLUTE joint. Set its Axis to X and the limits as follows;

    Minimum

    -360.00°

    Maximum

    360.00°

    Velocity

    150.00°/s

  3. Create the flange link.

  • Go to the ribbon menu and switch to the Tools tab. Press link Add Fixed Link

  • In the name field that appears, name the link “flange_link” and hit Ok

  • Using the Transform widget, move the link 95.00mm along the X axis.

  1. This link is going to need to be rotated such that the Z-Axis points forwards. With snap on and the snap angle set to 90.00°, rotate the joint in Origin mode by 180° along the Z-Axis, then 90° along the X-Axis. You should end up with something similar to the second image below.

../../_images/rotate-flange.png

Step 5: rotate the origin to point the correct direction

../../_images/flange-rotate-done.png

The flange link origin once rotated

  1. Create the torch. In our instance, we are going to create a simple torch out of primitives.

  1. Create a new Fixed Link called link torch_link by selecting link flange_link and pressing link Add Fixed Link

  2. In the tools menu on the ribbon, press the Edit Bodies button, with the lock icon beside it.

  3. Activation of the Edit Bodies icon enables Body Mode. Down the bottom left of the screen, you will see the Bodies widget. This widget can be used to modify the bodies attached to links.

../../_images/edit-bodies.png

Step 3: Edit bodies

../../_images/bodies-widget.png

Step 3: The bodies widget

  1. Create an example torch. Click +Add under the bodies list in the bodies widget, on the Visual tab. Change the body type to ‘Cylinder’. Set the following values;

Length

200.00

Radius

20.00

../../_images/cylinder-body.png

Step 4: Adding the cylinder body

  1. Use the Transform widget to move the cylinder into place. We are going to sit the cylinder directly onto this link origin. To do this, set the Z to 100.00mm

../../_images/set-z-100.png

Step 5: Set the Z translation of this body to 100.00mm

Tip

The two tabs on the Body widget represent Visual and Collision bodies. Visual bodies are not used for planning in Weld. They are used as a guide for creating collision bodies, or to model the actual look of the workcell. Collision bodies are important for planning, but not so important visually.

The Workpiece

Configuring the Model