diff --git a/python/mjspec.ipynb b/python/mjspec.ipynb index c1e1fbf9..2f09d3cf 100644 --- a/python/mjspec.ipynb +++ b/python/mjspec.ipynb @@ -372,7 +372,7 @@ " theta = 2 * i * np.pi / num_legs\n", " hip_pos = BODY_RADIUS * np.array([np.cos(theta), np.sin(theta), 0])\n", " hip_site = spec.worldbody.add_site(pos=hip_pos, euler=[0, 0, theta])\n", - " hip_site.attach(leg.spec.find_body('thigh'), '', '-' + str(i))\n", + " hip_site.attach_body(leg.spec.find_body('thigh'), '', '-' + str(i))\n", "\n", " return spec" ] @@ -428,7 +428,7 @@ " spawn_pos = (xpos.flat[i], ypos.flat[i], zpos.flat[i])\n", " spawn_site = arena.worldbody.add_site(pos=spawn_pos, group=3)\n", " # Attach to the arena at the spawn sites, with a free joint.\n", - " spawn_body = spawn_site.attach(spec.worldbody, '', '-' + str(i))\n", + " spawn_body = spawn_site.attach_body(spec.worldbody, '', '-' + str(i))\n", " spawn_body.add_freejoint()\n", "\n", "# Instantiate the physics and render.\n", @@ -654,7 +654,7 @@ "id": "owcmKeuSzQRy" }, "source": [ - "We wish to remove the arms and replace them with the legs. This can be done by first storing the arm positions into frames attaches to the torso. Then we can detach the arms and self-attach the legs into the frames." + "We wish to remove the arms and replace them with the legs. This can be done by first storing the arm positions into frames attached to the torso. Then we can detach the arms and self-attach the legs into the frames." ] }, { @@ -807,15 +807,6 @@ "model = spec.compile()\n", "render(model, height=400)" ] - }, - { - "cell_type": "code", - "execution_count": 0, - "metadata": { - "id": "pyy2q_mSVAX1" - }, - "outputs": [], - "source": [] } ], "metadata": {