[LanguageSetup] [TitleIndex] [WordIndex

Tutorial: Single-hand Gestures

This tutorial assumes that you have completed the software installation tutorial, and the single-hand driver bringup tutorial.

To demonstrate simple usage of the hands, we have provided a minimalist program which can perform a few canonical grasps. This functionality can be exercised via either ROS topics or ROS services.

For simplicity and code density, this tutorial uses a Python ROS service client. Note that like all command-line ROS services, particularly from Python, this is not designed to be used in a real-time scenario; there is nontrivial startup cost associated with spinning up the Python VM, querying the ROS Master for the service provider, and then establishing the necessary peer-to-peer connections. This tutorial is just provided for explanatory purposes and should be completely discarded if any speed is required whatsoever.

First, ensure that the hand was properly homed and that the ROS driver is up and running, as described in the tutorial.

The simplest way to move the fingers is to use the extremely simple sandia_hand_teleop package, which is provided just for reference. These scripts are not meant for use in anything other than this simple checkout demonstration. In any event, first we can start the grasp server in its own terminal:

rosrun sandia_hand_teleop simple_grasp.py

This starts a ROS service  simple_grasp  which accepts a grasp name and a single number representing the "closed-ness" of the grasp, where zero means "fully open" and one means "fully closed." The actual joint positions will vary considerably for each grasp; the idea here is to simplify the grasp to a one-dimensional parameter. The  simple_grasp  server left running in its own terminal. It will print its mapping of grasps and joint angles to stdout as it gets grasp requests.

As a starting point, try this in a new terminal:

rosrun sandia_hand_teleop simple_grasp_client.py only cylindrical 0.5

The "only" parameter tells the program to look for a "simple_grasp" service at the global level, as opposed to a grasp service being provided in the namespace of a left or right hand. The next parameter, "cylindrical", selects the grasp type. At time of writing, this demonstration program has cylindrical, spherical, and prismatic grasps coded in. (Note this program is extremely simplistic (see source) and is intended just for demonstration purposes.) The final parameter is the "amount" of the grasp, where zero means "fully open" and one means "fully closed," and everything in between attempts to do the right thing.

Some other grasps to see as examples:

rosrun sandia_hand_teleop simple_grasp_client.py only spherical 0.2

rosrun sandia_hand_teleop simple_grasp_client.py only spherical 0.8

rosrun sandia_hand_teleop simple_grasp_client.py only prismatic 0.7

When finished exercising the hand, it will save time later if you command it to move back to the fully-outstretched (home) position, so you don't have to manually backdrive it before the next power-up of the fingers. For example, try this:

rosrun sandia_hand_teleop simple_grasp_client.py only cylindrical 0

It is convenient to make this a bash alias or script, since it will be used a lot.

When done using the hand, be sure to Ctrl-C the terminal running sandia_hand_driver, or its launch script. This will power down the fingers.


2022-03-17 10:26