This page demonstrates how to use force to lock into a fixture.

## Overview

This tutorial demonstrates how to use the robot’s embedded force sensing to navigate a part into a fixture when a certain degree of variability has been introduced. The robot will placing a PCB onto a set of pins by searching for the pins until the part has settled.

## Prerequisites

In this task, the robot will be picking a PCB and placing it onto the fixture below which has pins to guide the part into the place position.

1. Begin by connecting the robot to Intera Studio and starting a new task.

2. Pick the desired part by creating either a basic or smart pick. Please refer to the Performing a Pick and Place tutorial for more information.

3. Move the robot in zero-g above the place position and add a Move To node as the place approach position.

4. Move the robot in zero-g so that the part is positioned just above the pins. Add a Move To node and save this position.

5. Next, add a Loop If node. This purpose of this node is to continue executing a series of Contact nodes as long as the place position has not yet been reached. The variable required in this node is Position.z (Electric Parallel Gripper). Although this tutorial uses an EPG, the variable selected should be the measured tool position in Z of the tool being used.

This position must be carefully set and will vary for every application. To find the correct value for this position, gradually jog the part to the place position. Reference the Measured Tool Position in Z in the Shared Data Panel tab to determine what this value should be set to.

6. With the robot in the place position, add a Contact node as a child of the Loop If. Set the X and Y axes to have a stiffness of 300 N/m and apply a downward force in Z of 5N. Set the max linear speed & acceleration to 600.

7. Add a brief Wait node after this Contact node.

8. Add a Do If node which will evaluate the robot’s position in Z to determine if the part is on the pin, or just above the pin still. This is similar to the place Loop If node added in step 5. Use the variable Position.z (Electric Parallel Gripper).

The value used for this Do If node should be the position in Z of the gripper when the holes of the PCB have locked onto the fixture. Be sure to enable the keep evaluating slider so the node continues to evaluate the condition while its children are executing.

At this time, the behavior tree should look similar to this:

9. Next, add 4 Contact nodes as children to the Do If. Command the robot to bring the part back to the top of pin pose. Set the first Contact node by jogging the part + 3 mm in X relative to the robot’s active endpoint frame. Keep the stiffness in X and Y set to the maximum and set the force in Z to 5 N. Enable the use tcp frame slider, and set the movement type to linear. Slow down the max linear speed and max linear acceleration to 600.

It may be useful to set the parent of this node to the top of pin move which was trained in step 4. Set this as the parent so that when minor adjustments are made to the top of pin pose, this contact move will follow.

10. Using the test button in the top of pin Move To node, command the arm back to the top of pin position. Set the 2nd of 4 contact nodes by jogging the part -3mm in X relative to the robot’s active endpoint frame. Be sure to set all of the variables in this node identically to step 9.

11. Repeat these steps for the 3rd and 4th contact nodes, but jog the robot in +/- 3 mm in Y, respectively. These four contact nodes function to scan the area for the pins while applying a downward force. This way, once the part has found the pin hole, the downward force will continue to be applied and keep the part from coming back off of the pins.

This type of behavior may be necessary if there is inconsistency in the part or fixture causing slight variations in the pick or place. Using this scanning logic, the robot can detect the pins when searching for the fixture in a 3mm radius. Once it has successfully found the fixture, the do if logic no longer is met because the robot has dropped below the specific position in Z relative to the top of the pins. Now the robot will only execute the Contact node set in step 6, which commands the part to the place position with 5N of force until it has reached the bottom of the fixture. At this time, the condition of the loop if is no longer met and the part can be placed.

This behavior described above will look like this if properly trained:

12. Add a Set To node to open the gripper and set the object mass to 0.

13. Add a Move To node to retract the robot and begin the pick sequence again.

The full behavior tree should look similar to this:

Although this example specifically relates to a PCB and its associated fixture, the concepts of fixture interaction and scanning logic apply in other applications.