grasp_vecs, _ = gmm.sample(n_samples=self._num_gmm_samples)
grasp_vecs = elite_grasp_std * grasp_vecs + elite_grasp_mean
sample_duration = time() - sample_start
logging.debug("GMM sampling took %.3f sec" %(sample_duration))
// convert features to grasps and store if in segmask
for grasp_vec in grasp_vecs:
if grasp_type == "parallel_jaw":
After Change
grasp.center.x >= 0 and grasp.center.x < state.segmask.width and \
np.any(state.segmask[int(grasp.center.y), int(grasp.center.x)] != 0)):
grasps.append(grasp)
logging.debug("Bounds took %.5f sec" %(time()-bounds_start))
// check num grasps
num_grasps = len(grasps)
if num_grasps == 0: