This post has NOT been accepted by the mailing list yet.
This post was updated on .
I am using the example for a grasp, see below. I manipulated the Tgoal a little to make a bad grasp.
I want to evaluate how good the grasp is after closing the fingers. See second last line marked with # TEST HERE:
I looked at grasping.py and there are some functions to test a grasp that determine if a grasp is "fragile" (in fct testGrasp) or "good" (in fct consumer). However, these functions are used within the class GraspingModel (Gmodel).
I don't know how I can use them in my code below. I also looked at a similar post: http://openrave-users-list.185357.n3.nabble.com/grasp-assessment-td2624567.html, but it didn't help me much either.
Thanks for looking into this.
"""Loads the grasping model and moves the robot to the first grasp found
from openravepy import *
import numpy, time
robot = env.GetRobots()
target = env.GetKinBody('mug1')
gmodel = databases.grasping.GraspingModel(robot,target)
if not gmodel.load():
validgrasps, validindicees = gmodel.computeValidGrasps(returnnum=1)
Tgoal = gmodel.getGlobalGraspTransform(validgrasps,collisionfree=True)
basemanip = interfaces.BaseManipulation(robot)
Tgoal = Tgoal-0.12 # manipulate transform a little along x-axis, so that the robot misses the object (or results in a bad grasp).
taskmanip = interfaces.TaskManipulation(robot)
# TEST HERE: I want to test if the grasp is "good", which means with high certainty can pick up the object without dropping or slipping
testVar = raw_input("Please press a key to exit")