From 0d4f2358a104ac6e181ed84fccb7c621760917e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cem=20G=C3=B6kmen?= <1408354+cgokmen@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:53:25 -0700 Subject: [PATCH] Make Tiago run OK on the GPU --- .../starter_semantic_action_primitives.py | 10 -- tests/test_symbolic_primitives.py | 92 ++++++++++--------- 2 files changed, 50 insertions(+), 52 deletions(-) diff --git a/omnigibson/action_primitives/starter_semantic_action_primitives.py b/omnigibson/action_primitives/starter_semantic_action_primitives.py index 3b50a512e..865e13816 100644 --- a/omnigibson/action_primitives/starter_semantic_action_primitives.py +++ b/omnigibson/action_primitives/starter_semantic_action_primitives.py @@ -244,9 +244,6 @@ def __init__(self, task, scene, robot, add_context=False): self.robot_copy = self._load_robot_copy(robot) - if self.robot_model == "Tiago": - self._setup_tiago() - def with_context(self, action): if not self.add_context: return action @@ -266,13 +263,6 @@ def with_context(self, action): print(context) return action, context - # Disable grasping frame for Tiago robot (Should be cleaned up in the future) - def _setup_tiago(self): - for link in self.robot.links.values(): - for mesh in link.collision_meshes.values(): - if "grasping_frame" in link.prim_path: - mesh.collision_enabled = False - @staticmethod def _load_robot_copy(robot): robot_copy = RobotCopy() diff --git a/tests/test_symbolic_primitives.py b/tests/test_symbolic_primitives.py index c8f45f8a7..08353539a 100644 --- a/tests/test_symbolic_primitives.py +++ b/tests/test_symbolic_primitives.py @@ -27,49 +27,57 @@ def start_env(): }, "robots": [ { - "type": "Fetch", - "obs_modalities": [ - "scan", - "rgb", - "depth" - ], - "scale": 1, - "self_collisions": True, - "action_normalize": False, - "action_type": "continuous", - "grasping_mode": "sticky", - "disable_grasp_handling": True, - "rigid_trunk": False, - "default_trunk_offset": 0.365, - "default_arm_pose": "diagonal30", - "reset_joint_pos": "tuck", - "controller_config": { - "base": { - "name": "DifferentialDriveController" - }, - "arm_0": { - "name": "JointController", - "motor_type": "position", - "command_input_limits": None, - "command_output_limits": None, - "use_delta_commands": False - }, - "gripper_0": { - "name": "JointController", - "motor_type": "position", - "command_input_limits": [ - -1, - 1 - ], - "command_output_limits": None, - "use_delta_commands": True, - "use_single_command": True - }, - "camera": { - "name": "JointController", - "use_delta_commands": False + "type": "Tiago", + "obs_modalities": ["scan", "rgb", "depth"], + "scale": 1.0, + "self_collisions": True, + "action_normalize": False, + "action_type": "continuous", + "grasping_mode": "sticky", + "rigid_trunk": False, + "default_arm_pose": "diagonal30", + "default_trunk_offset": 0.365, + "controller_config": { + "base": { + "name": "JointController", + "motor_type": "velocity" + }, + "arm_left": { + "name": "JointController", + "motor_type": "position", + "command_input_limits": None, + "command_output_limits": None, + "use_delta_commands": False + }, + "arm_right": { + "name": "JointController", + "motor_type": "position", + "command_input_limits": None, + "command_output_limits": None, + "use_delta_commands": False + }, + "gripper_left": { + "name": "JointController", + "motor_type": "position", + "command_input_limits": [-1, 1], + "command_output_limits": None, + "use_delta_commands": True, + "use_single_command": True + }, + "gripper_right": { + "name": "JointController", + "motor_type": "position", + "command_input_limits": [-1, 1], + "command_output_limits": None, + "use_delta_commands": True, + "use_single_command": True + }, + "camera": { + "name": "JointController", + "motor_type": "velocity", + "use_delta_commands": False + } } - } } ], "objects": [