Read nbv params from the rosparam server
This commit is contained in:
parent
5e1876432b
commit
fcc5045671
@ -1,6 +1,6 @@
|
||||
bt_sim:
|
||||
gui: False
|
||||
cam_noise: True
|
||||
cam_noise: False
|
||||
scene: kitchen.yaml
|
||||
|
||||
grasp_controller:
|
||||
@ -8,7 +8,6 @@ grasp_controller:
|
||||
ee_grasp_offset: [0.0, 0.0, -0.383, 0.924, 0.0, 0.0, 0.065] # offset to panda_link8
|
||||
control_rate: 30
|
||||
linear_vel: 0.05
|
||||
policy_rate: 2
|
||||
camera:
|
||||
frame_id: camera_depth_optical_frame
|
||||
info_topic: /camera/depth/camera_info
|
||||
@ -19,3 +18,11 @@ vgn:
|
||||
model: $(find vgn)/assets/models/vgn_conv.pth
|
||||
finger_depth: 0.05
|
||||
qual_threshold: 0.9
|
||||
|
||||
policy:
|
||||
rate: 2
|
||||
window_size: 6
|
||||
|
||||
nbv_grasp:
|
||||
max_views: 30
|
||||
min_gain: 0.0
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user