Note that this package depends on graspit ros packages see: graspit_interface
In one terminal:
roslaunch grid_sample_plugin grid_sample_plugin.launch
Then, in another terminal:
import graspit_commander
gc = graspit_commander.GraspitCommander()
gc.loadWorld('plannerMug')
import grid_sample_client
pre_grasps = grid_sample_client.GridSampleClient.computePreGrasps(10, 0) # resolution, sampling_type
grasps = grid_sample_client.GridSampleClient.evaluatePreGrasps(pre_grasps.grasps)