<mujoco model="ant">
  <compiler inertiafromgeom="true" angle="degree" coordinate="local" />
  <option timestep="0.02" integrator="RK4" />
  <custom>
    <numeric name="init_qpos" 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" />
  </custom>
  <default>
    <joint limited="true" armature="1" damping="1" />
    <geom condim="3" conaffinity="0" margin="0.01" friction="1 0.5 0.5" solref=".02 1" solimp=".8 .8 .01" rgba="0.8 0.6 0.4 1" density="5.0" />
  </default>
  <asset>
    <texture type="skybox" builtin="gradient" width="100" height="100" rgb1="1 1 1" rgb2="0 0 0" />
    <texture name="texgeom" type="cube" builtin="flat" mark="cross" width="127" height="1278" rgb1="0.8 0.6 0.4" rgb2="0.8 0.6 0.4" markrgb="1 1 1" random="0.01" />
    <texture name="texplane" type="2d" builtin="checker" rgb1="0 0 0" rgb2="0.8 0.8 0.8" width="100" height="100" />
    <material name='MatPlane' texture="texplane" shininess="1" texrepeat="60 60" specular="1"  reflectance="0.5" />
    <material name='geom' texture="texgeom" texuniform="true" />
  </asset>
  <worldbody>
    <light directional="true" cutoff="100" exponent="1" diffuse="1 1 1" specular=".1 .1 .1" pos="0 0 1.3" dir="-0 0 -1.3" />
    <geom name='floor' pos='0 0 0' size='40 40 40' type='plane' conaffinity='1' rgba='0.8 0.9 0.8 1' condim='3' />
    <body name="torso" pos="0 0 0.75">
      <geom name="torso_geom" type="sphere" size="0.25" pos="0 0 0" />
      <joint name="root" type="free" limited="false" pos="0 0 0" axis="0 0 1" margin="0.01" armature="0" damping="0" />
      <body name="front_left_leg" pos="0 0 0">
        <geom name="aux_1_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 0.2 0.2 0.0" />
        <body name="aux_1" pos="0.2 0.2 0">
          <joint name="hip_1" type="hinge" pos="0.0 0.0 0.0" axis="0 0 1" range="-30 30" />
          <geom name="left_leg_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 0.2 0.2 0.0" />
          <body pos="0.2 0.2 0">
            <joint name="ankle_1" type="hinge" pos="0.0 0.0 0.0" axis="-1 1 0" range="30 70" />
            <geom name="left_ankle_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 0.4 0.4 0.0" />
          </body>
        </body>
      </body>
      <body name="front_right_leg" pos="0 0 0">
        <geom name="aux_2_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 -0.2 0.2 0.0" />
        <body name="aux_2" pos="-0.2 0.2 0">
          <joint name="hip_2" type="hinge" pos="0.0 0.0 0.0" axis="0 0 1" range="-30 30" />
          <geom name="right_leg_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 -0.2 0.2 0.0" />
          <body pos="-0.2 0.2 0">
            <joint name="ankle_2" type="hinge" pos="0.0 0.0 0.0" axis="1 1 0" range="-70 -30" />
            <geom name="right_ankle_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 -0.4 0.4 0.0" />
          </body>
        </body>
      </body>
      <body name="back_leg" pos="0 0 0">
        <geom name="aux_3_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 -0.2 -0.2 0.0" />
        <body name="aux_3" pos="-0.2 -0.2 0">
          <joint name="hip_3" type="hinge" pos="0.0 0.0 0.0" axis="0 0 1" range="-30 30" />
          <geom name="back_leg_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 -0.2 -0.2 0.0" />
          <body pos="-0.2 -0.2 0">
            <joint name="ankle_3" type="hinge" pos="0.0 0.0 0.0" axis="-1 1 0" range="-70 -30" />
            <geom name="third_ankle_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 -0.4 -0.4 0.0" />
          </body>
        </body>
      </body>
      <body name="right_back_leg" pos="0 0 0">
        <geom name="aux_4_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 0.2 -0.2 0.0" />
        <body name="aux_4" pos="0.2 -0.2 0">
          <joint name="hip_4" type="hinge" pos="0.0 0.0 0.0" axis="0 0 1" range="-30 30" />
          <geom name="rightback_leg_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 0.2 -0.2 0.0" />
          <body pos="0.2 -0.2 0">
            <joint name="ankle_4" type="hinge" pos="0.0 0.0 0.0" axis="1 1 0" range="30 70" />
            <geom name="fourth_ankle_geom" type="capsule" size="0.08" fromto="0.0 0.0 0.0 0.4 -0.4 0.0" />
          </body>
        </body>
      </body>
    </body>

    <body name="goal_point" pos="1.0 1.0 0.12"> <!--name was ee_link--> <!--euler = "-1.570796 0 0"-->
      <site name="goal_point:box" type="box" pos="0.05 0.0 0.0" size="0.5 0.5 0.5"  quat = " 1.0 0.0  0.0 0."     rgba="1 0 0 1" />
    </body> 


    <body name="wall" pos="0.0 0.0 0.0">
      <geom name="wall1" type="box" pos="-8 0 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall2" type="box" pos="-8 8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall3" type="box" pos="0 8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall4" type="box" pos="-8 -8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall5" type="box" pos="0 -8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall6" type="box" pos="8 8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall7" type="box" pos="8 -8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall8" type="box" pos="16 -8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall9" type="box" pos="24 -8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall10" type="box" pos="24 0  0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall11" type="box" pos="24 8 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall12" type="box" pos="24 16 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall13" type="box" pos="24 24 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall14" type="box" pos="16 24 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall15" type="box" pos="8 24  0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall16" type="box" pos="0 24 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall17" type="box" pos="-8 24 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall18" type="box" pos="-8 16 0" size="4 4 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall19" type="box" pos="13.5 8 0" size="1.9 1 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
      <geom name="wall20" type="box" pos="18.5 8 0" size="1.5 1 4" rgba="0.4 0.4 0.4 1"
                contype="1" conaffinity="1" friction="2 0.1 0.002"/>
    </body>

  </worldbody>
  <actuator>
    <motor joint="hip_4" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="ankle_4" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="hip_1" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="ankle_1" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="hip_2" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="ankle_2" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="hip_3" ctrlrange="-30.0 30.0" ctrllimited="true" />
    <motor joint="ankle_3" ctrlrange="-30.0 30.0" ctrllimited="true" />
  </actuator>
</mujoco>
