diff --git a/dm_control/mujoco/tutorial.ipynb b/dm_control/mujoco/tutorial.ipynb
index 06d44d9c..62a7e94d 100644
--- a/dm_control/mujoco/tutorial.ipynb
+++ b/dm_control/mujoco/tutorial.ipynb
@@ -38,7 +38,7 @@
"source": [
"This notebook provides an overview tutorial of the **MuJoCo** physics simulator, using the `dm_control` Python bindings. It is similar to the notebook in `dm_control/tutorial.ipynb`, but focuses on teaching MuJoCo itself, rather than the additional features provided by the Python package. \n",
"\n",
- "**A Colab runtime with GPU acceleration is required.** If you're using a CPU-only runtime, you can switch using the menu \"Runtime > Change runtime type\"."
+ "**A Colab runtime with GPU acceleration is required.** If you're using a CPU-only runtime, you can switch using the menu \"Runtime \u003e Change runtime type\"."
]
},
{
@@ -93,7 +93,7 @@
"\"\"\")\n",
"\n",
"print('Installing dm_control...')\n",
- "!pip install -q dm_control>=1.0.17\n",
+ "!pip install -q dm_control\u003e=1.0.18\n",
"\n",
"# Configure dm_control to use the EGL rendering backend (requires GPU)\n",
"%env MUJOCO_GL=egl\n",
@@ -269,13 +269,13 @@
"#@title A static model {vertical-output: true}\n",
"\n",
"static_model = \"\"\"\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight name=\"top\" pos=\"0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"red_box\" type=\"box\" size=\".2 .2 .2\" rgba=\"1 0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"green_sphere\" pos=\".2 .2 .2\" size=\".1\" rgba=\"0 1 0 1\"/\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(static_model)\n",
"pixels = physics.render()\n",
@@ -312,16 +312,16 @@
"#@title A child body with a joint { vertical-output: true }\n",
"\n",
"swinging_body = \"\"\"\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight name=\"top\" pos=\"0 0 1\"/\u003e\n",
+ " \u003cbody name=\"box_and_sphere\" euler=\"0 0 -30\"\u003e\n",
+ " \u003cjoint name=\"swing\" type=\"hinge\" axis=\"1 -1 0\" pos=\"-.2 -.2 -.2\"/\u003e\n",
+ " \u003cgeom name=\"red_box\" type=\"box\" size=\".2 .2 .2\" rgba=\"1 0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"green_sphere\" pos=\".2 .2 .2\" size=\".1\" rgba=\"0 1 0 1\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(swinging_body)\n",
"# Visualize the joint axis.\n",
@@ -364,9 +364,9 @@
"# Simulate and display video.\n",
"frames = []\n",
"physics.reset() # Reset state and time\n",
- "while physics.data.time < duration:\n",
+ "while physics.data.time \u003c duration:\n",
" physics.step()\n",
- " if len(frames) < physics.data.time * framerate:\n",
+ " if len(frames) \u003c physics.data.time * framerate:\n",
" pixels = physics.render(scene_option=scene_option)\n",
" frames.append(pixels)\n",
"display_video(frames, framerate)"
@@ -424,7 +424,7 @@
"# Shift nearest values to the origin.\n",
"depth -= depth.min()\n",
"# Scale by 2 mean distances of near rays.\n",
- "depth /= 2*depth[depth <= 1].mean()\n",
+ "depth /= 2*depth[depth \u003c= 1].mean()\n",
"# Scale to [0, 255]\n",
"pixels = 255*np.clip(depth, 0, 1)\n",
"PIL.Image.fromarray(pixels.astype(np.uint8))"
@@ -514,7 +514,7 @@
"\n",
"def add_visual_capsule(scene, point1, point2, radius, rgba):\n",
" \"\"\"Adds one capsule to an mjvScene.\"\"\"\n",
- " if scene.ngeom >= scene.maxgeom:\n",
+ " if scene.ngeom \u003e= scene.maxgeom:\n",
" return\n",
" scene.ngeom += 1 # increment ngeom\n",
" # initialise a new capsule, add it to the scene using mjv_makeConnector\n",
@@ -534,7 +534,7 @@
"\n",
"def scene_callback(physics, scn):\n",
" \"\"\"Draw position trace, speed modifies width and colours.\"\"\"\n",
- " if len(positions) > 1:\n",
+ " if len(positions) \u003e 1:\n",
" for i in range(len(positions)-1):\n",
" rgba=np.array((np.clip(speeds[i]/10, 0, 1),\n",
" np.clip(1-speeds[i]/10, 0, 1),\n",
@@ -550,13 +550,13 @@
"# Simulate and display video.\n",
"frames = []\n",
"physics.reset() # Reset state and time\n",
- "while physics.data.time < duration:\n",
+ "while physics.data.time \u003c duration:\n",
" # append data to the traces\n",
" positions.append(physics.named.data.geom_xpos[\"green_sphere\"].copy())\n",
" times.append(physics.data.time)\n",
" speeds.append(get_geom_speed(physics, \"green_sphere\"))\n",
" physics.step()\n",
- " if len(frames) < physics.data.time * framerate:\n",
+ " if len(frames) \u003c physics.data.time * framerate:\n",
" camera = mujoco.Camera(physics, max_geom=10000,\n",
" scene_callback=scene_callback)\n",
" pixels = camera.render()\n",
@@ -844,32 +844,32 @@
"#@title The \"tippe-top\" model{vertical-output: true}\n",
"\n",
"tippe_top = \"\"\"\n",
- "\n",
- " \n",
+ "\u003cmujoco model=\"tippe top\"\u003e\n",
+ " \u003coption integrator=\"RK4\"/\u003e\n",
+ "\n",
+ " \u003casset\u003e\n",
+ " \u003ctexture name=\"grid\" type=\"2d\" builtin=\"checker\" rgb1=\".1 .2 .3\"\n",
+ " rgb2=\".2 .3 .4\" width=\"300\" height=\"300\"/\u003e\n",
+ " \u003cmaterial name=\"grid\" texture=\"grid\" texrepeat=\"8 8\" reflectance=\".2\"/\u003e\n",
+ " \u003c/asset\u003e\n",
+ "\n",
+ " \u003cworldbody\u003e\n",
+ " \u003cgeom size=\".2 .2 .01\" type=\"plane\" material=\"grid\"/\u003e\n",
+ " \u003clight pos=\"0 0 .6\"/\u003e\n",
+ " \u003ccamera name=\"closeup\" pos=\"0 -.1 .07\" xyaxes=\"1 0 0 0 1 2\"/\u003e\n",
+ " \u003cbody name=\"top\" pos=\"0 0 .02\"\u003e\n",
+ " \u003cfreejoint/\u003e\n",
+ " \u003cgeom name=\"ball\" type=\"sphere\" size=\".02\" /\u003e\n",
+ " \u003cgeom name=\"stem\" type=\"cylinder\" pos=\"0 0 .02\" size=\"0.004 .008\"/\u003e\n",
+ " \u003cgeom name=\"ballast\" type=\"box\" size=\".023 .023 0.005\" pos=\"0 0 -.015\"\n",
+ " contype=\"0\" conaffinity=\"0\" group=\"3\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\n",
+ " \u003ckeyframe\u003e\n",
+ " \u003ckey name=\"spinning\" qpos=\"0 0 0.02 1 0 0 0\" qvel=\"0 0 0 0 1 200\" /\u003e\n",
+ " \u003c/keyframe\u003e\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(tippe_top)\n",
"PIL.Image.fromarray(physics.render(camera_id='closeup'))"
@@ -882,12 +882,12 @@
},
"source": [
"Note several new features of this model definition:\n",
- "0. The free joint is added with the `` clause, which is similar to ``, but prohibits unphysical attributes like friction or stiffness.\n",
- "1. We use the `` clause to set the integrator to the more accurate Runge Kutta 4th order.\n",
- "2. We define the floor's grid material inside the `` clause and reference it in the floor geom. \n",
+ "0. The free joint is added with the `\u003cfreejoint/\u003e` clause, which is similar to `\u003cjoint type=\"free\"/\u003e`, but prohibits unphysical attributes like friction or stiffness.\n",
+ "1. We use the `\u003coption/\u003e` clause to set the integrator to the more accurate Runge Kutta 4th order.\n",
+ "2. We define the floor's grid material inside the `\u003casset/\u003e` clause and reference it in the floor geom. \n",
"3. We use an invisible and non-colliding box geom called `ballast` to move the top's center-of-mass lower. Having a low center of mass is (counter-intuitively) required for the flipping behaviour to occur.\n",
"4. We save our initial spinning state as a keyframe. It has a high rotational velocity around the z-axis, but is not perfectly oriented with the world.\n",
- "5. We define a `` in our model, and then render from it using the `camera_id` argument to `render()`.\n",
+ "5. We define a `\u003ccamera\u003e` in our model, and then render from it using the `camera_id` argument to `render()`.\n",
"Let us examine the state:"
]
},
@@ -928,9 +928,9 @@
"# Simulate and display video.\n",
"frames = []\n",
"physics.reset(0) # Reset to keyframe 0 (load a saved state).\n",
- "while physics.data.time < duration:\n",
+ "while physics.data.time \u003c duration:\n",
" physics.step()\n",
- " if len(frames) < (physics.data.time) * framerate:\n",
+ " if len(frames) \u003c (physics.data.time) * framerate:\n",
" pixels = physics.render(camera_id='closeup')\n",
" frames.append(pixels)\n",
"\n",
@@ -965,7 +965,7 @@
"\n",
"# Simulate and save data\n",
"physics.reset(0)\n",
- "while physics.data.time < duration:\n",
+ "while physics.data.time \u003c duration:\n",
" physics.step()\n",
" timevals.append(physics.data.time)\n",
" angular_velocity.append(physics.data.qvel[3:6].copy())\n",
@@ -1015,40 +1015,40 @@
"source": [
"#@title chaotic pendulum {vertical-output: true}\n",
"chaotic_pendulum = \"\"\"\n",
- "\n",
- "\n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ "\n",
+ " \u003coption timestep=\".001\" \u003e\n",
+ " \u003cflag energy=\"enable\" contact=\"disable\"/\u003e\n",
+ " \u003c/option\u003e\n",
+ "\n",
+ " \u003cdefault\u003e\n",
+ " \u003cjoint type=\"hinge\" axis=\"0 -1 0\"/\u003e\n",
+ " \u003cgeom type=\"capsule\" size=\".02\"/\u003e\n",
+ " \u003c/default\u003e\n",
+ "\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight pos=\"0 -.4 1\"/\u003e\n",
+ " \u003ccamera name=\"fixed\" pos=\"0 -1 0\" xyaxes=\"1 0 0 0 0 1\"/\u003e\n",
+ " \u003cbody name=\"0\" pos=\"0 0 .2\"\u003e\n",
+ " \u003cjoint name=\"root\"/\u003e\n",
+ " \u003cgeom fromto=\"-.2 0 0 .2 0 0\" rgba=\"1 1 0 1\"/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 0 0 -.25\" rgba=\"1 1 0 1\"/\u003e\n",
+ " \u003cbody name=\"1\" pos=\"-.2 0 0\"\u003e\n",
+ " \u003cjoint/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 0 0 -.2\" rgba=\"1 0 0 1\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003cbody name=\"2\" pos=\".2 0 0\"\u003e\n",
+ " \u003cjoint/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 0 0 -.2\" rgba=\"0 1 0 1\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003cbody name=\"3\" pos=\"0 0 -.25\"\u003e\n",
+ " \u003cjoint/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 0 0 -.2\" rgba=\"0 0 1 1\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(chaotic_pendulum)\n",
"\n",
@@ -1093,7 +1093,7 @@
"render_time = 0\n",
"n_steps = 0\n",
"for i in range(n_frames):\n",
- " while physics.data.time * framerate < i:\n",
+ " while physics.data.time * framerate \u003c i:\n",
" tic = time.time()\n",
" physics.step()\n",
" sim_time += time.time() - tic\n",
@@ -1319,26 +1319,26 @@
"#@title 'box_and_sphere' free body: {vertical-output: true}\n",
"\n",
"free_body_MJCF = \"\"\"\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ " \u003casset\u003e\n",
+ " \u003ctexture name=\"grid\" type=\"2d\" builtin=\"checker\" rgb1=\".1 .2 .3\"\n",
+ " rgb2=\".2 .3 .4\" width=\"300\" height=\"300\" mark=\"edge\" markrgb=\".2 .3 .4\"/\u003e\n",
+ " \u003cmaterial name=\"grid\" texture=\"grid\" texrepeat=\"2 2\" texuniform=\"true\"\n",
+ " reflectance=\".2\"/\u003e\n",
+ " \u003c/asset\u003e\n",
+ "\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight pos=\"0 0 1\" mode=\"trackcom\"/\u003e\n",
+ " \u003cgeom name=\"ground\" type=\"plane\" pos=\"0 0 -.5\" size=\"2 2 .1\" material=\"grid\" solimp=\".99 .99 .01\" solref=\".001 1\"/\u003e\n",
+ " \u003cbody name=\"box_and_sphere\" pos=\"0 0 0\"\u003e\n",
+ " \u003cfreejoint/\u003e\n",
+ " \u003cgeom name=\"red_box\" type=\"box\" size=\".1 .1 .1\" rgba=\"1 0 0 1\" solimp=\".99 .99 .01\" solref=\".001 1\"/\u003e\n",
+ " \u003cgeom name=\"green_sphere\" size=\".06\" pos=\".1 .1 .1\" rgba=\"0 1 0 1\"/\u003e\n",
+ " \u003ccamera name=\"fixed\" pos=\"0 -.6 .3\" xyaxes=\"1 0 0 0 1 2\"/\u003e\n",
+ " \u003ccamera name=\"track\" pos=\"0 -.6 .3\" xyaxes=\"1 0 0 0 1 2\" mode=\"track\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(free_body_MJCF)\n",
"\n",
@@ -1380,7 +1380,7 @@
"\n",
"# simulate and render\n",
"for i in range(n_frames):\n",
- " while physics.data.time < i/120.0: #1/4x real time\n",
+ " while physics.data.time \u003c i/120.0: #1/4x real time\n",
" physics.step()\n",
" frames[i] = physics.render(height, width, camera_id=\"track\", scene_option=options)\n",
"# show video\n",
@@ -1495,36 +1495,36 @@
"source": [
"#@title tangential friction and slope: {vertical-output: true}\n",
"MJCF = \"\"\"\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ " \u003casset\u003e\n",
+ " \u003ctexture name=\"grid\" type=\"2d\" builtin=\"checker\" rgb1=\".1 .2 .3\"\n",
+ " rgb2=\".2 .3 .4\" width=\"300\" height=\"300\" mark=\"none\"/\u003e\n",
+ " \u003cmaterial name=\"grid\" texture=\"grid\" texrepeat=\"6 6\"\n",
+ " texuniform=\"true\" reflectance=\".2\"/\u003e\n",
+ " \u003cmaterial name=\"wall\" rgba='.5 .5 .5 1'/\u003e\n",
+ " \u003c/asset\u003e\n",
+ "\n",
+ " \u003cdefault\u003e\n",
+ " \u003cgeom type=\"box\" size=\".05 .05 .05\" /\u003e\n",
+ " \u003cjoint type=\"free\"/\u003e\n",
+ " \u003c/default\u003e\n",
+ "\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight name=\"light\" pos=\"-.2 0 1\"/\u003e\n",
+ " \u003cgeom name=\"ground\" type=\"plane\" size=\".5 .5 10\" material=\"grid\"\n",
+ " zaxis=\"-.3 0 1\" friction=\".1\"/\u003e\n",
+ " \u003ccamera name=\"y\" pos=\"-.1 -.6 .3\" xyaxes=\"1 0 0 0 1 2\"/\u003e\n",
+ " \u003cbody pos=\"0 0 .1\"\u003e\n",
+ " \u003cjoint/\u003e\n",
+ " \u003cgeom/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003cbody pos=\"0 .2 .1\"\u003e\n",
+ " \u003cjoint/\u003e\n",
+ " \u003cgeom friction=\".33\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"# load\n",
"physics = mujoco.Physics.from_xml_string(MJCF)\n",
@@ -1537,7 +1537,7 @@
"# simulate and render\n",
"physics.reset()\n",
"for i in range(n_frames):\n",
- " while physics.data.time < i/30.0:\n",
+ " while physics.data.time \u003c i/30.0:\n",
" physics.step()\n",
" video[i] = physics.render(height, width, \"y\")\n",
"display_video(video)"
@@ -1562,46 +1562,46 @@
"source": [
"#@title bat and piƱata: {vertical-output: true}\n",
"MJCF = \"\"\"\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ " \u003casset\u003e\n",
+ " \u003ctexture name=\"grid\" type=\"2d\" builtin=\"checker\" rgb1=\".1 .2 .3\"\n",
+ " rgb2=\".2 .3 .4\" width=\"300\" height=\"300\" mark=\"none\"/\u003e\n",
+ " \u003cmaterial name=\"grid\" texture=\"grid\" texrepeat=\"1 1\"\n",
+ " texuniform=\"true\" reflectance=\".2\"/\u003e\n",
+ " \u003c/asset\u003e\n",
+ "\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight name=\"light\" pos=\"0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"floor\" type=\"plane\" pos=\"0 0 -.5\" size=\"2 2 .1\" material=\"grid\"/\u003e\n",
+ " \u003csite name=\"anchor\" pos=\"0 0 .3\" size=\".01\"/\u003e\n",
+ " \u003ccamera name=\"fixed\" pos=\"0 -1.3 .5\" xyaxes=\"1 0 0 0 1 2\"/\u003e\n",
+ "\n",
+ " \u003cgeom name=\"pole\" type=\"cylinder\" fromto=\".3 0 -.5 .3 0 -.1\" size=\".04\"/\u003e\n",
+ " \u003cbody name=\"bat\" pos=\".3 0 -.1\"\u003e\n",
+ " \u003cjoint name=\"swing\" type=\"hinge\" damping=\"1\" axis=\"0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"bat\" type=\"capsule\" fromto=\"0 0 .04 0 -.3 .04\"\n",
+ " size=\".04\" rgba=\"0 0 1 1\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ "\n",
+ " \u003cbody name=\"box_and_sphere\" pos=\"0 0 0\"\u003e\n",
+ " \u003cjoint name=\"free\" type=\"free\"/\u003e\n",
+ " \u003cgeom name=\"red_box\" type=\"box\" size=\".1 .1 .1\" rgba=\"1 0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"green_sphere\" size=\".06\" pos=\".1 .1 .1\" rgba=\"0 1 0 1\"/\u003e\n",
+ " \u003csite name=\"hook\" pos=\"-.1 -.1 -.1\" size=\".01\"/\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/worldbody\u003e\n",
+ "\n",
+ " \u003ctendon\u003e\n",
+ " \u003cspatial name=\"wire\" limited=\"true\" range=\"0 0.35\" width=\"0.003\"\u003e\n",
+ " \u003csite site=\"anchor\"/\u003e\n",
+ " \u003csite site=\"hook\"/\u003e\n",
+ " \u003c/spatial\u003e\n",
+ " \u003c/tendon\u003e\n",
+ "\n",
+ " \u003cactuator\u003e\n",
+ " \u003cmotor name=\"my_motor\" joint=\"swing\" gear=\"1\"/\u003e\n",
+ " \u003c/actuator\u003e\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(MJCF)\n",
"PIL.Image.fromarray(physics.render(480, 480, \"fixed\") )\n"
@@ -1627,7 +1627,7 @@
"\n",
"# simulate and render\n",
"for i in range(n_frames):\n",
- " while physics.data.time < i/30.0:\n",
+ " while physics.data.time \u003c i/30.0:\n",
" physics.step()\n",
" video[i] = physics.render(height, width, \"fixed\")\n",
"\n",
@@ -1670,7 +1670,7 @@
"\n",
"# simulate and render\n",
"for i in range(n_frames):\n",
- " while physics.data.time < i/30.0:\n",
+ " while physics.data.time \u003c i/30.0:\n",
" physics.step()\n",
" video[i] = physics.render(height, width)\n",
"display_video(video)"
@@ -1698,53 +1698,53 @@
"source": [
"#@title virtual spring-damper: {vertical-output: true}\n",
"MJCF = \"\"\"\n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- " \n",
- "\n",
- " \n",
- "\n",
- " \n",
- "\n",
- "\n",
+ "\u003cmujoco\u003e\n",
+ " \u003casset\u003e\n",
+ " \u003ctexture name=\"grid\" type=\"2d\" builtin=\"checker\" rgb1=\".1 .2 .3\"\n",
+ " rgb2=\".2 .3 .4\" width=\"300\" height=\"300\" mark=\"none\"/\u003e\n",
+ " \u003cmaterial name=\"grid\" texture=\"grid\" texrepeat=\"6 6\"\n",
+ " texuniform=\"true\" reflectance=\".2\"/\u003e\n",
+ " \u003cmaterial name=\"wall\" rgba='.5 .5 .5 1'/\u003e\n",
+ " \u003c/asset\u003e\n",
+ "\n",
+ " \u003coption gravity=\"0 0 0\"\u003e\n",
+ " \u003cflag contact=\"disable\"/\u003e\n",
+ " \u003c/option\u003e\n",
+ "\n",
+ " \u003cdefault\u003e\n",
+ " \u003cgeom type=\"capsule\" size=\".02 .02 .02\" /\u003e\n",
+ " \u003cjoint type=\"hinge\" damping=\".02\"/\u003e\n",
+ " \u003c/default\u003e\n",
+ "\n",
+ " \u003cworldbody\u003e\n",
+ " \u003clight name=\"light\" pos=\"0 0 1\"/\u003e\n",
+ " \u003cgeom name=\"ground\" type=\"plane\" size=\".5 .5 10\" material=\"grid\"/\u003e\n",
+ " \u003ccamera name=\"y\" pos=\"0 -.8 .6\" xyaxes=\"1 0 0 0 1 2\"/\u003e\n",
+ " \u003ccamera name=\"x\" pos=\"-.8 0 .6\" xyaxes=\"0 -1 0 1 0 2\"/\u003e\n",
+ "\n",
+ " \u003cgeom fromto=\"0 0 0 0 0 .2\" /\u003e\n",
+ " \u003cbody pos=\"0 0 .2\"\u003e\n",
+ " \u003cjoint axis=\"0 0 1\"/\u003e\n",
+ " \u003cjoint axis=\"0 1 0\"/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 .2 0 0\" /\u003e\n",
+ " \u003cbody pos=\".2 0 0\"\u003e\n",
+ " \u003cjoint axis=\"1 0 0\"/\u003e\n",
+ " \u003cjoint axis=\"0 1 0\"/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 0 0 .15\" /\u003e\n",
+ " \u003cbody pos=\"0 0 .15\"\u003e\n",
+ " \u003cjoint axis=\"0 0 1\"/\u003e\n",
+ " \u003cjoint axis=\"0 1 0\"/\u003e\n",
+ " \u003cgeom fromto=\"0 0 0 .1 0 0\"/\u003e\n",
+ " \u003cgeom name=\"fingertip\" type=\"box\" pos=\".1 0 0\" rgba=\"1 0 0 1\" /\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/body\u003e\n",
+ " \u003c/body\u003e\n",
+ "\n",
+ " \u003cgeom name=\"target\" type=\"box\" rgba=\"0 1 0 1\"/\u003e\n",
+ "\n",
+ " \u003c/worldbody\u003e\n",
+ "\n",
+ "\u003c/mujoco\u003e\n",
"\"\"\"\n",
"physics = mujoco.Physics.from_xml_string(MJCF)\n",
"\n",
@@ -1769,7 +1769,7 @@
"\n",
"# simulate and render\n",
"for i in range(n_frames):\n",
- " while physics.data.time < i/15.0:\n",
+ " while physics.data.time \u003c i/15.0:\n",
"\n",
" # get Jacobian of fingertip position\n",
" mjlib.mj_jacGeom(physics.model.ptr,\n",
diff --git a/requirements.txt b/requirements.txt
index 49a580ed..fd316cd6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,7 +6,7 @@ h5py==3.10.0
labmaze==1.0.6
lxml==5.1.0
mock==5.1.0
-mujoco==3.1.3
+mujoco==3.1.4
nose==1.3.7
nose-xunitmp==0.4.1
numpy==1.24.4; python_version == '3.8'
diff --git a/setup.py b/setup.py
index 775b9649..5252e77c 100644
--- a/setup.py
+++ b/setup.py
@@ -173,7 +173,7 @@ def is_excluded(s):
setup(
name='dm_control',
- version='1.0.17',
+ version='1.0.18',
description='Continuous control environments and MuJoCo Python bindings.',
long_description="""
# `dm_control`: DeepMind Infrastructure for Physics-Based Simulation.
@@ -201,7 +201,7 @@ def is_excluded(s):
'glfw',
'labmaze',
'lxml',
- 'mujoco >= 3.1.3',
+ 'mujoco >= 3.1.4',
'numpy >= 1.9.0',
'protobuf >= 3.19.4', # TensorFlow requires protobuf<3.20 (b/182876485)
'pyopengl >= 3.1.4',
diff --git a/tutorial.ipynb b/tutorial.ipynb
index 1fbb1d09..f205620f 100644
--- a/tutorial.ipynb
+++ b/tutorial.ipynb
@@ -93,7 +93,7 @@
"\"\"\")\n",
"\n",
"print('Installing dm_control...')\n",
- "!pip install -q dm_control\u003e=1.0.17\n",
+ "!pip install -q dm_control\u003e=1.0.18\n",
"\n",
"# Configure dm_control to use the EGL rendering backend (requires GPU)\n",
"%env MUJOCO_GL=egl\n",