Precompile raycast fn
This commit is contained in:
parent
90ef7e98d2
commit
55658948d6
@ -56,10 +56,31 @@ def raycast(
|
|||||||
class NextBestView(MultiViewPolicy):
|
class NextBestView(MultiViewPolicy):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
self.compile()
|
||||||
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 = rospy.get_param("nbv_grasp/max_views")
|
self.max_views = rospy.get_param("nbv_grasp/max_views")
|
||||||
self.min_gain = rospy.get_param("nbv_grasp/min_gain")
|
self.min_gain = rospy.get_param("nbv_grasp/min_gain")
|
||||||
|
|
||||||
|
def compile(self):
|
||||||
|
# Trigger the JIT compilation
|
||||||
|
raycast(
|
||||||
|
1.0,
|
||||||
|
np.zeros((40, 40, 40), dtype=np.float32),
|
||||||
|
np.eye(3),
|
||||||
|
np.zeros(3),
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
1.0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0.0,
|
||||||
|
1.0,
|
||||||
|
0.1,
|
||||||
|
)
|
||||||
|
|
||||||
def activate(self, bbox, view_sphere):
|
def activate(self, bbox, view_sphere):
|
||||||
super().activate(bbox, view_sphere)
|
super().activate(bbox, view_sphere)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user