Skip to content

Commit 98c9ca4

Browse files
tusharsangamJimmy Yang
authored and
Jimmy Yang
committed
reverting changes to allow interruption during pick
add done button back intel rs and depth window minimization
1 parent 1850c2d commit 98c9ca4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

spot_rl_experiments/spot_rl/ros_img_vis.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,10 @@ def generate_composite(self):
332332
img = np.concatenate((img, display_img), axis=0)
333333

334334
# Add human_type_msg button for human intervention
335-
human_done_button = {"upper_left": (4850, 800), "bottom_right": (4950, 900)}
335+
human_done_button = {
336+
"upper_left": (2050, 2300),
337+
"bottom_right": (2050 + 100, 2300 + 100),
338+
}
336339

337340
def onMouse(event, x, y, flags, param):
338341
if event == cv2.EVENT_LBUTTONDOWN:

spot_rl_experiments/spot_rl/utils/img_publishers.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ def _publish(self):
124124
image_responses = self.spot.get_image_responses(
125125
self.sources[:2], quality=100, await_the_resp=False
126126
)
127-
hand_image_responses = self.spot.get_hand_image()
127+
128+
try:
129+
hand_image_responses = self.spot.get_hand_image()
130+
except Exception as e:
131+
print(f"Intel RS issue due to {e}, use gripper image")
132+
hand_image_responses = self.spot.get_hand_image(force_get_gripper=True)
133+
128134
image_responses = image_responses.result()
129135
image_responses.extend(hand_image_responses)
130136

@@ -544,7 +550,7 @@ def convert_2d_pixel_to_3d(
544550
pixel_uv,
545551
depth_raw,
546552
camera_intrinsics,
547-
patch_size=40,
553+
patch_size=20,
548554
default_z: float = None,
549555
return_z=False,
550556
):

0 commit comments

Comments
 (0)