From 9ea37a4fc6a0e023e7f8ad8a3e88505fc516e6b6 Mon Sep 17 00:00:00 2001 From: Reggie McLean Date: Tue, 23 Apr 2024 13:05:52 -0400 Subject: [PATCH] updating for np.float64 --- .../mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py | 10 +++++----- .../mujoco/sawyer_xyz/v2/sawyer_basketball_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_box_close_v2.py | 8 ++++---- .../v2/sawyer_button_press_topdown_v2.py | 12 ++++++------ .../v2/sawyer_button_press_topdown_wall_v2.py | 12 ++++++------ .../mujoco/sawyer_xyz/v2/sawyer_button_press_v2.py | 12 ++++++------ .../sawyer_xyz/v2/sawyer_button_press_wall_v2.py | 12 ++++++------ .../sawyer_xyz/v2/sawyer_coffee_button_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_coffee_pull_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_coffee_push_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_dial_turn_v2.py | 10 +++++----- .../sawyer_xyz/v2/sawyer_disassemble_peg_v2.py | 2 +- .../mujoco/sawyer_xyz/v2/sawyer_door_close_v2.py | 12 ++++++------ .../mujoco/sawyer_xyz/v2/sawyer_door_lock_v2.py | 12 ++++++------ .../mujoco/sawyer_xyz/v2/sawyer_door_unlock_v2.py | 10 +++++----- .../envs/mujoco/sawyer_xyz/v2/sawyer_door_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_drawer_close_v2.py | 14 +++++++------- .../mujoco/sawyer_xyz/v2/sawyer_drawer_open_v2.py | 14 +++++++------- .../mujoco/sawyer_xyz/v2/sawyer_faucet_close_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_faucet_open_v2.py | 8 ++++---- .../envs/mujoco/sawyer_xyz/v2/sawyer_hammer_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_hand_insert_v2.py | 8 ++++---- .../sawyer_xyz/v2/sawyer_handle_press_side_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_handle_press_v2.py | 8 ++++---- .../sawyer_xyz/v2/sawyer_handle_pull_side_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_handle_pull_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_lever_pull_v2.py | 10 +++++----- .../sawyer_xyz/v2/sawyer_peg_unplug_side_v2.py | 8 ++++---- .../sawyer_xyz/v2/sawyer_pick_out_of_hole_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_pick_place_v2.py | 4 ++-- .../sawyer_xyz/v2/sawyer_pick_place_wall_v2.py | 4 ++-- .../v2/sawyer_plate_slide_back_side_v2.py | 8 ++++---- .../sawyer_xyz/v2/sawyer_plate_slide_back_v2.py | 8 ++++---- .../sawyer_xyz/v2/sawyer_plate_slide_side_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_plate_slide_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_push_back_v2.py | 6 +++--- .../envs/mujoco/sawyer_xyz/v2/sawyer_push_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_push_wall_v2.py | 4 ++-- .../envs/mujoco/sawyer_xyz/v2/sawyer_reach_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_reach_wall_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_shelf_place_v2.py | 8 ++++---- .../envs/mujoco/sawyer_xyz/v2/sawyer_soccer_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_stick_pull_v2.py | 4 ++-- .../mujoco/sawyer_xyz/v2/sawyer_stick_push_v2.py | 4 ++-- .../sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py | 4 ++-- .../envs/mujoco/sawyer_xyz/v2/sawyer_sweep_v2.py | 8 ++++---- .../mujoco/sawyer_xyz/v2/sawyer_window_close_v2.py | 12 ++++++------ .../mujoco/sawyer_xyz/v2/sawyer_window_open_v2.py | 14 +++++++------- 48 files changed, 185 insertions(+), 185 deletions(-) diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py index 984235b0d..11fac8d82 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_assembly_peg_v2.py @@ -32,11 +32,11 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0, 0.6, 0.02], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([0, 0.6, 0.02], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } - self.goal = np.array([0.1, 0.8, 0.1], dtype=np.float32) + self.goal = np.array([0.1, 0.8, 0.1], dtype=np.float64) self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] self.hand_init_pos = self.init_config["hand_init_pos"] @@ -46,8 +46,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_basketball_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_basketball_v2.py index 05684e186..28ffec767 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_basketball_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_basketball_v2.py @@ -33,8 +33,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0, 0.6, 0.03], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([0, 0.6, 0.03], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } self.goal = np.array([0, 0.9, 0]) self.obj_init_pos = self.init_config["obj_init_pos"] diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_box_close_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_box_close_v2.py index 49f33dbc0..09e34c63d 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_box_close_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_box_close_v2.py @@ -30,8 +30,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0, 0.55, 0.02], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([0, 0.55, 0.02], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } self.goal = np.array([0.0, 0.75, 0.133]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -41,8 +41,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self._target_to_obj_init = None self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self._random_reset_space = Box( np.hstack((obj_low, goal_low)), diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_v2.py index 434cf16d5..487506028 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_v2.py @@ -27,8 +27,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): ) self.init_config = { - "obj_init_pos": np.array([0, 0.8, 0.115], dtype=np.float32), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0, 0.8, 0.115], dtype=np.float64), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.goal = np.array([0, 0.88, 0.1]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -38,12 +38,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_wall_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_wall_v2.py index bacc94cdf..49167ef18 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_wall_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_topdown_wall_v2.py @@ -27,8 +27,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): ) self.init_config = { - "obj_init_pos": np.array([0, 0.8, 0.115], dtype=np.float32), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0, 0.8, 0.115], dtype=np.float64), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.goal = np.array([0, 0.88, 0.1]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -38,12 +38,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_v2.py index cfff0fbd2..4a86a1096 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_v2.py @@ -27,8 +27,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): ) self.init_config = { - "obj_init_pos": np.array([0.0, 0.9, 0.115], dtype=np.float32), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.9, 0.115], dtype=np.float64), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.goal = np.array([0, 0.78, 0.12]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -37,12 +37,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_wall_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_wall_v2.py index 72e600483..0b966884a 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_wall_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_button_press_wall_v2.py @@ -27,8 +27,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): ) self.init_config = { - "obj_init_pos": np.array([0.0, 0.9, 0.115], dtype=np.float32), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.9, 0.115], dtype=np.float64), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.goal = np.array([0, 0.84, 0.12]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -38,13 +38,13 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_button_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_button_v2.py index cf89ef82a..eac578a07 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_button_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_button_v2.py @@ -43,12 +43,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.hand_init_pos = self.init_config["hand_init_pos"] self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_pull_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_pull_v2.py index 259c854f4..03c88bec5 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_pull_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_pull_v2.py @@ -44,8 +44,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_push_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_push_v2.py index e8edc10c5..33aa94fc5 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_push_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_push_v2.py @@ -44,8 +44,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_dial_turn_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_dial_turn_v2.py index 8ea123cdc..4138024e5 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_dial_turn_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_dial_turn_v2.py @@ -32,19 +32,19 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_pos": np.array([0, 0.7, 0.0]), - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } self.goal = np.array([0.0, 0.73, 0.08]) self.obj_init_pos = self.init_config["obj_init_pos"] self.hand_init_pos = self.init_config["hand_init_pos"] self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_disassemble_peg_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_disassemble_peg_v2.py index ddd6cc43b..ae2c52b49 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_disassemble_peg_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_disassemble_peg_v2.py @@ -33,7 +33,7 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, "obj_init_pos": np.array([0, 0.7, 0.025]), - "hand_init_pos": np.array((0, 0.4, 0.2), dtype=np.float32), + "hand_init_pos": np.array((0, 0.4, 0.2), dtype=np.float64), } self.goal = np.array([0, 0.8, 0.17]) self.obj_init_pos = self.init_config["obj_init_pos"] diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_close_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_close_v2.py index ee092ab53..b48f446db 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_close_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_close_v2.py @@ -30,8 +30,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0.1, 0.95, 0.15], dtype=np.float32), - "hand_init_pos": np.array([-0.5, 0.6, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0.1, 0.95, 0.15], dtype=np.float64), + "hand_init_pos": np.array([-0.5, 0.6, 0.2], dtype=np.float64), } self.goal = np.array([0.2, 0.8, 0.15]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -42,13 +42,13 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.door_qvel_adr = self.model.joint("doorjoint").dofadr.item() self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_lock_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_lock_v2.py index 1ca8f3917..caf0f8f4d 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_lock_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_lock_v2.py @@ -27,8 +27,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): ) self.init_config = { - "obj_init_pos": np.array([0, 0.85, 0.15], dtype=np.float32), - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0, 0.85, 0.15], dtype=np.float64), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } self.goal = np.array([0, 0.85, 0.1]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -40,12 +40,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self._lock_length = 0.1 self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_unlock_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_unlock_v2.py index 9f55f995a..1bc0038cc 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_unlock_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_unlock_v2.py @@ -29,7 +29,7 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_pos": np.array([0, 0.85, 0.15]), - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } self.goal = np.array([0, 0.85, 0.1]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -38,12 +38,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self._lock_length = 0.1 self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_v2.py index 77962d96a..ad82bdce7 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_door_v2.py @@ -43,12 +43,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.door_qvel_adr = self.model.joint("doorjoint").dofadr.item() self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_close_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_close_v2.py index 0347c3112..00e146d62 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_close_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_close_v2.py @@ -33,10 +33,10 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): [ 0.3, ], - dtype=np.float32, + dtype=np.float64, ), - "obj_init_pos": np.array([0.0, 0.9, 0.0], dtype=np.float32), - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.9, 0.0], dtype=np.float64), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] @@ -46,12 +46,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.maxDist = 0.15 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_open_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_open_v2.py index 9c63c12dc..7ca54c9b5 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_open_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_drawer_open_v2.py @@ -31,10 +31,10 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): [ 0.3, ], - dtype=np.float32, + dtype=np.float64, ), - "obj_init_pos": np.array([0.0, 0.9, 0.0], dtype=np.float32), - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.9, 0.0], dtype=np.float64), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] @@ -44,12 +44,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.maxDist = 0.2 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_close_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_close_v2.py index 5047cfbc2..767620edd 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_close_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_close_v2.py @@ -39,12 +39,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_open_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_open_v2.py index 5f0bb3813..6d897a6b1 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_open_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_faucet_open_v2.py @@ -39,12 +39,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hammer_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hammer_v2.py index d2caff1be..6037ac1bc 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hammer_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hammer_v2.py @@ -42,8 +42,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self._random_reset_space = Box(np.array(obj_low), np.array(obj_high)) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hand_insert_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hand_insert_v2.py index 947630d3d..ed64ac560 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hand_insert_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hand_insert_v2.py @@ -32,9 +32,9 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_pos": np.array([0, 0.6, 0.05]), "obj_init_angle": 0.3, - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } - self.goal = np.array([0.0, 0.84, -0.08], dtype=np.float32) + self.goal = np.array([0.0, 0.84, -0.08], dtype=np.float64) self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] self.hand_init_pos = self.init_config["hand_init_pos"] @@ -44,8 +44,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_side_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_side_v2.py index 46924fb17..9ecc7f0da 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_side_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_side_v2.py @@ -55,12 +55,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_v2.py index 6bcd0d15f..81c2fb8e8 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_press_v2.py @@ -41,12 +41,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.hand_init_pos = self.init_config["hand_init_pos"] self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_side_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_side_v2.py index b92352889..78d47d127 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_side_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_side_v2.py @@ -40,12 +40,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_v2.py index 49fcbc908..07e1c33a2 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_handle_pull_v2.py @@ -39,12 +39,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.hand_init_pos = self.init_config["hand_init_pos"] self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_lever_pull_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_lever_pull_v2.py index f582e8211..248aaa143 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_lever_pull_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_lever_pull_v2.py @@ -44,7 +44,7 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_pos": np.array([0, 0.7, 0.0]), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.goal = np.array([0.12, 0.88, 0.05]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -55,12 +55,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_peg_unplug_side_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_peg_unplug_side_v2.py index bda5ef56c..969187e0e 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_peg_unplug_side_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_peg_unplug_side_v2.py @@ -37,12 +37,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.hand_init_pos = self.init_config["hand_init_pos"] self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_out_of_hole_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_out_of_hole_v2.py index 157e6884a..dc4a4b7e5 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_out_of_hole_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_out_of_hole_v2.py @@ -44,8 +44,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_v2.py index ab72e1749..14cf63392 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_v2.py @@ -59,8 +59,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.num_resets = 0 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_wall_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_wall_v2.py index e4d7381d2..1e96d3dbe 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_wall_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_pick_place_wall_v2.py @@ -60,8 +60,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.num_resets = 0 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_side_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_side_v2.py index ea6108c3e..667b94e30 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_side_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_side_v2.py @@ -46,8 +46,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([-0.25, 0.6, 0.02], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([-0.25, 0.6, 0.02], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } self.goal = np.array([0.0, 0.6, 0.015]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -59,8 +59,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_v2.py index bbf6dc21f..3d7d39977 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_back_v2.py @@ -30,8 +30,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0.0, 0.85, 0.0], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.85, 0.0], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } self.goal = np.array([0.0, 0.6, 0.015]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -43,8 +43,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_side_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_side_v2.py index eff96b74d..40ff309e0 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_side_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_side_v2.py @@ -30,8 +30,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0.0, 0.6, 0.0], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.6, 0.0], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } self.goal = np.array([-0.25, 0.6, 0.015]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -43,8 +43,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_v2.py index b1ce7c56e..17452f176 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_plate_slide_v2.py @@ -32,8 +32,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0.0, 0.6, 0.0], dtype=np.float32), - "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float32), + "obj_init_pos": np.array([0.0, 0.6, 0.0], dtype=np.float64), + "hand_init_pos": np.array((0, 0.6, 0.2), dtype=np.float64), } self.goal = np.array([0.0, 0.85, 0.02]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -45,8 +45,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_back_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_back_v2.py index 35987105f..181f1c16a 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_back_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_back_v2.py @@ -34,7 +34,7 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_pos": np.array([0, 0.8, 0.02]), "obj_init_angle": 0.3, - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } self.goal = np.array([0.0, 0.6, 0.02]) self.obj_init_pos = self.init_config["obj_init_pos"] @@ -46,8 +46,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_v2.py index a7452f2e0..60fc4aa98 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_v2.py @@ -66,8 +66,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.num_resets = 0 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_wall_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_wall_v2.py index 9c02a2bff..754cf7e62 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_wall_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_push_wall_v2.py @@ -64,8 +64,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.num_resets = 0 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_v2.py index 85e16cfcd..4db738c7a 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_v2.py @@ -60,8 +60,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_wall_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_wall_v2.py index 29a20d30f..3be0e9877 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_wall_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_reach_wall_v2.py @@ -59,8 +59,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.num_resets = 0 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_shelf_place_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_shelf_place_v2.py index be57e8c6d..8cfc73843 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_shelf_place_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_shelf_place_v2.py @@ -32,9 +32,9 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_pos": np.array([0, 0.6, 0.02]), "obj_init_angle": 0.3, - "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float32), + "hand_init_pos": np.array([0, 0.6, 0.2], dtype=np.float64), } - self.goal = np.array([0.0, 0.85, 0.301], dtype=np.float32) + self.goal = np.array([0.0, 0.85, 0.301], dtype=np.float64) self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] self.hand_init_pos = self.init_config["hand_init_pos"] @@ -46,8 +46,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_soccer_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_soccer_v2.py index 1a79c91b4..ec8b2d475 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_soccer_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_soccer_v2.py @@ -47,8 +47,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_pull_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_pull_v2.py index ebbe47e85..0f9e38074 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_pull_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_pull_v2.py @@ -41,8 +41,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.obj_init_qpos = np.array([0.0, 0.09]) self.obj_space = Box(np.array(obj_low), np.array(obj_high)) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self._random_reset_space = Box( np.hstack((obj_low, goal_low)), diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_push_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_push_v2.py index 28a983ddd..ced1bf241 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_push_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_stick_push_v2.py @@ -41,8 +41,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.obj_init_qpos = np.array([0.0, 0.0]) self.obj_space = Box(np.array(obj_low), np.array(obj_high)) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self._random_reset_space = Box( np.hstack((obj_low, goal_low)), diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py index dcc0faf81..cbc42065d 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py @@ -45,8 +45,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): np.hstack((obj_high, goal_high)), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_v2.py index 349fc7c8b..a740b7f69 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_v2.py @@ -43,12 +43,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_puck_z = init_puck_z self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) @property diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_close_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_close_v2.py index af695b6c8..f37d05d38 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_close_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_close_v2.py @@ -43,8 +43,8 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.init_config = { "obj_init_angle": 0.3, - "obj_init_pos": np.array([0.1, 0.785, 0.16], dtype=np.float32), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "obj_init_pos": np.array([0.1, 0.785, 0.16], dtype=np.float64), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] @@ -56,12 +56,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): self.liftThresh = liftThresh self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.maxPullDist = 0.2 diff --git a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_open_v2.py b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_open_v2.py index ff0c52f95..49cfa35d2 100644 --- a/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_open_v2.py +++ b/metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_window_open_v2.py @@ -44,10 +44,10 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): [ 0.3, ], - dtype=np.float32, + dtype=np.float64, ), - "obj_init_pos": np.array([-0.1, 0.785, 0.16], dtype=np.float32), - "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float32), + "obj_init_pos": np.array([-0.1, 0.785, 0.16], dtype=np.float64), + "hand_init_pos": np.array([0, 0.4, 0.2], dtype=np.float64), } self.obj_init_pos = self.init_config["obj_init_pos"] self.obj_init_angle = self.init_config["obj_init_angle"] @@ -57,12 +57,12 @@ def __init__(self, render_mode=None, camera_name=None, camera_id=None): goal_high = self.hand_high self._random_reset_space = Box( - np.array(obj_low, dtype=np.float32), - np.array(obj_high, dtype=np.float32), + np.array(obj_low, dtype=np.float64), + np.array(obj_high, dtype=np.float64), ) self.goal_space = Box( - np.array(goal_low, dtype=np.float32), - np.array(goal_high, dtype=np.float32), + np.array(goal_low, dtype=np.float64), + np.array(goal_high, dtype=np.float64), ) self.maxPullDist = 0.2