Skip to content

Commit 0e3de1c

Browse files
committed
modify metaworld to include done - finish v1
1 parent 6119e98 commit 0e3de1c

File tree

99 files changed

+123
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+123
-54
lines changed
-2.87 KB
Binary file not shown.

cs285/data/hw3_ check_CartPole-v0_26-10-2020_01-25-41/events.out.tfevents.1603700741.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_ todo_CartPole-v0_26-10-2020_00-53-47/events.out.tfevents.1603698827.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_ todo_CartPole-v0_26-10-2020_01-20-13/events.out.tfevents.1603700413.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-26-42/events.out.tfevents.1603700802.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-48-25/events.out.tfevents.1603702105.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-48-41/events.out.tfevents.1603702121.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-48-53/events.out.tfevents.1603702133.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-49-16/events.out.tfevents.1603702156.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-54-13/events.out.tfevents.1603702453.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-54-57/events.out.tfevents.1603702497.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-55-33/events.out.tfevents.1603702533.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_01-56-18/events.out.tfevents.1603702578.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-05-12/events.out.tfevents.1603703112.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-05-44/events.out.tfevents.1603703144.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-12-19/events.out.tfevents.1603703539.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-13-13/events.out.tfevents.1603703593.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-17-48/events.out.tfevents.1603703868.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-19-34/events.out.tfevents.1603703974.Bennys-MacBook-Pro.local

Whitespace-only changes.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-57-37/gym/openaigym.episode_batch.0.19022.stats.json

-1
This file was deleted.

cs285/data/hw3_check_pick-place-v1_26-10-2020_02-57-37/gym/openaigym.manifest.0.19022.manifest.json

-1
This file was deleted.
File renamed without changes.

cs285.egg-info/SOURCES.txt cs285pkg/cs285.egg-info/SOURCES.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
README.md
21
setup.py
32
cs285.egg-info/PKG-INFO
43
cs285.egg-info/SOURCES.txt
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.py cs285pkg/setup.py

-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,4 @@
55
name='cs285',
66
version='0.1.0',
77
packages=['cs285'],
8-
)
9-
10-
setup(
11-
name='metaworld',
12-
version='2',
13-
packages=['metaworld'],
148
)

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_handle_press.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def step(self, action):
4545
ob = super().step(action)
4646
reward, reachDist, pressDist = self.compute_reward(action, ob)
4747
self.curr_path_length += 1
48-
48+
if self.curr_path_length == self.max_path_length:
49+
done = True
50+
else:
51+
done = False
4952
info = {
5053
'reachDist': reachDist,
5154
'goalDist': pressDist,
@@ -54,7 +57,7 @@ def step(self, action):
5457
'success': float(pressDist <= 0.04)
5558
}
5659

57-
return ob, reward, False, info
60+
return ob, reward, done, info
5861

5962
@property
6063
def _target_site_config(self):

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_handle_pull.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def step(self, action):
4545
ob = super().step(action)
4646
reward, reachDist, pressDist = self.compute_reward(action, ob)
4747
self.curr_path_length += 1
48-
48+
if self.curr_path_length == self.max_path_length:
49+
done = True
50+
else:
51+
done = False
4952
info = {
5053
'reachDist': reachDist,
5154
'goalDist': pressDist,
@@ -54,7 +57,7 @@ def step(self, action):
5457
'success': float(pressDist <= 0.04)
5558
}
5659

57-
return ob, reward, False, info
60+
return ob, reward, done, info
5861

5962
@property
6063
def _target_site_config(self):

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_handle_pull_side.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def step(self, action):
4545
ob = super().step(action)
4646
reward, reachDist, pressDist = self.compute_reward(action, ob)
4747
self.curr_path_length += 1
48-
48+
if self.curr_path_length == self.max_path_length:
49+
done = True
50+
else:
51+
done = False
4952
info = {
5053
'reachDist': reachDist,
5154
'goalDist': pressDist,
@@ -54,7 +57,7 @@ def step(self, action):
5457
'success': float(pressDist <= 0.04)
5558
}
5659

57-
return ob, reward, False, info
60+
return ob, reward, done, info
5861

5962
@property
6063
def _target_site_config(self):

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_lever_pull.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def step(self, action):
4646
ob = super().step(action)
4747
reward, reachDist, pullDist = self.compute_reward(action, ob)
4848
self.curr_path_length += 1
49-
49+
if self.curr_path_length == self.max_path_length:
50+
done = True
51+
else:
52+
done = False
5053
info = {
5154
'reachDist': reachDist,
5255
'goalDist': pullDist,
@@ -55,7 +58,7 @@ def step(self, action):
5558
'success': float(pullDist <= 0.05)
5659
}
5760

58-
return ob, reward, False, info
61+
return ob, reward, done, info
5962

6063
def _get_pos_objects(self):
6164
return self._get_site_pos('leverStart')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_peg_insertion_side.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ def step(self, action):
5555
ob = super().step(action)
5656
reward, _, reachDist, pickRew, _, placingDist = self.compute_reward(action, ob)
5757
self.curr_path_length += 1
58-
58+
if self.curr_path_length == self.max_path_length:
59+
done = True
60+
else:
61+
done = False
5962
info = {
6063
'reachDist': reachDist,
6164
'pickRew': pickRew,
@@ -64,7 +67,7 @@ def step(self, action):
6467
'success': float(placingDist <= 0.07)
6568
}
6669

67-
return ob, reward, False, info
70+
return ob, reward, done, info
6871

6972
def _get_pos_objects(self):
7073
return self.get_body_com('peg')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_peg_unplug_side.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def step(self, action):
4848
ob = super().step(action)
4949
reward, _, reachDist, pickRew, _, placingDist = self.compute_reward(action, ob)
5050
self.curr_path_length += 1
51-
51+
if self.curr_path_length == self.max_path_length:
52+
done = True
53+
else:
54+
done = False
5255
info = {
5356
'reachDist': reachDist,
5457
'pickRew': pickRew,
@@ -57,7 +60,7 @@ def step(self, action):
5760
'success': float(placingDist <= 0.07)
5861
}
5962

60-
return ob, reward, False, info
63+
return ob, reward, done, info
6164

6265
def _get_pos_objects(self):
6366
return self._get_site_pos('pegEnd')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_pick_out_of_hole.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ def step(self, action):
5050
ob = super().step(action)
5151
reward, reachDist, pickRew, placingDist = self.compute_reward(action, ob)
5252
self.curr_path_length +=1
53-
53+
if self.curr_path_length == self.max_path_length:
54+
done = True
55+
else:
56+
done = False
5457
info = {
5558
'reachDist': reachDist,
5659
'goalDist': placingDist,
@@ -59,7 +62,7 @@ def step(self, action):
5962
'success': float(placingDist <= 0.08)
6063
}
6164

62-
return ob, reward, False, info
65+
return ob, reward, done, info
6366

6467
def _get_pos_objects(self):
6568
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_plate_slide.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def step(self, action):
4747
ob = super().step(action)
4848
reward, reachDist, pullDist = self.compute_reward(action, ob)
4949
self.curr_path_length += 1
50-
50+
if self.curr_path_length == self.max_path_length:
51+
done = True
52+
else:
53+
done = False
5154
info = {
5255
'reachDist': reachDist,
5356
'goalDist': pullDist,
@@ -56,7 +59,7 @@ def step(self, action):
5659
'success': float(pullDist <= 0.08)
5760
}
5861

59-
return ob, reward, False, info
62+
return ob, reward, done, info
6063

6164
def _get_pos_objects(self):
6265
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_plate_slide_back.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def step(self, action):
4747
ob = super().step(action)
4848
reward, reachDist, pullDist = self.compute_reward(action, ob)
4949
self.curr_path_length += 1
50-
50+
if self.curr_path_length == self.max_path_length:
51+
done = True
52+
else:
53+
done = False
5154
info = {
5255
'reachDist': reachDist,
5356
'goalDist': pullDist,
@@ -56,7 +59,7 @@ def step(self, action):
5659
'success': float(pullDist <= 0.07)
5760
}
5861

59-
return ob, reward, False, info
62+
return ob, reward, done, info
6063

6164
def _get_pos_objects(self):
6265
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_plate_slide_back_side.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def step(self, action):
4747
ob = super().step(action)
4848
reward, reachDist, pullDist = self.compute_reward(action, ob)
4949
self.curr_path_length += 1
50-
50+
if self.curr_path_length == self.max_path_length:
51+
done = True
52+
else:
53+
done = False
5154
info = {
5255
'reachDist': reachDist,
5356
'goalDist': pullDist,
@@ -56,7 +59,7 @@ def step(self, action):
5659
'success': float(pullDist <= 0.07)
5760
}
5861

59-
return ob, reward, False, info
62+
return ob, reward, done, info
6063

6164
def _get_pos_objects(self):
6265
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_plate_slide_side.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def step(self, action):
4747
ob = super().step(action)
4848
reward, reachDist, pullDist = self.compute_reward(action, ob)
4949
self.curr_path_length += 1
50-
50+
if self.curr_path_length == self.max_path_length:
51+
done = True
52+
else:
53+
done = False
5154
info = {
5255
'reachDist': reachDist,
5356
'goalDist': pullDist,
@@ -56,7 +59,7 @@ def step(self, action):
5659
'success': float(pullDist <= 0.08)
5760
}
5861

59-
return ob, reward, False, info
62+
return ob, reward, done, info
6063

6164
def _get_pos_objects(self):
6265
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_push_back.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def step(self, action):
4646
ob = super().step(action)
4747
reward, reachDist, pushDist = self.compute_reward(action, ob)
4848
self.curr_path_length += 1
49-
49+
if self.curr_path_length == self.max_path_length:
50+
done = True
51+
else:
52+
done = False
5053
info = {
5154
'reachDist': reachDist,
5255
'goalDist': pushDist,
@@ -55,7 +58,7 @@ def step(self, action):
5558
'success': float(pushDist <= 0.07)
5659
}
5760

58-
return ob, reward, False, info
61+
return ob, reward, done, info
5962

6063
def _get_pos_objects(self):
6164
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_reach_push_pick_place.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def step(self, action):
7070
ob = super().step(action)
7171
reward, _, reachDist, _, pushDist, pickRew, _, placingDist = self.compute_reward(action, ob)
7272
self.curr_path_length +=1
73-
73+
if self.curr_path_length == self.max_path_length:
74+
done = True
75+
else:
76+
done = False
7477
goal_dist = placingDist if self.task_type == 'pick_place' else pushDist
7578

7679
if self.task_type == 'reach':
@@ -86,7 +89,7 @@ def step(self, action):
8689
'success': success
8790
}
8891

89-
return ob, reward, False, info
92+
return ob, reward, done, info
9093

9194
@property
9295
def _target_site_config(self):

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_reach_push_pick_place_wall.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ def step(self, action):
7070
ob = super().step(action)
7171
reward, _, reachDist, _, pushDist, pickRew, _, placingDist = self.compute_reward(action, ob)
7272
self.curr_path_length +=1
73+
if self.curr_path_length == self.max_path_length:
74+
done = True
75+
else:
76+
done = False
7377
goal_dist = placingDist if self.task_type == 'pick_place' else pushDist
7478

7579
if self.task_type == 'reach':
@@ -85,7 +89,7 @@ def step(self, action):
8589
'success': success
8690
}
8791

88-
return ob, reward, False, info
92+
return ob, reward, done, info
8993

9094
@property
9195
def _target_site_config(self):

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_shelf_place.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ def step(self, action):
5555
ob = super().step(action)
5656
reward, _, reachDist, pickRew, _, placingDist = self.compute_reward(action, ob)
5757
self.curr_path_length += 1
58-
58+
if self.curr_path_length == self.max_path_length:
59+
done = True
60+
else:
61+
done = False
5962
info = {
6063
'reachDist': reachDist,
6164
'pickRew': pickRew,
@@ -64,7 +67,7 @@ def step(self, action):
6467
'success': float(placingDist <= 0.08)
6568
}
6669

67-
return ob, reward, False, info
70+
return ob, reward, done, info
6871

6972
def _get_pos_objects(self):
7073
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_soccer.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def step(self, action):
4646
ob = super().step(action)
4747
reward, reachDist, pushDist = self.compute_reward(action, ob)
4848
self.curr_path_length += 1
49-
49+
if self.curr_path_length == self.max_path_length:
50+
done = True
51+
else:
52+
done = False
5053
info = {
5154
'reachDist': reachDist,
5255
'goalDist': pushDist,
@@ -55,7 +58,7 @@ def step(self, action):
5558
'success': float(pushDist <= 0.07)
5659
}
5760

58-
return ob, reward, False, info
61+
return ob, reward, done, info
5962

6063
def _get_pos_objects(self):
6164
return self.data.get_geom_xpos('objGeom')

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_stick_pull.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ def step(self, action):
5252
ob = super().step(action)
5353
reward, _, reachDist, pickRew, _, pullDist, _ = self.compute_reward(action, ob)
5454
self.curr_path_length += 1
55-
55+
if self.curr_path_length == self.max_path_length:
56+
done = True
57+
else:
58+
done = False
5659
info = {
5760
'reachDist': reachDist,
5861
'pickRew': pickRew,
@@ -61,7 +64,7 @@ def step(self, action):
6164
'success': float(pullDist <= 0.08 and reachDist <= 0.05)
6265
}
6366

64-
return ob, reward, False, info
67+
return ob, reward, done, info
6568

6669
def _get_pos_objects(self):
6770
return np.hstack((

metaworld/metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_stick_push.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ def step(self, action):
4949
ob = super().step(action)
5050
reward, _, reachDist, pickRew, _, pushDist = self.compute_reward(action, ob)
5151
self.curr_path_length += 1
52-
52+
if self.curr_path_length == self.max_path_length:
53+
done = True
54+
else:
55+
done = False
5356
info = {
5457
'reachDist': reachDist,
5558
'pickRew': pickRew,
@@ -58,7 +61,7 @@ def step(self, action):
5861
'success': float(pushDist <= 0.1 and reachDist <= 0.05)
5962
}
6063

61-
return ob, reward, False, info
64+
return ob, reward, done, info
6265

6366
@property
6467
def _target_site_config(self):

0 commit comments

Comments
 (0)