<mujoco model="ant">
    <include file="./common/skybox.xml"/>
    <include file="./common/visual.xml"/>
    <include file="./common/materials.xml"/>
    <include file="./common/camera.xml"/>
  
    <compiler settotalmass="14" angle="degree" coordinate="local" inertiafromgeom="true"/>
  
    <option integrator="RK4" timestep="0.01"/>
  
    <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 0.0 1.0" name="init_qpos"/>
    </custom>
  
    <default>
        <joint armature="1" damping="1" limited="true"/>
        <geom condim="3" density="5.0" friction="1 0.5 0.5" margin="0.01" material="self"/>
        <motor ctrllimited="true" ctrlrange="-1 1"/>
        <default class ="ground">
            <geom material="grid" type="plane" contype="1" conaffinity="1"/>
        </default>
    </default>
  
    <worldbody>
        <light directional="true" cutoff="60" exponent="1" diffuse="1 1 1" specular=".1 .1 .1" pos="1 -1 1.5" dir="-1 1 -1.3"/>
        <geom name="ground" class="ground" pos="0 0 0" size="20 20 1"/>
  
        <!-- ant -->
        <body name="torso" pos="0 0 0.75">
          <geom name="torso_geom" pos="0 0 0" size="0.25" type="sphere"/>
          <joint armature="0" damping="0" limited="false" margin="0.01" name="root" pos="0 0 0" type="free"/>
          <body name="front_left_leg" pos="0 0 0">
            <geom fromto="0.0 0.0 0.0 0.2 0.2 0.0" name="aux_1_geom" size="0.08" type="capsule"/>
            <body name="aux_1" pos="0.2 0.2 0">
              <joint axis="0 0 1" name="hip_1" pos="0.0 0.0 0.0" range="-30 30" type="hinge"/>
              <geom fromto="0.0 0.0 0.0 0.2 0.2 0.0" name="left_leg_geom" size="0.08" type="capsule"/>
              <body pos="0.2 0.2 0">
                <joint axis="-1 1 0" name="ankle_1" pos="0.0 0.0 0.0" range="30 70" type="hinge"/>
                <geom fromto="0.0 0.0 0.0 0.4 0.4 0.0" name="left_ankle_geom" size="0.08" type="capsule"/>
              </body>
            </body>
          </body>
          <body name="front_right_leg" pos="0 0 0">
            <geom fromto="0.0 0.0 0.0 -0.2 0.2 0.0" name="aux_2_geom" size="0.08" type="capsule"/>
            <body name="aux_2" pos="-0.2 0.2 0">
              <joint axis="0 0 1" name="hip_2" pos="0.0 0.0 0.0" range="-30 30" type="hinge"/>
              <geom fromto="0.0 0.0 0.0 -0.2 0.2 0.0" name="right_leg_geom" size="0.08" type="capsule"/>
              <body pos="-0.2 0.2 0">
                <joint axis="1 1 0" name="ankle_2" pos="0.0 0.0 0.0" range="-70 -30" type="hinge"/>
                <geom fromto="0.0 0.0 0.0 -0.4 0.4 0.0" name="right_ankle_geom" size="0.08" type="capsule"/>
              </body>
            </body>
          </body>
          <body name="back_leg" pos="0 0 0">
            <geom fromto="0.0 0.0 0.0 -0.2 -0.2 0.0" name="aux_3_geom" size="0.08" type="capsule"/>
            <body name="aux_3" pos="-0.2 -0.2 0">
              <joint axis="0 0 1" name="hip_3" pos="0.0 0.0 0.0" range="-30 30" type="hinge"/>
              <geom fromto="0.0 0.0 0.0 -0.2 -0.2 0.0" name="back_leg_geom" size="0.08" type="capsule"/>
              <body pos="-0.2 -0.2 0">
                <joint axis="-1 1 0" name="ankle_3" pos="0.0 0.0 0.0" range="-70 -30" type="hinge"/>
                <geom fromto="0.0 0.0 0.0 -0.4 -0.4 0.0" name="third_ankle_geom" size="0.08" type="capsule"/>
              </body>
            </body>
          </body>
          <body name="right_back_leg" pos="0 0 0">
            <geom fromto="0.0 0.0 0.0 0.2 -0.2 0.0" name="aux_4_geom" size="0.08" type="capsule"/>
            <body name="aux_4" pos="0.2 -0.2 0">
              <joint axis="0 0 1" name="hip_4" pos="0.0 0.0 0.0" range="-30 30" type="hinge"/>
              <geom fromto="0.0 0.0 0.0 0.2 -0.2 0.0" name="rightback_leg_geom" size="0.08" type="capsule"/>
              <body pos="0.2 -0.2 0">
                <joint axis="1 1 0" name="ankle_4" pos="0.0 0.0 0.0" range="30 70" type="hinge"/>
                <geom fromto="0.0 0.0 0.0 0.4 -0.4 0.0" name="fourth_ankle_geom" size="0.08" type="capsule"/>
              </body>
            </body>
          </body>
          <body name="arm" pos="0 0 0">
            <joint axis="0 0 1" name="arm_0" pos="0.0 0.0 0.0" range="-90 90" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0 0 0.3" name="arm_0_geom" size="0.08" type="capsule"/>
            <body name="arm_1" pos="0 0 0.3">
              <joint axis="1 0 0" name="arm_1" pos="0.0 0.0 0.0" range="-90 90" type="hinge"/>
              <geom fromto="0.0 0.0 0.0 0 0 0.6" name="arm_1_geom" size="0.08" type="capsule"/>
              <body name="arm_2" pos="0 0 0.6">
                <joint axis="1 0 0" name="arm_2" pos="0.0 0.0 0.0" range="-90 90" type="hinge"/>
                <geom fromto="0.0 0.0 0.0 0 0 0.6" name="arm_2_geom" size="0.08" type="capsule"/>
                <body name="hand" pos="0 0 0.6">
                  <geom name="hand_geom" pos="0 0 0" size="0.1" type="sphere"/>
                </body>
              </body>
            </body>
          </body>
        </body>
  
        <!-- box -->
        <body name="box" pos="0 0 .1" euler="0 0 0">
            <geom name="box" pos="0 0 0" rgba="0.8 0.2 0.2 1" size=".1 .1 .1" type="box"/>
            <joint type="free" armature="0" damping="0" limited="false" stiffness="0"/>
        </body>
  
        <!-- table -->
        <body name="table" pos="0 0 0" euler="0 0 0">
            <geom name="table" pos="0 0 0" rgba="0.4 0.4 0.4 1" size=".1 .1 2" type="box"/>
        </body>
    </worldbody>
  
    <actuator>
        <motor joint="hip_4" gear="150"/>
        <motor joint="ankle_4" gear="150"/>
        <motor joint="hip_1" gear="150"/>
        <motor joint="ankle_1" gear="150"/>
        <motor joint="hip_2" gear="150"/>
        <motor joint="ankle_2" gear="150"/>
        <motor joint="hip_3" gear="150"/>
        <motor joint="ankle_3" gear="150"/>
        <motor joint="arm_0" gear="150"/>
        <motor joint="arm_1" gear="150"/>
        <motor joint="arm_2" gear="150"/>
    </actuator>
  
</mujoco>
