Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Make robohive_env_suite an iterator #109

Closed
wants to merge 72 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9e79611
WIP: TESTS: Adding tests on examine_envs
vikashplus Apr 19, 2023
96948bd
DOCS: Improved setup instructions + added common FAQs
vikashplus Apr 20, 2023
1d17893
DOCS: Updating citations and fixing the typos on the tutorials
vikashplus Apr 28, 2023
ec13d80
DOCS: Fixing the typos on the tutorials
vikashplus Apr 28, 2023
88761d4
PROMPT: Users can now control RoboHive's verbosity
vikashplus Apr 29, 2023
b42576a
QUADS: adding dkitty locomotion envs
vikashplus Apr 30, 2023
730b0eb
[bug] get_visuals() check visual_keys for depth log (#86)
0wu May 1, 2023
222513d
PROMPT: Adding new models, including print always
vikashplus May 1, 2023
2ce7781
HMS: BUGFIX: reset was directly called. Robot wasn't resetting
vikashplus May 1, 2023
bf2fbc4
ROBOT: BUGFIX: Wall clock sync was off for sim robot.
vikashplus May 1, 2023
c7cafa6
RENDERER: FEATURE: Adding the new mujoco renderer. Making MUJOCO as d…
vikashplus May 1, 2023
00533d7
TESTS: Adding tests for robot as well as examine envs
vikashplus May 1, 2023
1a8bc83
FEATURE: Allows examine_env to load hard coded policies (#87)
palanc May 1, 2023
5403854
add wiki link badge (#91)
Vittorio-Caggiano May 2, 2023
9e35a56
TCDM: BUGFIX: Making code compatible with MUJOCO bindings. Adding som…
vikashplus May 3, 2023
4bb2739
Upgrading model for mujoco234 compatibility
vikashplus May 3, 2023
8a78816
Upgrading model for mujoco234 compatibility
vikashplus May 3, 2023
63c5fac
RENDERER: FEATURE: We can now specify visual options like rendering o…
vikashplus May 3, 2023
d056040
DEPLOY+DOCS: mujoco is the sim-bindings for default install moving fo…
vikashplus May 4, 2023
cc80897
HMS+BUGFIX: reset qpos qvel when specified had a bug during comparisi…
vikashplus May 10, 2023
ab57680
BUGFIX+UTILS: Respect the specified name even when the policy is random
vikashplus May 10, 2023
49ed838
LOGGER+TESTS+BUGS: Adding unittest. Bugfixes while loading - Adding u…
vikashplus May 10, 2023
6b230cc
FK1+DOCS: Improving the docs to better explain the FIXED, RANDOM, AND…
vikashplus May 11, 2023
6290e8f
ROBOT+FEATURE: Change hardware gains on the fly
vikashplus May 12, 2023
a0649fa
add wiki badge (#92)
Vittorio-Caggiano May 14, 2023
51889cf
UTILS: A lightweight way to check for libraries. This avoids unnecess…
vikashplus May 14, 2023
67da158
SIMSCENE: Renaming DM_CONTROL to MUJOCO to avoid confusion
vikashplus May 14, 2023
88be9fe
Renaming meshes to improve clarity
vikashplus May 14, 2023
7dbd017
Kitchen+MAJOR: Removing the v3 envs
vikashplus May 15, 2023
bf7fbfd
TYPO: fixing bibtex formatting
vikashplus May 18, 2023
65d129b
BUGFIX: Robot.py was using a legacy calls. The examine robot tutorial…
vikashplus May 21, 2023
9076b42
FEATURE: More robust way of getting the camera names. Helpful when ca…
vikashplus May 24, 2023
db5e00d
FEATURE: Resetting the sim when it diverges
vikashplus May 24, 2023
ad6c546
UTILS: plot the keys in sorted order
vikashplus May 24, 2023
eba5224
QUADS: Porting ROBEL Dkitty envs, envs are trainable. Policies are al…
vikashplus May 24, 2023
00e8ad2
Supress TCDM as its still a WIP
vikashplus Jun 5, 2023
b6d7563
ARMS:FEATURE: Preparing visual envs for arms
vikashplus Jun 5, 2023
945279d
Maintain an explicit list of all RoboHive Envs (#97)
vmoens Jun 6, 2023
97c9a67
RENAMING hand_manipulation_suite to hands
vikashplus Jun 5, 2023
8d45255
CLEANUP: Removing an unnecessary variable
vikashplus Jun 5, 2023
351c424
DOCS: renaming the mjb to indicate the mujoco version
vikashplus Jun 17, 2023
e196345
UTILS: Adding vector mat/quat multiplication
vikashplus Jun 17, 2023
5ca8fd2
Physics: Explicit way to get the sim_backend
vikashplus Jun 17, 2023
14783d4
MAJOR:MYO: major renaming for naming consistency throughout the ecosy…
vikashplus Jun 17, 2023
80d49f6
HANDS: Getting baoding envs back to functional
vikashplus Jun 17, 2023
17abeb3
PACKAGING: bumping the version to 0.6
vikashplus Jun 17, 2023
6754ca1
TESTS:MAJOR: RoboHive now populates and maintains explicit lists of r…
vikashplus Jun 18, 2023
e3249c6
TYPO: renaming obj to obs in file name
vikashplus Jun 20, 2023
104c503
MYO+BUGFIX: Introducing normalization overide that was added in MyoSu…
vikashplus Jun 24, 2023
37f38b2
Add CI test to `dev` branch (#100)
Vittorio-Caggiano Jun 24, 2023
9705518
Updating ignore files
vikashplus Jun 24, 2023
9d0d71a
ee_pose is leaking privileged information: A change was introduced to…
vikashplus Jun 29, 2023
46900bb
MTask+BUGFIX: Adding ee_pose-wrt_robot and ee_pose-wrt_world
vikashplus Jun 29, 2023
4e54901
Update README.md
vikashplus Jun 30, 2023
1f40aa1
BUGFIX: unnecessary import was throwing error on windows
vikashplus Jul 3, 2023
b4efe2f
FEATURE: Offscreen renderer also supports the visual options
vikashplus Jul 3, 2023
db06d4c
add virtual display (#101)
Vittorio-Caggiano Jul 5, 2023
b3ed7c8
Myo+Sync+Base: Upgrading to MuJoCo236. Syncing myo to MyoSuite. Upgra…
vikashplus Jul 7, 2023
c20ca66
TESTS: Adding an env variable to configure unit tests. ROBOHIVE_TEST=…
vikashplus Jul 8, 2023
efdcb9e
MIROR: Disable the autorotation of the default camera
vikashplus Jul 9, 2023
fd3c1ad
MYO+FEATURE: Adding initial version of the MyoChallenge Manipulation …
vikashplus Jul 9, 2023
573f0de
BUGFIX+MYO: Better handling of the done conditions. Improved object r…
vikashplus Jul 9, 2023
1259799
MyoChallege: Adding recepticles to the myochallenge env
vikashplus Jul 10, 2023
3a8a1c1
MyoChallenge: Fixing object joint ranges and configuring the target r…
vikashplus Jul 11, 2023
a4955cf
KETCHEN CLEANUP: Upgrading substep2 and substep9 envs to be compatibl…
vikashplus Jul 11, 2023
8bcb2a5
Myo: Updating the submodules to point to the latest envs
vikashplus Jul 14, 2023
f1f2b40
Debugging tests: Removing all passing ones, addind prints to failng ones
vikashplus Jul 14, 2023
ed8a29c
TESTS: Improving tests. Better handling of relative paths
vikashplus Jul 14, 2023
03b437e
add rendering test (#105)
Vittorio-Caggiano Jul 15, 2023
882763b
Activating back all tests
vikashplus Jul 15, 2023
104c4e3
Removing TCDM tests as its not ready
vikashplus Jul 15, 2023
1e8f69d
Logger+Upgrade: Add option to inlcude expterioception
vikashplus Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUGFIX+MYO: Better handling of the done conditions. Improved object r…
…anges
  • Loading branch information
vikashplus committed Jul 9, 2023
commit 573f0de5caf103d950d6e7f5ada80e24ecd35aa6
2 changes: 1 addition & 1 deletion robohive/envs/myo/__init__.py
Original file line number Diff line number Diff line change
@@ -290,7 +290,7 @@ def register_env_with_variants(id, entry_point, max_episode_steps, kwargs):
if sim_backend == SimBackend.MUJOCO_PY:
leg_model='/../../simhive/myo_sim/leg/myolegs_v0.52(mj210).mjb'
elif sim_backend == SimBackend.MUJOCO:
leg_model='/../../simhive/myo_sim/leg/myolegs_v0.52(mj236).mjb'
leg_model='/../../simhive/myo_sim/leg/myolegs_v0.53(mj236).mjb'

register_env_with_variants(id='myoLegReachFixed-v0',
entry_point='robohive.envs.myo.walk_v0:ReachEnvV0',
12 changes: 7 additions & 5 deletions robohive/envs/myo/myochallenge/relocate_v0.py
Original file line number Diff line number Diff line change
@@ -32,9 +32,10 @@ def _setup(self,
goal_rot = (.785, .785), # goal rotation range (relative to initial rot)
pos_th = .025, # position error threshold
rot_th = 0.262, # rotation error threshold
drop_th = .200, # drop height threshold
drop_th = 0.50, # drop height threshold
**kwargs,
):
self.palm_sid = self.sim.model.site_name2id("S_grasp")
self.object_sid = self.sim.model.site_name2id("object_o")
self.goal_sid = self.sim.model.site_name2id("target_o")
self.success_indicator_sid = self.sim.model.site_name2id("target_ball")
@@ -61,7 +62,9 @@ def get_obs_dict(self, sim):
obs_dict['hand_qvel'] = sim.data.qvel[:-6].copy()*self.dt
obs_dict['obj_pos'] = sim.data.site_xpos[self.object_sid]
obs_dict['goal_pos'] = sim.data.site_xpos[self.goal_sid]
obs_dict['palm_pos'] = sim.data.site_xpos[self.palm_sid]
obs_dict['pos_err'] = obs_dict['goal_pos'] - obs_dict['obj_pos']
obs_dict['reach_err'] = obs_dict['palm_pos'] - obs_dict['obj_pos']
obs_dict['obj_rot'] = mat2euler(np.reshape(sim.data.site_xmat[self.object_sid],(3,3)))
obs_dict['goal_rot'] = mat2euler(np.reshape(sim.data.site_xmat[self.goal_sid],(3,3)))
obs_dict['rot_err'] = obs_dict['goal_rot'] - obs_dict['obj_rot']
@@ -71,11 +74,11 @@ def get_obs_dict(self, sim):
return obs_dict

def get_reward_dict(self, obs_dict):
reach_dist = np.abs(np.linalg.norm(self.obs_dict['reach_err'], axis=-1))
pos_dist = np.abs(np.linalg.norm(self.obs_dict['pos_err'], axis=-1))
rot_dist = np.abs(np.linalg.norm(self.obs_dict['rot_err'], axis=-1))
act_mag = np.linalg.norm(self.obs_dict['act'], axis=-1)/self.sim.model.na if self.sim.model.na !=0 else 0
drop = pos_dist > self.drop_th

drop = reach_dist > self.drop_th
rwd_dict = collections.OrderedDict((
# Perform reward tuning here --
# Update Optional Keys section below
@@ -89,8 +92,7 @@ def get_reward_dict(self, obs_dict):
('act_reg', -1.*act_mag),
('sparse', -rot_dist-10.0*pos_dist),
('solved', (pos_dist<self.pos_th) and (rot_dist<self.rot_th) and (not drop) ),
('done', False),
# ('done', drop),
('done', drop),
))
rwd_dict['dense'] = np.sum([wt*rwd_dict[key] for key, wt in self.rwd_keys_wt.items()], axis=0)

3 changes: 1 addition & 2 deletions robohive/envs/myo/walk_v0.py
Original file line number Diff line number Diff line change
@@ -95,8 +95,7 @@ def get_reward_dict(self, obs_dict):
# Must keys
('sparse', -1.*reach_dist),
('solved', reach_dist<near_th),
('done', True),
# ('done', reach_dist > far_th),
('done', reach_dist > far_th),
))
rwd_dict['dense'] = np.sum([wt*rwd_dict[key] for key, wt in self.rwd_keys_wt.items()], axis=0)
return rwd_dict
2 changes: 1 addition & 1 deletion robohive/simhive/myo_sim