Skip to content

Commit

Permalink
[Bug Fix] Small fixes for new mujoco release 3.0.0 (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigodelazcano authored Oct 21, 2023
1 parent d8f24c1 commit 0058eeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gymnasium/envs/mujoco/assets/swimmer.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<mujoco model="swimmer">
<compiler angle="degree" coordinate="local" inertiafromgeom="true"/>
<option collision="predefined" density="4000" integrator="RK4" timestep="0.01" viscosity="0.1"/>
<option density="4000" integrator="RK4" timestep="0.01" viscosity="0.1"/>
<default>
<geom conaffinity="1" condim="1" contype="1" material="geom" rgba="0.8 0.6 .4 1"/>
<geom conaffinity="0" condim="1" contype="0" material="geom" rgba="0.8 0.6 .4 1"/>
<joint armature='0.1' />
</default>
<asset>
Expand All @@ -14,7 +14,7 @@
</asset>
<worldbody>
<light cutoff="100" diffuse="1 1 1" dir="-0 0 -1.3" directional="true" exponent="1" pos="0 0 1.3" specular=".1 .1 .1"/>
<geom conaffinity="1" condim="3" material="MatPlane" name="floor" pos="0 0 -0.1" rgba="0.8 0.9 0.8 1" size="40 40 0.1" type="plane"/>
<geom condim="3" material="MatPlane" name="floor" pos="0 0 -0.1" rgba="0.8 0.9 0.8 1" size="40 40 0.1" type="plane"/>
<!-- ================= SWIMMER ================= /-->
<body name="torso" pos="0 0 0">
<camera name="track" mode="trackcom" pos="0 -3 3" xyaxes="1 0 0 0 1 1"/>
Expand Down
2 changes: 1 addition & 1 deletion gymnasium/envs/mujoco/mujoco_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def _create_overlay(self):

self.add_overlay(bottomleft, "FPS", "%d%s" % (1 / self._time_per_render, ""))
self.add_overlay(
bottomleft, "Solver iterations", str(self.data.solver_iter + 1)
bottomleft, "Solver iterations", str(self.data.solver_niter[0] + 1)
)
self.add_overlay(
bottomleft, "Step", str(round(self.data.time / self.model.opt.timestep))
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ classic-control = ["pygame >=2.1.3"]
classic_control = ["pygame >=2.1.3"] # kept for backward compatibility
mujoco-py = ["mujoco-py >=2.1,<2.2", "cython<3"]
mujoco_py = ["mujoco-py >=2.1,<2.2", "cython<3"] # kept for backward compatibility
mujoco = ["mujoco >=2.3.3", "imageio >=2.14.1"]
mujoco = ["mujoco >=3.0.0", "imageio >=2.14.1"]
toy-text = ["pygame >=2.1.3"]
toy_text = ["pygame >=2.1.3"] # kept for backward compatibility
jax = ["jax >=0.4.0", "jaxlib >=0.4.0"]
Expand All @@ -67,7 +67,7 @@ all = [
"mujoco-py >=2.1,<2.2",
"cython<3",
# mujoco
"mujoco >=2.3.3",
"mujoco >=3.0.0",
"imageio >=2.14.1",
# toy-text
"pygame >=2.1.3",
Expand Down

0 comments on commit 0058eeb

Please sign in to comment.