diff --git a/predicators/spot_utils/spot_utils.py b/predicators/spot_utils/spot_utils.py index 4ae735460c..552030b4b4 100644 --- a/predicators/spot_utils/spot_utils.py +++ b/predicators/spot_utils/spot_utils.py @@ -757,11 +757,14 @@ def placeOntopController(self, objs: Sequence[Object], relative_to_default_pose=False, angle=angle) # Look down to see if the object landed where we hoped. - self.hand_movement(params, - keep_hand_pose=False, - relative_to_default_pose=False, - open_gripper=False, - angle=(np.cos(np.pi / 4), 0, np.sin(np.pi / 4), 0)) + if objs[2].type.name == "bag": + self.hand_movement(params, + keep_hand_pose=False, + relative_to_default_pose=False, + open_gripper=False, + angle=(np.cos(np.pi / 4), 0, np.sin(np.pi / 4), 0)) + else: + self.stow_arm() # Longer sleep necessary to prevent blurry images. time.sleep(2.0) diff --git a/predicators/utils.py b/predicators/utils.py index aa864eb956..8026512e78 100644 --- a/predicators/utils.py +++ b/predicators/utils.py @@ -60,6 +60,8 @@ from predicators.third_party.fast_downward_translator.translate import \ main as downward_translate +from bosdyn.client import math_helpers + if TYPE_CHECKING: from predicators.envs import BaseEnv