<mujoco model="test_case">
  <default>
    <joint damping="0.1" frictionloss="0.1" ></joint>
    <geom condim="1" contype="0" conaffinity="0"></geom>
    <default class="collision">
      <geom contype="0" conaffinity="1" condim="3"/>
    </default>
    <position forcerange="-20 20"> </position>
  </default>

  <option iterations="3" ls_iterations="5" timestep="0.002" integrator="Euler">
        <flag eulerdamp="disable" />
  </option>

  <asset>
    <hfield name="hf" nrow="5" ncol="5" size="1 1 0.25 1.0"
      elevation="
        0.00 0.02 0.03 0.02 0.00
        0.02 0.05 0.08 0.05 0.02
        0.03 0.08 0.12 0.08 0.03
        0.02 0.05 0.08 0.05 0.02
        0.00 0.02 0.03 0.02 0.00"/>
  </asset>

  <worldbody>
    <geom name="terrain" type="hfield" hfield="hf" rgba="0.5 0.6 0.5 1" condim="3" contype="1" conaffinity="0"/>

    <body name="robot" pos="0 0 3.65">
      <freejoint/>
      <geom type="cylinder" mass="30.0" size="0.08 0.08" pos="0 0 0" rgba="0.3 0.3 0.7 1" />
      <body name="front_left_hip" pos="0.12 0.12 0">
        <joint name="fl_hip" type="hinge" axis="0 1 0" range="-45 45"/>
        <geom type="cylinder" size="0.025 0.08" pos="0 0 -0.08" rgba="0.7 0.3 0.3 1" />
        <body name="front_left_knee" pos="0 0 -0.16">
          <joint name="fl_knee" type="hinge" axis="1 0 0" range="-90 0"/>
          <geom type="cylinder" size="0.02 0.07" pos="0 0 -0.07" rgba="0.7 0.5 0.3 1" />
          <body name="front_left_ankle" pos="0 0 -0.14">
            <joint name="fl_ankle" type="hinge" axis="0 1 0" range="-45 45"/>
            <geom type="cylinder" size="0.015 0.05" pos="0 0 -0.05" rgba="0.7 0.7 0.3 1" />
            <geom name="fl_foot" type="sphere" size="0.025" pos="0 0 -0.07" rgba="0.2 0.8 0.2 1" class="collision"/>
          </body>
        </body>
      </body>
      <!-- Front Right Leg -->
      <body name="front_right_hip" pos="0.12 -0.12 0">
        <joint name="fr_hip" type="hinge" axis="0 1 0" range="-45 45"/>
        <geom type="cylinder" size="0.025 0.08" pos="0 0 -0.08" rgba="0.7 0.3 0.3 1" />
        <body name="front_right_knee" pos="0 0 -0.16">
          <joint name="fr_knee" type="hinge" axis="1 0 0" range="-90 0"/>
          <geom type="cylinder" size="0.02 0.07" pos="0 0 -0.07" rgba="0.7 0.5 0.3 1" />
          <body name="front_right_ankle" pos="0 0 -0.14">
            <joint name="fr_ankle" type="hinge" axis="0 1 0" range="-45 45"/>
            <geom type="cylinder" size="0.015 0.05" pos="0 0 -0.05" rgba="0.7 0.7 0.3 1" />
            <geom name="fr_foot" type="sphere" size="0.025" pos="0 0 -0.07" rgba="0.2 0.8 0.2 1" class="collision"/>
          </body>
        </body>
      </body>
      <!-- Back Left Leg -->
      <body name="back_left_hip" pos="-0.12 0.12 0">
        <joint name="bl_hip" type="hinge" axis="0 1 0" range="-45 45"/>
        <geom type="cylinder" size="0.025 0.08" pos="0 0 -0.08" rgba="0.7 0.3 0.3 1" />
        <body name="back_left_knee" pos="0 0 -0.16">
          <joint name="bl_knee" type="hinge" axis="1 0 0" range="-90 0"/>
          <geom type="cylinder" size="0.02 0.07" pos="0 0 -0.07" rgba="0.7 0.5 0.3 1" />
          <body name="back_left_ankle" pos="0 0 -0.14">
            <joint name="bl_ankle" type="hinge" axis="0 1 0" range="-45 45"/>
            <geom type="cylinder" size="0.015 0.05" pos="0 0 -0.05" rgba="0.7 0.7 0.3 1" />
            <geom name="bl_foot" type="sphere" size="0.025" pos="0 0 -0.07" rgba="0.2 0.8 0.2 1" class="collision"/>
          </body>
        </body>
      </body>
      <!-- Back Right Leg -->
      <body name="back_right_hip" pos="-0.12 -0.12 0">
        <joint name="br_hip" type="hinge" axis="0 1 0" range="-45 45"/>
        <geom type="cylinder" size="0.025 0.08" pos="0 0 -0.08" rgba="0.7 0.3 0.3 1" />
        <body name="back_right_knee" pos="0 0 -0.16">
          <joint name="br_knee" type="hinge" axis="1 0 0" range="-90 0"/>
          <geom type="cylinder" size="0.02 0.07" pos="0 0 -0.07" rgba="0.7 0.5 0.3 1" />
          <body name="back_right_ankle" pos="0 0 -0.14">
            <joint name="br_ankle" type="hinge" axis="0 1 0" range="-45 45"/>
            <geom type="cylinder" size="0.015 0.05" pos="0 0 -0.05" rgba="0.7 0.7 0.3 1" />
            <geom name="br_foot" type="sphere" size="0.025" pos="0 0 -0.07" rgba="0.2 0.8 0.2 1" class="collision"/>
          </body>
        </body>
      </body>
    </body>
  </worldbody>

  <actuator>
    <position joint="fl_hip" kp="80" kv="2"/>
    <position joint="fl_knee" kp="80" kv="2"/>
    <position joint="fl_ankle" kp="80" kv="2"/>
    <position joint="fr_hip" kp="80" kv="2"/>
    <position joint="fr_knee" kp="80" kv="2"/>
    <position joint="fr_ankle" kp="80" kv="2"/>
    <position joint="bl_hip" kp="80" kv="2"/>
    <position joint="bl_knee" kp="80" kv="2"/>
    <position joint="bl_ankle" kp="80" kv="2"/>
    <position joint="br_hip" kp="80" kv="2"/>
    <position joint="br_knee" kp="80" kv="2"/>
    <position joint="br_ankle" kp="80" kv="2"/>
  </actuator>
</mujoco>
