<mujoco model="ant">
  <compiler angle="degree" coordinate="local" inertiafromgeom="true"/>
  <option integrator="RK4" timestep="0.002"/>
  <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 conaffinity="0" condim="3" density="5.0" friction="1 0.5 0.5" 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="6" 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" pos="0 0 0.35">
      <!--몸통-->
      <!--<geom name="torso_geom" pos="0 0 0" size="0.06" type="sphere"/>-->
      <geom fromto="0.1 0.0 0.0 -0.1 0.0 0.0" name="torso_geom" size="0.04" type="capsule"/>
      <joint armature="0" damping="0" limited="false" margin="0.01" name="root" pos="0 0 0" type="free"/>
      <!--<geom name="torso_geom2" pos ="0 0 0" size="0.2" type="sphere"/>-->

      <!--머리-->
      <!--<geom name="head" pos ="0.4 0 0" size="0.23" type="sphere"/>-->
      <!--<joint axis="0 0 1" name="head_1" pos="0.0 0.0 0.0" range="-10 10" type="hinge"/>
				<joint axis="0 1 0" name="head_2" pos="0.0 0.0 0.0" range="-10 10" type="hinge"/>-->

      <!--<body name="feeler" pos="0.5 0 0">
					<geom name="feeler" fromto ="0 0.0 0 0.4 0.4 0" size="0.02" type="capsule"/>-->

      <!--배-->
      <!--<geom name="tail" fromto ="-1.0 0 0 -0.6 0 0.0" size="0.2" type="capsule"/>-->
      <!--<joint axis="0 0 1" name="tail_1" pos="0.0 0.0 0.0" range="-20 20" type="hinge"/>
				<joint axis="0 1 0" name="tail_2" pos="0.0 0.0 0.0" range="-10 10" type="hinge"/>-->

      <!--배-->
      <!--<geom name="connected" fromto ="-0.6 0.0 0 -0.5 0.0 0.0" size="0.05" type="capsule"/>-->
      <!--<body name="tail" pos="-0.6 0 0">
				<geom name="tail" fromto ="-0.6 0 0 -0.2 0 0.0" size="0.12" type="capsule"/>
				<joint axis="0 0 1" name="tail_1" pos="0.0 0.0 0.0" range="-20 20" type="hinge"/>
				<joint axis="0 1 0" name="tail_2" pos="0.0 0.0 0.0" range="-10 10" type="hinge"/>
			</body>-->

      <!--<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.12 0.06 0">
        <joint axis="0 0 1" name="coxa_fl" pos="0.0 0.0 0.0" range="-34.37 34.37" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 0.03676 0.03676 0.0" name="coxa_fl_geom" size="0.015"  type="capsule"/>
        <body pos="0.03676 0.03676 0">
          <joint axis="-1 1 0" name="femur_fl" pos="0.0 0.0 0.0" range="-57.3 17.18" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0.0466 0.0466 0.0" name="femur_fl_geom" size="0.015" type="capsule"/>
          <body pos="0.0466 0.0466 0.0">
            <joint axis="-1 1 0" name="tibia_fl" pos="0.0 0.0 0.0" range="-57.3 57.3" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0.0 0.0 -0.095" name="tibia_fl_geom" size="0.015" type="capsule"/>
          </body>
        </body>
      </body>


      <body name="mid_left_leg" pos="0.0 0.1 0">
        <joint axis="0 0 1" name="coxa_ml" pos="0.0 0.0 0.0" range="-34.37 34.37" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 0.0 0.052 0.0" name="coxa_ml_geom" size="0.015" type="capsule"/>
        <body pos="0.0 0.052 0">
          <joint axis="-1 0 0" name="femur_ml" pos="0.0 0.0 0.0" range="-57.3 17.18" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0.0 0.066 0.0" name="femur_ml_geom" size="0.015" type="capsule"/>
          <body pos="0.0 0.066 0">
            <joint axis="-1 0 0" name="tibia_ml" pos="0.0 0.0 0.0" range="-57.3 57.3" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0.0 0.0 -0.095" name="tibia_ml_geom" size="0.015" type="capsule"/>
          </body>
        </body>
      </body>


      <body name="front_right_leg" pos="0.12 -0.06 0">
        <joint axis="0 0 1" name="coxa_fr" pos="0.0 0.0 0.0" range="-34.37 34.37" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 0.03676 -0.03676 0.0" name="coxa_fr_geom" size="0.015" type="capsule"/>
        <body pos="0.03676 -0.03676 0">
          <joint axis="1 1 0" name="femur_fr" pos="0.0 0.0 0.0" range="-57.3 17.18" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0.0466 -0.0466 0.0" name="femur_fr_geom" size="0.015" type="capsule"/>
          <body pos="0.0466 -0.0466 0">
            <joint axis="1 1 0" name="tibia_fr" pos="0.0 0.0 0.0" range="-57.3 57.3" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0.0 0.0 -0.095" name="tibia_fr_geom" size="0.015" type="capsule"/>
          </body>
        </body>
      </body>


      <body name="mid_right_leg" pos="0.0 -0.1 0">
        <joint axis="0 0 1" name="coxa_mr" pos="0.0 0.0 0.0" range="-34.37 34.37" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 0.0 -0.052 0.0" name="coxa_mr_geom" size="0.015" type="capsule"/>
        <body pos="0.0 -0.052 0">
          <joint axis="1 0 0" name="femur_mr" pos="0.0 0.0 0.0" range="-57.3 17.18" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 0.0 -0.066 0.0" name="femur_mr_geom" size="0.015" type="capsule"/>
          <body pos="0.0 -0.066 0">
            <joint axis="1 0 0" name="tibia_mr" pos="0.0 0.0 0.0" range="-57.3 57.3" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0.0 0 -0.095" name="tibia_mr_geom" size="0.015" type="capsule"/>
          </body>
        </body>
      </body>


      <body name="back_right_leg" pos="-0.12 -0.06 0">
        <joint axis="0 0 1" name="coxa_rr" pos="0.0 0.0 0.0" range="-34.37 34.37" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 -0.03676 -0.03676 0.0" name="coxa_rr_geom" size="0.015" type="capsule"/>
        <body pos="-0.03676 -0.03676 0">
          <joint axis="1 -1 0" name="femur_rr" pos="0.0 0.0 0.0" range="-57.3 17.18" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 -0.0466 -0.0466 0.0" name="femur_rr_geom" size="0.015" type="capsule"/>
          <body pos="-0.0466 -0.0466 0">
            <joint axis="1 -1 0" name="tibia_rr" pos="0.0 0.0 0.0" range="-57.3 57.3" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0.0 0.0 -0.095" name="tibia_rr_geom" size="0.015" type="capsule"/>
          </body>
        </body>
      </body>


      <body name="back_left_leg" pos="-0.12 0.06 0">
        <joint axis="0 0 1" name="coxa_rl" pos="0.0 0.0 0.0" range="-34.37 34.37" type="hinge"/>
        <geom fromto="0.0 0.0 0.0 -0.03676 0.03676 0.0" name="coxa_rl_geom" size="0.015" type="capsule"/>
        <body pos="-0.03676 0.03676 0">
          <joint axis="-1 -1 0" name="femur_rl" pos="0.0 0.0 0.0" range="-57.3 17.18" type="hinge"/>
          <geom fromto="0.0 0.0 0.0 -0.0466 0.0466 0.0" name="femur_rl_geom" size="0.015" type="capsule"/>
          <body pos="-0.0466 0.04660 0">
            <joint axis="-1 -1 0" name="tibia_rl" pos="0.0 0.0 0.0" range="-57.3 57.3" type="hinge"/>
            <geom fromto="0.0 0.0 0.0 0.0 0.0 -0.095" name="tibia_rl_geom" size="0.015" type="capsule"/>
          </body>
        </body>
      </body>

    </body>
  </worldbody>

  <actuator>
    <!--<position joint="coxa_fl" kp="40"/>-->
    <motor joint="coxa_fl" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="femur_fl" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="tibia_fl" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    
    <motor joint="coxa_fr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="femur_fr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="tibia_fr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    
    <motor joint="coxa_rr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="femur_rr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="tibia_rr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    
    <motor joint="coxa_rl" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="femur_rl" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="tibia_rl" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    
    <motor joint="coxa_mr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="femur_mr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="tibia_mr" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    
    <motor joint="coxa_ml" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="femur_ml" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    <motor joint="tibia_ml" ctrllimited="true" ctrlrange="-1.0 1.0" gear="150"/>
    

    <!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="joint_leg_left_forward" gear="101"/>
    --><!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="hip_1x" gear="150"/>--><!--
    <motor ctrllimited="true" ctrlrange="-1.00 1.00" joint="joint_ankle_left_forward" gear="150"/>

    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="joint_leg_left_middle" gear="101"/>
    --><!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="hip_2x" gear="150"/>--><!--
    <motor ctrllimited="true" ctrlrange="-1.00 1.00" joint="joint_ankle_left_middle" gear="150"/>

    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="joint_leg_left_backward" gear="101"/>
    --><!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="hip_3x" gear="101"/>--><!--
    <motor ctrllimited="true" ctrlrange="-1.00 1.00" joint="joint_ankle_left_backward" gear="150"/>

    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="joint_leg_right_forward" gear="101"/>
    --><!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="hip_6x" gear="101"/>--><!--
    <motor ctrllimited="true" ctrlrange="-1.00 1.00" joint="joint_ankle_right_forward" gear="150"/>

    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="joint_leg_right_middle" gear="101"/>
    --><!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="hip_5x" gear="101"/>--><!--
    <motor ctrllimited="true" ctrlrange="-1.00 1.00" joint="joint_ankle_right_middle" gear="150"/>

    <motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="joint_leg_right_backward" gear="101"/>
    --><!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="hip_4x" gear="101"/>--><!--
    <motor ctrllimited="true" ctrlrange="-1.00 1.00" joint="joint_ankle_right_backward" gear="150"/>-->

    <!--<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="head_1" gear="150"/>
		<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="head_2" gear="150"/>
		<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="tail_1" gear="150"/>
		<motor ctrllimited="true" ctrlrange="-1.0 1.0" joint="tail_2" gear="150"/>-->
  </actuator>

  <!--<sensor>
		<touch name="touch_first_ankle_geom" site="first_ankle_geom"/>
		<touch name="touch_second_ankle_geom" site="second_ankle_geom"/>
		<touch name="touch_third_ankle_geom" site="third_ankle_geom"/>
		<touch name="touch_sixth_ankle_geom" site="sixth_ankle_geom"/>
		<touch name="touch_fourth_ankle_geom" site="seventh_ankle_geom"/>
		<touch name="touch_fifth_ankle_geom" site="eighth_ankle_geom"/>
	</sensor>-->

</mujoco>
