Creating Patterns in Studio

Created by Rico Stodt, Modified on Mon, 7 Feb, 2022 at 12:03 PM by Rico Stodt

This Tutorial demonstrates how to train patterns, nested patterns, and user patterns. It also covers how to validate and modify specific poses as well as assign landmarks to patterns. 


Contents


Definitions


  • Pattern - A template of discernible regularity. As such, the elements of a pattern repeat in a predictable manner. In this case, they may be one-dimensional (e.g. a row of five parts), two-dimensional (e.g. a 5x4 grid), or three-dimensional (e.g. a 5x4 grid with 3 layers).
  • Nested Pattern - A pattern within another pattern.
  • User Pattern - The elements of this type of pattern repeat in a predictable manner but the order and location of these are defined by the user.

Prerequisites



How to Train a Pattern


1. Start a new basic task. Select the Task sequence node and add a PATTERN as a child.


Patterns Tutorial Image1.png



2. Open the node inspector to start configuring the pattern.


Pattern Node Inspector Pre.png

 

  • track cycle time - Determines the cycle time of how long it takes to execute the branch; the time it takes to complete all children contained within the Pattern node. When turned on, it will create a variable for the specific Pattern Node in Shared Data.
  • stop on failure - If failure detected, will stop the task on this node.
  • pattern type
    • Grid - Repeat a sequence in the same way over a 1D (row), 2D (grid), or 3D (grid with layers) pattern.
    • User Defined - Repeat a sequence in the same way relative to the frames selected.
  • dimensions - Defines the number of rows, columns, and/or layers.
  • SET IN WORKSPACE - Define corners of the pattern using the arm.
  • VALIDATE - Validates that all of the actions in the sequence can be performed over the whole of the pattern.
  • ADJUST POSES - Allows a specific pose for a specific pattern index to be changed.


3. In order to train the pattern, press the Set In Workspace button.

  • One-dimensional pattern - train two points in the pattern: the first and last points in the row.
  • Two-dimensional pattern - train four points in the pattern: the four corner points in the grid.
  • Three-dimensional pattern - train eight points in the pattern: the corner corner points in the cube.


 4. There are two ways a pattern can be trained. For explanation purposes, we will use an example of a two-dimensional (4x4x1) pattern :

 

  • Center Training - Consider the 4x4 fixture shown below. With an object in the gripper, train the first corner location by moving the arm to the physical center of the first corner index. The blue dot represents the optimal location where the arm should be moved. In order for the pattern to be as accurate as possible, this location should be precisely the center of each corner index. Press the Set Location button to save the position of the first corner. Repeat for the other corners.


Patterns Tutorial Center Training.png

  • Corner Training- Corner training is best used when a symmetrical and uniform pattern fixture is available (most pattern applications have a symmetrical and uniform fixture). Create a pattern with this method by using a physical location in real space as point of reference. This point of reference must be the same relative to the pattern for each corner location.
    • Consider the 4x4 fixture from the example. The fixture is symmetrical and uniform. Train the lower left corner of the part to make physical contact with the fixture at the first corner index of the pattern. Set Location for the first corner. Next, move the lower left corner of the part to make physical contact with the fixture at the second corner location and Set Location. Repeat this for the remaining corners.
    • The relative distance from the lower left corner of each index to the center of the part will always be the same as long as the fixture is symmetrical and uniform. A physical location in space such as a rigid corner on a fixture will generally provide a more accurate pattern than using the center training method because if the fixture has any tolerance, the user will rarely be guaranteed that the part is truly in the center of the index. A rigid corner location on a fixture is definite whereas the center of a space is estimated.


Patterns Tutorial Corner Training.png


 5. The order by which a pattern is trained is important during task execution. For example, if a pattern should start at the bottom left bottom left corner of the grid and work the pattern from left to right, the training order of the four corner locations should match the image below. The first corner that is trained defines the starting point and the second point defines the direction.


Patterns Tutorial Center Training Order.png


6. Once the pattern has been trained, it’s time to finish defining the pattern details. The advanced panel allows for fine tuning of the spacing between rows and columns. Patterns will automatically interpolate index locations based on the dimensions and corner locations. Modifying the spacing settings will change the corner locations which were previously trained.


Pattern Workspace Node Inspector.png


7. Once the pattern dimensions and spacing are set, it is a good idea to verify this in the 3D view. To review each of the physical locations in the pattern, select the PATTERN node and change current pattern point. Select the Approach node and press the Go To button. The robot will move to the approach point for the desired pattern point.


Patterns Tutorial 3D View.png


 8. At this point the pattern has been defined, and now it’s time to define the actions that the robot will take once it gets into the pattern node. In this example we would like to train a pick sequence that should look like this:


Patterns Tutorial Node in Tree.png


9. All of the move actions will get updated to follow the pattern at each index. If a particular Move to node must perform something different (e.g. not move with the pattern) select the node and adjust its frame:

 

  • Moving Frame - Will get adjusted every time a pattern iteration is cycled.
  • Fixed Frame - Will remain at its original location relative to the frame of the pattern.


Patterns Tutorial MoveTo Node.png


10. After all of the pattern actions have been trained, it’s very important to validate that the robot can actually get to all of the points within a pattern. This is done through the Validate button on the pattern node. If all points are within reach, a success message will appear.

 

Best Practices

  • In order to reduce the likelihood of seeing an error, it is recommended to create a “Hub” location and set it to the Fixed Frame of the pattern. This Hub location should precede all other motions in the sequence.
  • Plan out the pattern before building the behavior tree.
  • Keep joint limits in mind when training the Move To node. By making sure that no one joint is close to its limit, it will be likely that the robot can reach all of the poses in a pattern.

How to Adjust a Pattern


Any particular pose within any iteration of the pattern can be adjusted. For example, the robot is having a hard time reaching a particular pose, or a gripper may collide with a wall in a box. In both cases, adjusting a pose may be necessary.

1. Begin by pressing the Adjust Poses button in the pattern node inspector.


Pattern Node Inspector Pre.png


 2. In the Edit Poses panel each pose can be selected and visualized. Stack refers to the layer while Point is the particular iteration in a grid. The 3D visualization will reflect where that iteration is in a grid for verification.

 Patterns Tutorial Edit Pose 1.png
3. Select the index which needs modification under the word "point". Next, move the arm to the new desired location. Then, select USE CURRENT ARM POSE, and then EXIT. This will modify only that specific pose for that index point.

 

  • Pro Tip: Naming nodes will help identify which node to adjust.

How to Add Landmarks to a Pattern


In order to add a Landmark to the rest of the pattern, train a Landmark first. See the Robot Positioning System Tutorial for a reminder on how to do this.


1. Once the Landmark is trained, go to the pattern node you want to associate the landmark to, and select that landmark as the parent frame for this node. (In this image, Landmark1)


Patterns Tutorial Landmark Selection.png


 2. That's it, you're done. All behaviors trained for this pattern will be associated with landmark 1.

 

 

 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article