<mujoco model="centipede">
  <compiler angle="degree" coordinate="local" inertiafromgeom="true"/>

  <option integrator="RK4" timestep="0.01"/>

  <default>
    <joint armature="1" damping="1" limited="true"/>
    <geom conaffinity="0" condim="3" density="25.0" friction="1.5 0.1 0.1" margin="0.01" rgba="0.8 0.6 0.4 1"/>
  </default>

  <asset>
    <texture builtin="gradient" height="100" rgb1="1 1 1" rgb2="0 0 0" type="skybox" width="100"/>
    <texture builtin="flat" height="1278" mark="cross" markrgb="1 1 1" name="texgeom" random="0.01" rgb1="0.8 0.6 0.4" rgb2="0.8 0.6 0.4" type="cube" width="127"/>
    <texture builtin="checker" height="100" name="texplane" rgb1="0 0 0" rgb2="0.8 0.8 0.8" type="2d" width="100"/>
    <material name="MatPlane" reflectance="0.5" shininess="1" specular="1" texrepeat="60 60" texture="texplane"/>
    <material name="geom" texture="texgeom" texuniform="true"/>
  </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" rgba="0.8 0.9 0.8 1" size="40 40 40" type="plane"/>
    <body name="torso_0" pos="0 0 0.75">
      <camera name="track" mode="trackcom" pos="0.3 -5.7 5" xyaxes="1 0 0 0 1 1"/>
      <geom name="torsoGeom_0" pos="0 0 0" size="0.25" type="sphere" density="100"/>
      <joint armature="0" damping="0" limited="false" margin="0.01" name="root" pos="0 0 0" type="free"/>

      <body name="legbody_0" pos="0.0 -0.28 0">
        <joint axis="0 0 1" name="lefthip_0" pos="0.0 0.0 0.0" range="-40 40" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 0.0 -0.28 0.0" name="legGeom_0" size="0.08" type="capsule" rgba=".08 .5 .3 1"/>
        <body pos="0 -0.28 0" name="frontFoot_0">
          <joint axis="1 0 0" name="ankle_0" pos="0.0 0.0 0.0" range="30 100" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0 -0.6 0.0" name="ankleGeom_0" size="0.08" type="capsule" rgba=".08 .5 .3 1"/>
        </body>
      </body>


      <body name="legbody_1" pos="0.0 0.28 0">
        <joint axis="0 0 1" name="righthip_1" pos="0.0 0.0 0.0" range="-40 40" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 0.0 0.28 0.0" name="legGeom_1" size="0.08" type="capsule" rgba=".08 .5 .3 1"/>
        <body pos="0 0.28 0" name="frontFoot_1">
          <joint axis="-1 0 0" name="ankle_1" pos="0.0 0.0 0.0" range="30 100" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0 0.6 0.0" name="ankleGeom_1" size="0.08" type="capsule" rgba=".08 .5 .3 1"/>
        </body>
      </body>


      <body name="torso_1" pos="0.50 0 0">
        <geom name="torsoGeom_1" pos="0 0 0" size="0.25" type="sphere" density="100"/>
        <joint axis="0 0 1" name="body_1" pos="-0.25 0.0 0.0" range="-20 20" type="hinge"/>
        <joint axis="0 1 0" name="bodyupdown_1" pos="-0.25 0.0 0.0" range="-10 30" type="hinge"/>


        <body name="legbody_2" pos="0.0 -0.28 0">
          <joint axis="0 0 1" name="lefthip_2" pos="0.0 0.0 0.0" range="-40 40" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0.0 -0.28 0.0" name="legGeom_2" size="0.08" type="capsule" rgba=".08 .5 .3 1"/>
          <body pos="0 -0.28 0" name="frontFoot_2">
            <joint axis="1 0 0" name="ankle_2" pos="0.0 0.0 0.0" range="30 100" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0 -0.6 0.0" name="ankleGeom_2" size="0.08" type="capsule" rgba=".08 .5 .3 1"/>
          </body>
        </body>

      </body>

    </body>
  </worldbody>
  <actuator>
    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="lefthip_0" gear="150"/>
    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="ankle_0" gear="150"/>
    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="righthip_1" gear="150"/>
    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="ankle_1" gear="150"/>
    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="lefthip_2" gear="150"/>
    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="ankle_2" gear="150"/>
  </actuator>
  <custom>
    <numeric data="0.0 0.0 0.55 1.0 0.0 0.0 0.0 0.0 -1.0 0.0 1.0 0.0 -1.0" name="init_qpos"/>
  </custom>

</mujoco>
