Difference between revisions of "Gripper Example"

Jump to: navigation , search
(Usage)
(Key Bindings)
Line 50: Line 50:
 
<div class="content-block">
 
<div class="content-block">
  
== Arguments ==
+
== Key Bindings ==
  
'''Important Arguments:''' 
+
Get a list of commands by entering '?'
  
<code> -s </code> or <code> --speed </code>: The joint position motion speed ratio [0.0-1.0] (default:= 0.3)
+
For gripper keyboard example:
 +
key: description
 +
'r': "reboot"
 +
'c': "calibrate"
 +
'q': "close"
 +
'o': "open"
 +
'+': "set 100% velocity"
 +
'-': "set 30% velocity"
 +
's': "stop"
 +
'h': "decrease holding force"
 +
'j': "increase holding force"
 +
'u': "decrease position"
 +
'i': "increase position"
  
<code> -a </code> or <code> --accuracy </code>: The threshold in Radians at which the current joint position command is considered successful before sending the next following joint position command. (default:= 0.008726646)
+
For gripper joystick example:
 +
command: description
 +
'btnLeft': "reboot"
 +
'btnUp': "calibrate"
 +
'leftTrigger': "close"
 +
'leftTrigger': "open (release)"
 +
'leftBumper': "stop"
 +
'leftStickHorz': "decrease position by step when stick value less than 0, increase position by step when stick value larger than 0"
 +
'leftStickVert': "decrease holding force by step when stick value less than 0, increase holding force by step when stick value larger than 0"
 +
'function1' or 'function2': "help"
  
See the joint position waypoint's available arguments on the command line by passing joint_position_waypoints.py the <code>-h</code>, help argument:
+
You can monitor the changes you are making using the following rostopic which you can monitor from a different shell:
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ rosrun baxter_examples joint_position_waypoints.py -h
+
$ rostopic echo /robot/end_effector/right_gripper/command
</syntaxhighlight>
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
usage: joint_position_waypoints.py [-h] [-s SPEED] [-a ACCURACY]
 
 
 
RSDK Joint Position Waypoints Example
 
 
 
    Records joint positions each time the navigator 'OK/wheel'
 
    button is pressed.
 
    Upon pressing the navigator 'Rethink' button, the recorded joint positions
 
    will begin playing back in a loop.
 
   
 
 
 
optional arguments:
 
  -h, --help            show this help message and exit
 
  -s SPEED, --speed SPEED
 
                        joint position motion speed ratio [0.0-1.0] (default:=
 
                        0.3)
 
  -a ACCURACY, --accuracy ACCURACY
 
                        joint position accuracy (rad) at which waypoints must
 
                        achieve
 
 
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
</div>
 
</div>

Revision as of 10:04, 11 November 2016

Use gripper control as an example of controlling Sawyer's gripper.

Overview

Uses the keyboard or joystick to control Sawyer's gripper. Position, velocity, holding, and moving force can be controlled and sensed. Both logitech and xbox game controllers are supported.


Usage

The robot should always enabled after start, try the command from an SDK terminal session if the robot is not enabled:

$ rosrun intera_interface robot_enable.py


Start gripper control from an RSDK terminal session:

Gripper keyboard example:

$ rosrun intera_examples gripper_keyboard.py

IMPORTANT: You will have to calibrate gripper before using any of the other commands using C/c commands:

Once calibrated, future calibrate commands will not do anything unless you send a 'reboot' first

Key Bindings

Get a list of commands by entering '?'

For gripper keyboard example: key: description 'r': "reboot" 'c': "calibrate" 'q': "close" 'o': "open" '+': "set 100% velocity" '-': "set 30% velocity" 's': "stop" 'h': "decrease holding force" 'j': "increase holding force" 'u': "decrease position" 'i': "increase position"

For gripper joystick example: command: description 'btnLeft': "reboot" 'btnUp': "calibrate" 'leftTrigger': "close" 'leftTrigger': "open (release)" 'leftBumper': "stop" 'leftStickHorz': "decrease position by step when stick value less than 0, increase position by step when stick value larger than 0" 'leftStickVert': "decrease holding force by step when stick value less than 0, increase holding force by step when stick value larger than 0" 'function1' or 'function2': "help"

You can monitor the changes you are making using the following rostopic which you can monitor from a different shell:

$ rostopic echo /robot/end_effector/right_gripper/command