Read nbv params from the rosparam server
This commit is contained in:
@@ -34,7 +34,7 @@ class GraspController:
|
||||
self.min_z_dist = rospy.get_param("~camera/min_z_dist")
|
||||
self.control_rate = rospy.get_param("~control_rate")
|
||||
self.linear_vel = rospy.get_param("~linear_vel")
|
||||
self.policy_rate = rospy.get_param("~policy_rate")
|
||||
self.policy_rate = rospy.get_param("policy/rate")
|
||||
|
||||
def init_service_proxies(self):
|
||||
self.reset_env = rospy.ServiceProxy("reset", Reset)
|
||||
|
@@ -57,8 +57,8 @@ class NextBestView(MultiViewPolicy):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.min_z_dist = rospy.get_param("~camera/min_z_dist")
|
||||
self.max_views = 50
|
||||
self.min_gain = 0.0
|
||||
self.max_views = rospy.get_param("nbv_grasp/max_views")
|
||||
self.min_gain = rospy.get_param("nbv_grasp/min_gain")
|
||||
|
||||
def activate(self, bbox, view_sphere):
|
||||
super().activate(bbox, view_sphere)
|
||||
|
@@ -118,9 +118,12 @@ class SingleViewPolicy(Policy):
|
||||
|
||||
|
||||
class MultiViewPolicy(Policy):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.T = rospy.get_param("policy/window_size")
|
||||
|
||||
def activate(self, bbox, view_sphere):
|
||||
super().activate(bbox, view_sphere)
|
||||
self.T = 10 # Window size of grasp prediction history
|
||||
self.qual_hist = np.zeros((self.T,) + (40,) * 3, np.float32)
|
||||
|
||||
def integrate(self, img, x, q):
|
||||
|
Reference in New Issue
Block a user