Skip to content

Commit

Permalink
Replace gui with render_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaux1 committed Jun 28, 2024
1 parent e0658fb commit 87c01bb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/floating_mia_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
Floating Mia Example
=========
This is an example of how to use the FloatingMiaGraspEnv. A random policy is
This is an example of how to use the FloatingMiaGraspEnv. A random policy is
then used to generate ten episodes.
"""

env = gymnasium.make("FloatingMiaGraspInsole-v0")
env = gymnasium.make("FloatingMiaGraspInsole-v0", render_mode="human")

obs, info = env.reset()
episode_return = 0
Expand Down
6 changes: 3 additions & 3 deletions examples/floating_shadow_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
Floating Shadow Example
=========
This is an example of how to use the FloatingShadowGraspEnv. A random policy is then
used to generate ten episodes.
This is an example of how to use the FloatingShadowGraspEnv. A random policy is then
used to generate ten episodes.
"""

env = gymnasium.make("FloatingShadowGraspInsole-v0")
env = gymnasium.make("FloatingShadowGraspInsole-v0", render_mode="human")


obs, info = env.reset()
Expand Down
4 changes: 2 additions & 2 deletions examples/parallel_floating_mia_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

SEED = 0

env = gymnasium.make("FloatingMiaGraspInsole-v0", gui=False)
env2 = gymnasium.make("FloatingMiaGraspInsole-v0", gui=False)
env = gymnasium.make("FloatingMiaGraspInsole-v0")
env2 = gymnasium.make("FloatingMiaGraspInsole-v0")

obs, info = env.reset(seed=SEED)
num_steps = 0
Expand Down
6 changes: 4 additions & 2 deletions examples/uniform_initialisation_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Floating Mia Example
=========
This is an example of how to use the FloatingMiaGraspEnv. A random policy is
This is an example of how to use the FloatingMiaGraspEnv. A random policy is
then used to generate ten episodes.
"""
Expand All @@ -23,7 +23,9 @@
sampler = UniformSampler(low, high, seed=0)

env = gymnasium.make(
"FloatingMiaGraspInsole-v0", initial_state_sampler=sampler, gui=True
"FloatingMiaGraspInsole-v0",
initial_state_sampler=sampler,
render_mode="human",
)

obs, info = env.reset()
Expand Down
2 changes: 1 addition & 1 deletion examples/ur10_shadow_grasp_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

env = UR10ShadowGraspEnv(gui=True, object_name="insole")
env = UR10ShadowGraspEnv(object_name="insole")

env.reset()
episode_return = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/ur5_mia_grasp_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

env = UR5MiaGraspEnv(gui=True, object_name="insole2")
env = UR5MiaGraspEnv(object_name="insole2")

env.reset()
episode_return = 0
Expand Down

0 comments on commit 87c01bb

Please sign in to comment.