This tutorial demonstrates how to create a basic pick and place as well as a smart pick and lace using Intera Studio, and then how to create the same task using Train by Demonstration.
- Performing a rain by Demonstration Pick and Place
- Creating a Basic Pick and Place in Intera Studio
- Creating a Smart Pick and Place in Studio
- Best Practices
- Smart Behavior - A general term for the use of logic within a task which responds to variables and signals.
- Train By Demonstration - A technique for training a task in which the robot screen is used to teach actions and behaviors.
Performing a rain by Demonstration Pick and Place
- Boot up the robot and press the Rethink button on the navigator to display the Head Screen Menu.
- Start a new task by using the navigator button to scroll to and select tasks, then scroll to and select new.
- Move the robot arm in zero-G mode to the location where the pick will take place and press the grasp button (the long button on the cuff).
- A menu will appear and Basic will be the default option.
- Press the grasp button to select a Basic Pick. The gripper will actuate and a pick will be created in the behavior tree.
- Now that a pick has been trained and the part is in the gripper, move the arm using zero-G mode to the location where the robot should place the part.
- Press the grasp button again to display the menu. Notice that the default option is now Basic Place.
- Press the grasp button again to select the Basic Place option. A place branch of the behavior tree will be created.
- Press the Rethink button to display the head screen menu and select run and restart to start the task.
The robot will move to the pick location trained and actuate the gripper. If the part was picked successfully, it will move to the place location and actuate the gripper again. If it did not successfully pick a part, it will attempt again. By default, the robot will try twice to pick a part. This setting can be changed by the user.
Creating a Basic Pick and Place in Intera Studio
This tutorial requires a gripper and a part.
- Begin by starting a new task and connecting to the robot.
- Attach and configure the desired end of arm tooling.
- Select the Sequence node named Task and add new Sequence node. Rename this node Pick Sequence.
- Move the robot to a position 10-20 cm above the part and add a Move To node . Give the node an appropriate name such as Pick Approach.
- Select to train this position.
- Using either the Zero-G button or the Cartesian View move the robot into position to pick the part.
- Add a Move To node named Pick and set the pose. Change the move type from Joint to Linear to apply a straight line motion from the Approach to the Pick.
- Next, add a Set To node . Give this node a name like Set Pick. Select the Set Variable drop down list and scroll until the variables for the current tool are shown. For example, for a ClickSmart gripper this variable will be grip.
- Set the variable to true or 1 to command the robot to grip when this node is executed in the behavior tree.
- Add a brief wait by selecting the Wait node and give it an appropriate name like 1s.
- Add a Set To node and configure the variable Object Mass. Set the value to the mass of the part being picked. The robot uses the part mass when calculating paths.
- With the part secured in the gripper, move the arm to a position 10-20 cm above the part. Add a Move To node and name it Pick Retract. Set this pose.
- Next, add a Sequence node as a child of the Task sequence node and name it Place Sequence.
- Move the arm to the approach location for the place and train another pose. Name this node Place Approach.
- Move the arm to the place location and train this pose as well. This node should be named something logical like Place.
- Add a Set To node and select the same variable used in Set Pick to false or 0 to disengage the gripper. Name this node Set Place. Within the same node, add in the object mass variable and set this to reset.
- Add a brief wait.
- Move the arm to a retracted position from the place and add one final Move To node. Set this pose and name the node Place Retract.
The behavior tree should look like this when complete:
Creating a Smart Pick and Place in Studio
This section demonstrates how to add logic to a pick to determine if the part is mispicked.
- Begin by opening the User Variables panel in the Task Bar. Add a new user variable named Retry Count. Set the Data Type to Integer, Data Source to Value, and Default Value to 0. This user variable will be used to control the flow of logic when a part is mispicked.
- Add a Loop If node as a child to the Pick sequence node and name it Pick Loop. Configure the Loop If node to Retry Count < 2.
- Move all of the pick actions as children of Pick Loop and add a Priority node to the bottom of this branch. Name this node Smarts. The behavior tree should look like this now:
- Add two Do If nodes as children to Smarts. Label the first Success and the second Fail.
- For Success, set the variable to is_gripping is = true. For Fail, set the variable to is_gripping is = false. Depending on the state of the variable is_gripping after the robot attempts to pick the part, one of these Do If nodes will become active and control how to handle the pick or mispick.
- For Success, simply add a Set To node and name it Object Mass. Configure the variable to Object Mass. Enter the mass of the object.
- For Fail, first add a Set To node named Increment Retry. Configure the variable to Retry Count and set it to increment.
- Add a Do If node after Increment Retry and name it Retry Failed. Configure the node to Retry Count >= 2.
- Add a Throw Error node as a child to Retry Failed. Name this node Throw Mispick. This behavior will trigger an error to be thrown when the part has been mispicked twice.
- Continuing down the remainder of the Fail branch of the behavior tree, add a Set To node named Unpick Signal. Set Grip to 0 to command the end effector to release the part.
- The smart pick behavior is almost fully trained now. The final step is to initialize two variables before the Pick Loop node. Do so by adding a Set To node as a sibling above Pick Loop. Name this node Reset Vars and add two variables. The first is to reset Retry Count and the second is to open the gripper by setting Grip to 0.
The finished behavior tree, including the place sequence, should look like this:
- This tutorial demonstrates how to build these concepts from scratch. Using Templates with this logic built in may save steps.
- Break the task down into different branches of the behavior tree for picks, places, etc. Doing so will allow for easy disabling and enabling of branches within the tree. This may also be required for more complex tasks that incorporate logic to break in and out of different branches within the behavior tree.