Skip to content

Commit

Permalink
Disable mujoco gui by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaux1 committed Sep 12, 2024
1 parent 1dbfc1e commit 039543a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deformable_gym/envs/mujoco/base_mjenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
obj_name: str,
observable_object_pos: bool = True,
max_sim_time: float = 5,
gui: bool = True,
gui: bool = False,
init_frame: str | None = None,
):
self.scene = AssetManager().create_scene(robot_name, obj_name)
Expand Down
2 changes: 1 addition & 1 deletion deformable_gym/envs/mujoco/grasp_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(
obj_name: str,
observable_object_pos: bool = True,
max_sim_time: float = 5,
gui: bool = True,
gui: bool = False,
init_frame: Optional[str] = None,
**kwargs,
):
Expand Down
2 changes: 1 addition & 1 deletion deformable_gym/envs/mujoco/mia_grasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(
obj_name: str,
observable_object_pos: bool = True,
max_sim_time: float = 1,
gui: bool = True,
gui: bool = False,
init_frame: str | None = None,
**kwargs,
):
Expand Down
2 changes: 1 addition & 1 deletion deformable_gym/envs/mujoco/shadow_grasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(
obj_name: str,
observable_object_pos: bool = True,
max_sim_time: float = 1,
gui: bool = True,
gui: bool = False,
init_frame: str | None = None,
**kwargs,
):
Expand Down
4 changes: 2 additions & 2 deletions examples/mj_mia_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
episode = 0
n_episodes = 3
observation, info = env.reset()
env.render()
#env.render()
while episode < n_episodes:
action = env.action_space.sample()
observation, reward, terminate, truncated, info = env.step(action)
env.render()
#env.render()
if terminate:
episode += 1
print(f"Episode {episode} finished with reward {reward}")
Expand Down
2 changes: 0 additions & 2 deletions examples/mj_shadow_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
episode = 0
n_episodes = 3
observation, info = env.reset()
env.render()
while episode < n_episodes:
action = env.action_space.sample()
observation, reward, terminate, truncated, info = env.step(action)
env.render()
if terminate:
episode += 1
print(f"Episode {episode} finished with reward {reward}")
Expand Down

0 comments on commit 039543a

Please sign in to comment.