From sdk-wiki
Revision as of 15:11, 29 July 2014 by Sdkuser (talk | contribs) (Protected "Gripper Cuff Control Example": Setting Permissions for (almost all) Pages - editable and moveable by all logged in users ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
Summary
The Gripper Cuff Control example demonstrates basic cuff/gripper interaction and enabling of 0G mode on the robot. In this example, we enable the robot, and put it in a state where if you squeeze the cuff, the robot will enter 0G mode. This example also hooks the two cuff buttons up to the open/close feature of attached grippers, and will calibrate un-calibrated grippers.
Code Walkthrough
Gripper Cuff Control - Code Walkthrough
Usage
$ rosrun baxter_examples gripper_cuff_control.py -h usage: gripper_cuff_control.py [-h] [-g {both,left,right}] [-n] [-v]
RSDK Gripper Button Control Example Connects cuff buttons to gripper open/close commands: 'Circle' Button - open gripper 'Dash' Button - close gripper Cuff 'Squeeze' - turn on Nav lights Run this example in the background or in another terminal to be able to easily control the grippers by hand while using the robot. Can be run in parallel with other code. optional arguments: -h, --help show this help message and exit -g {both,left,right}, --gripper {both,left,right} gripper limb to control (default: both) -n, --no-lights do not trigger lights on cuff grasp -v, --verbose print debug statements
Run the example in an init-ed shell:
$ rosrun baxter_examples gripper_cuff_control.py
At this point the robot will be enabled.
You can at this point grasp the cuff to turn on the navigator lights on the arm whose cuff you grasp.
Grippers:
- If you have an un-calibrated electric gripper attached when you launch this example, it will calibrate.
- If you attach an electric gripper to the robot while this example is running, it will calibrate.
- If you press the oblong button on the cuff of an arm with a gripper attached, it will send a "close" command to the gripper.
- If you press the circle button on the cuff of an arm with a gripper attached, it will send a "open" command to the gripper.
Pressing Control-C
at any time will exit the example.