From 70c84d5b6c3d12d11ddf696cdb729e6af1d0958b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20G=C3=B6kmen?= <1408354+cgokmen@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:53:02 -0700 Subject: [PATCH] Fix disable grasp handling --- .../action_primitives/starter_semantic_action_primitives.py | 2 +- omnigibson/robots/manipulation_robot.py | 2 +- omnigibson/robots/tiago.py | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/omnigibson/action_primitives/starter_semantic_action_primitives.py b/omnigibson/action_primitives/starter_semantic_action_primitives.py index 044896f04..88a52ee40 100644 --- a/omnigibson/action_primitives/starter_semantic_action_primitives.py +++ b/omnigibson/action_primitives/starter_semantic_action_primitives.py @@ -1643,7 +1643,7 @@ def _sample_pose_near_object(self, obj, pose_on_obj=None, **kwargs): pos_on_obj = self._sample_position_on_aabb_face(obj) pose_on_obj = [pos_on_obj, np.array([0, 0, 0, 1])] - distance = np.random.uniform(0.0, 1.0) + distance = np.random.uniform(0.0, 5.0) yaw = np.random.uniform(-np.pi, np.pi) avg_arm_workspace_range = np.mean(self.robot.arm_workspace_range[self.arm]) pose_2d = np.array( diff --git a/omnigibson/robots/manipulation_robot.py b/omnigibson/robots/manipulation_robot.py index 0d6ff3ae3..856eeb82a 100644 --- a/omnigibson/robots/manipulation_robot.py +++ b/omnigibson/robots/manipulation_robot.py @@ -113,7 +113,7 @@ def __init__( # Unique to ManipulationRobot grasping_mode="physical", - disable_grasp_handling=False, # TODO: revert to False. This is for debugging purposes + disable_grasp_handling=False, **kwargs, ): diff --git a/omnigibson/robots/tiago.py b/omnigibson/robots/tiago.py index 6860a8074..d7838d285 100644 --- a/omnigibson/robots/tiago.py +++ b/omnigibson/robots/tiago.py @@ -75,6 +75,7 @@ def __init__( # Unique to ManipulationRobot grasping_mode="physical", + disable_grasp_handling=False, # Unique to Tiago rigid_trunk=False, @@ -129,6 +130,8 @@ def __init__( If "physical", no assistive grasping will be applied (relies on contact friction + finger force). If "assisted", will magnetize any object touching and within the gripper's fingers. If "sticky", will magnetize any object touching the gripper's fingers. + disable_grasp_handling (bool): If True, will disable all grasp handling for this object. This means that + sticky and assisted grasp modes will not work unless the connection/release methodsare manually called. rigid_trunk (bool) if True, will prevent the trunk from moving during execution. default_trunk_offset (float): sets the default height of the robot's trunk default_arm_pose (str): Default pose for the robot arm. Should be one of: @@ -176,6 +179,7 @@ def __init__( proprio_obs=proprio_obs, sensor_config=sensor_config, grasping_mode=grasping_mode, + disable_grasp_handling=disable_grasp_handling, **kwargs, )