Difference between revisions of "Gripper Example"

Jump to: navigation , search
(Overview)
(Usage)
Line 28: Line 28:
 
== Usage ==
 
== Usage ==
  
Verify that the robot is enabled from an [[SDK Shell|SDK terminal session]], ex:
+
The robot should always enabled after start, try the command from an [[SDK Shell|SDK terminal session]] if the robot is not enabled:
  
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
Line 35: Line 35:
  
  
Start the joint position waypoints example program, you can specify the joint position motion speed ratio <code>-s</code> or joint position accuracy(rad) <code>-a</code> on which we will run the example.
+
Start gripper control from an RSDK terminal session:
  
For example, run the example with 0.1 speed ratio and 0.1 accuracy:
+
Gripper keyboard example:
 
<syntaxhighlight lang="bash" enclose="div">
 
<syntaxhighlight lang="bash" enclose="div">
$ rosrun intera_examples joint_position_waypoints.py -s 0.1 -a 0.1
+
$ rosrun intera_examples gripper_keyboard.py
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
IMPORTANT: You will have to calibrate gripper before using any of the other commands using C/c commands:
  
Moving the arm in zero-g mode, when we reach a joint position configuration we would like to record, press that [[Navigator | navigator]] wheel.
+
Once calibrated, future calibrate commands will not do anything unless you send a 'reboot' first
 
 
 
 
You will then be prompted with instructions for recording joint position waypoints.
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
Press Navigator 'OK/Wheel' button to record a new joint joint position waypoint.
 
Press Navigator 'Rethink' button when finished recording waypoints to begin playback.
 
</syntaxhighlight>
 
 
 
 
 
Moving the arm in zero-g mode, when we reach a joint position configuration we would like to record, press that [[Navigator | navigator]] wheel.
 
 
 
 
 
You will get the feedback that the joint position waypoint has been recorded:
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
Waypoint Recorded
 
</syntaxhighlight>
 
 
 
 
 
When done recording waypoints, pressing the [[Hardware_Components#Navigator | navigator's]] 'Rethink' button will begin playback.
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
[INFO] [WallTime: 1399571721.540300] Waypoint Playback Started
 
  Press Ctrl-C to stop...
 
</syntaxhighlight>
 
 
 
 
 
The program will begin looping through the recorded joint positions. When the previous joint position command is fully achieved (within the accuracy threshold), the next recorded joint position will be commanded.
 
 
 
<syntaxhighlight lang="bash" enclose="div">
 
Waypoint playback loop #1
 
Waypoint playback loop #2
 
...
 
</syntaxhighlight>
 
 
 
Pressing <code> Control-C </code> at any time will stop playback and exit the example.
 
  
 
</div>
 
</div>

Revision as of 09:12, 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

Arguments

Important Arguments:

-s or --speed : The joint position motion speed ratio [0.0-1.0] (default:= 0.3)

-a or --accuracy : 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)

See the joint position waypoint's available arguments on the command line by passing joint_position_waypoints.py the -h, help argument:

$ rosrun baxter_examples joint_position_waypoints.py -h
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