From d31cd10991ca2e9c5332c54df80171a6f3ce8cbd Mon Sep 17 00:00:00 2001 From: JamesHeald Date: Mon, 7 Oct 2024 16:26:10 +0100 Subject: [PATCH 1/6] tensorboard directory added in the wand folder so that metrics get logged to wandb in the tensorboard tab --- myosuite/agents/sb3_job_script.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/myosuite/agents/sb3_job_script.py b/myosuite/agents/sb3_job_script.py index c9e1d433..a2f112e3 100644 --- a/myosuite/agents/sb3_job_script.py +++ b/myosuite/agents/sb3_job_script.py @@ -62,6 +62,7 @@ def train_loop(job_data) -> None: learning_rate=job_data.learning_rate, batch_size=job_data.batch_size, policy_kwargs=policy_kwargs, + tensorboard_log=f"wandb/{run.id}", gamma=job_data.gamma, **job_data.alg_hyper_params) elif algo == 'SAC': model = SAC(job_data.policy, env, @@ -70,6 +71,7 @@ def train_loop(job_data) -> None: learning_starts=job_data.learning_starts, batch_size=job_data.batch_size, tau=job_data.tau, + tensorboard_log=f"wandb/{run.id}", gamma=job_data.gamma, **job_data.alg_hyper_params) From 71e709ef1c3ed10bbb6cefc57e6af7420080be2c Mon Sep 17 00:00:00 2001 From: Cheryl Wang <90352960+cherylwang20@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:51:59 -0400 Subject: [PATCH 2/6] BUGFIX: Goal Condition --- myosuite/envs/myo/myochallenge/bimanual_v0.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/myosuite/envs/myo/myochallenge/bimanual_v0.py b/myosuite/envs/myo/myochallenge/bimanual_v0.py index 26bbffd0..2458d565 100644 --- a/myosuite/envs/myo/myochallenge/bimanual_v0.py +++ b/myosuite/envs/myo/myochallenge/bimanual_v0.py @@ -50,7 +50,7 @@ def _setup(self, goal_center=np.array([0.4, -0.25, 1.05]), max_force=1500, # Max force against throwing - proximity_th=0.015, # object-target proximity threshold + proximity_th=0.15, # object-target proximity threshold start_shifts=np.array([0.055, 0.055, 0]), # shift factor for start/goal random generation with z-axis fixed @@ -246,6 +246,7 @@ def get_reward_dict(self, obs_dict): obj_pos = obs_dict["obj_pos"][0][0] if obs_dict['obj_pos'].ndim == 3 else obs_dict['obj_pos'] palm_pos = obs_dict["palm_pos"][0][0] if obs_dict["palm_pos"].ndim == 3 else obs_dict["palm_pos"] goal_pos = obs_dict["goal_pos"][0][0] if obs_dict["goal_pos"].ndim == 3 else obs_dict["goal_pos"] + goal_pos = np.concatenate((goal_pos[:2], np.array([1.09]))) lift_height = np.linalg.norm(np.array([[[obj_pos[-1], palm_pos[-1]]]]) - np.array([[[self.init_obj_z, self.init_palm_z]]]), axis=-1) From 0764d9f4d71d8995f3cc1330b77d9fdb73bdf476 Mon Sep 17 00:00:00 2001 From: Shirui Lyu Date: Thu, 24 Oct 2024 15:24:35 +0100 Subject: [PATCH 3/6] update proximity threshold to 0.03, 10cm in xyz axis --- myosuite/envs/myo/myochallenge/bimanual_v0.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myosuite/envs/myo/myochallenge/bimanual_v0.py b/myosuite/envs/myo/myochallenge/bimanual_v0.py index 2458d565..5b164aef 100644 --- a/myosuite/envs/myo/myochallenge/bimanual_v0.py +++ b/myosuite/envs/myo/myochallenge/bimanual_v0.py @@ -50,7 +50,7 @@ def _setup(self, goal_center=np.array([0.4, -0.25, 1.05]), max_force=1500, # Max force against throwing - proximity_th=0.15, # object-target proximity threshold + proximity_th=0.03, # object-target proximity threshold start_shifts=np.array([0.055, 0.055, 0]), # shift factor for start/goal random generation with z-axis fixed From a70b8f795dfb5a958dd4edfd882ac6a64f722884 Mon Sep 17 00:00:00 2001 From: Cheryl Wang <90352960+cherylwang20@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:15:50 -0400 Subject: [PATCH 4/6] update proximity threshold to 0.17, 10cm in xyz axis --- myosuite/envs/myo/myochallenge/bimanual_v0.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myosuite/envs/myo/myochallenge/bimanual_v0.py b/myosuite/envs/myo/myochallenge/bimanual_v0.py index 5b164aef..bf5f41df 100644 --- a/myosuite/envs/myo/myochallenge/bimanual_v0.py +++ b/myosuite/envs/myo/myochallenge/bimanual_v0.py @@ -50,7 +50,7 @@ def _setup(self, goal_center=np.array([0.4, -0.25, 1.05]), max_force=1500, # Max force against throwing - proximity_th=0.03, # object-target proximity threshold + proximity_th=0.17, # object-target proximity threshold, based on 10cm in each axis in Euclidean Distance start_shifts=np.array([0.055, 0.055, 0]), # shift factor for start/goal random generation with z-axis fixed From 83bc0dc514446555f96899616cb535e20c752669 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 25 Oct 2024 22:28:33 +0100 Subject: [PATCH 5/6] update success criteria: distance to goal center changed to 10cm --- docs/source/challenge-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/challenge-doc.rst b/docs/source/challenge-doc.rst index 936d5c9d..0fdc137b 100644 --- a/docs/source/challenge-doc.rst +++ b/docs/source/challenge-doc.rst @@ -174,7 +174,7 @@ Success Condition - The object moved from start position to goal position. Both the MPL hand, and MyoHand, is required to touch the object for certain timesteps - Exerting a maximum contact force on the object, less than 1500N (subject to change in final EVALUATION environment) - - Placing the object within 0.05 meters of the goal site on the pillar + - Placing the object within 0.17 meters of the goal site on the pillar (0.1m in each of xyz-axis) Ranking Criteria From ae09250d167708a6a6d3b153b3c00310efe6909d Mon Sep 17 00:00:00 2001 From: Cheryl Wang <90352960+cherylwang20@users.noreply.github.com> Date: Sun, 27 Oct 2024 19:09:29 -0400 Subject: [PATCH 6/6] Updated pillar height as a constant variable --- myosuite/envs/myo/myochallenge/bimanual_v0.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/myosuite/envs/myo/myochallenge/bimanual_v0.py b/myosuite/envs/myo/myochallenge/bimanual_v0.py index bf5f41df..7bf225ee 100644 --- a/myosuite/envs/myo/myochallenge/bimanual_v0.py +++ b/myosuite/envs/myo/myochallenge/bimanual_v0.py @@ -78,6 +78,7 @@ def _setup(self, self.start_shifts = start_shifts self.goal_shifts = goal_shifts + self.PILLAR_HEIGHT = 1.09 self.id_info = IdInfo(self.sim.model) @@ -246,7 +247,7 @@ def get_reward_dict(self, obs_dict): obj_pos = obs_dict["obj_pos"][0][0] if obs_dict['obj_pos'].ndim == 3 else obs_dict['obj_pos'] palm_pos = obs_dict["palm_pos"][0][0] if obs_dict["palm_pos"].ndim == 3 else obs_dict["palm_pos"] goal_pos = obs_dict["goal_pos"][0][0] if obs_dict["goal_pos"].ndim == 3 else obs_dict["goal_pos"] - goal_pos = np.concatenate((goal_pos[:2], np.array([1.09]))) + goal_pos = np.concatenate((goal_pos[:2], np.array([self.PILLAR_HEIGHT]))) lift_height = np.linalg.norm(np.array([[[obj_pos[-1], palm_pos[-1]]]]) - np.array([[[self.init_obj_z, self.init_palm_z]]]), axis=-1)