Skip to content

Commit

Permalink
Fix disable grasp handling
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Sep 28, 2023
1 parent 4b90252 commit 70c84d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion omnigibson/robots/manipulation_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand Down
4 changes: 4 additions & 0 deletions omnigibson/robots/tiago.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(

# Unique to ManipulationRobot
grasping_mode="physical",
disable_grasp_handling=False,

# Unique to Tiago
rigid_trunk=False,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
)

Expand Down

0 comments on commit 70c84d5

Please sign in to comment.