Minor
This commit is contained in:
parent
efe6e9d1bd
commit
732effa39f
@ -14,6 +14,7 @@ def get_voxel_at(voxel_size, p):
|
|||||||
return index if (index >= 0).all() and (index < 40).all() else None
|
return index if (index >= 0).all() and (index < 40).all() else None
|
||||||
|
|
||||||
|
|
||||||
|
# Note that the jit compilation takes some time the first time raycast is called
|
||||||
@jit(nopython=True)
|
@jit(nopython=True)
|
||||||
def raycast(
|
def raycast(
|
||||||
voxel_size,
|
voxel_size,
|
||||||
@ -56,7 +57,7 @@ class NextBestView(MultiViewPolicy):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.min_z_dist = rospy.get_param("~camera/min_z_dist")
|
self.min_z_dist = rospy.get_param("~camera/min_z_dist")
|
||||||
self.max_views = 100
|
self.max_views = 80
|
||||||
|
|
||||||
def activate(self, bbox, view_sphere):
|
def activate(self, bbox, view_sphere):
|
||||||
super().activate(bbox, view_sphere)
|
super().activate(bbox, view_sphere)
|
||||||
|
@ -74,12 +74,12 @@ class Policy:
|
|||||||
for grasp in in_grasps:
|
for grasp in in_grasps:
|
||||||
pose = self.T_base_task * grasp.pose
|
pose = self.T_base_task * grasp.pose
|
||||||
R, t = pose.rotation, pose.translation
|
R, t = pose.rotation, pose.translation
|
||||||
|
tip = pose.rotation.apply([0, 0, 0.05]) + pose.translation
|
||||||
|
|
||||||
# Filter out artifacts close to the support
|
# Filter out artifacts close to the support
|
||||||
if t[2] < self.bbox.min[2] + 0.04:
|
if t[2] < self.bbox.min[2] + 0.05 or tip[2] < self.bbox.min[2] + 0.02:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
tip = pose.rotation.apply([0, 0, 0.05]) + pose.translation
|
|
||||||
if self.bbox.is_inside(tip):
|
if self.bbox.is_inside(tip):
|
||||||
grasp.pose = pose
|
grasp.pose = pose
|
||||||
q_grasp = self.ee_model.ik(q, pose * self.T_grasp_ee)
|
q_grasp = self.ee_model.ik(q, pose * self.T_grasp_ee)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user