Performing a Pick and Place

Jump to: navigation , search

Overview

This tutorial first demonstrates how to create a basic pick and place as well as a smart pick and place using Intera Studio, and then how to create the same task using Train by Demonstration. In version 5.1 and 5.2, train by demonstration is only supported for Rethink Robotics Grippers or grippers built on the ClickSmart tool side plate and using the built in I/O to send the grip signal.

Definitions

  • 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 Train by Demonstration Pick and Place

  1. Boot up the robot and press the Rethink button on the navigator to display the Head Screen Menu.
  2. Start a new task by using the navigator button to scroll to and select tasks, then scroll to and select new.
  3. 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).
  4. A menu will appear and Basic will be the default option.
    Picktbd.jpg
  5. Press the grasp button to select a Basic Pick. The gripper will actuate and a pick will be created in the behavior tree.
    Picktbd1.jpg
  6. 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.
  7. Press the grasp button again to display the menu. Notice that the default option is now Basic Place.
    Placetbd.jpg
  8. Press the grasp button again to select the Basic Place option. A place branch of the behavior tree will be created.
    Placetbd1.jpg
  9. 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 Studio

This tutorial requires a gripper and a part.

  1. Begin by starting a new task and connecting to the robot.
  2. Attach and configure the desired end of arm tooling.
  3. Select the Sequence node Sequence 5 1.png named Task and add new Sequence node. Rename this node Pick Sequence.
  4. Move the robot to a position 10-20 cm above the part and add a Move To node MoveTo 5 1.png . Give the node an appropriate name such as Pick Approach.
  5. Select AddArmPose.png to train this position.
  6. Using either the Zero-G button or the Cartesian View move the robot into position to pick the part.
  7. 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.
    Pick.png
  8. Next, add a Set To node SetTo 5 1.png . 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.
  9. Set the variable to true or 1 to command the robot to grip when this node is executed in the behavior tree.
  10. Add a brief wait by selecting the Wait node Wait 5 1.png and give it an appropriate name like 1s.
  11. 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.
  12. 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.
  13. Next, add a Sequence node as a child of the Task sequence node and name it Place Sequence.
  14. Move the arm to the approach location for the place and train another pose. Name this node Place Approach.
  15. Move the arm to the place location and train this pose as well. This node should be named something logical like Place.
  16. 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.
    SetPlace.PNG
  17. Add a brief wait.
  18. 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:

BasicPickPlace2.png

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.

  1. 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.
    RetryCount.png
  2. Add a Loop If node LoopIf 5 1.png as a child to the Pick sequence node and name it Pick Loop. Configure the Loop If node to Retry Count < 2.
    PickLoop.png
  3. Move all of the pick actions as children of Pick Loop and add a Priority node Priority 5 1.png to the bottom of this branch. Name this node Smarts. The behavior tree should look like this now:
    SmartPick1.png
  4. Add two Do If nodes DoIf 5 1.png as children to Smarts. Label the first Success and the second Fail.
  5. 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.
  6. 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.
  7. For Fail, first add a Set To node named Increment Retry. Configure the variable to Retry Count and set it to increment.
  8. Add a Do If node after Increment Retry and name it Retry Failed. Configure the node to Retry Count >= 2.
  9. Add a Throw Error node ThrowError 5 1.png 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.
  10. 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.
  11. 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:

SmartPick2.png


Best Practices

  • 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 which incorporate logic to break in and out of different branches within the behavior tree.