
<mujoco model="modified_reacher">
  <compiler angle="radian" inertiafromgeom="true"/>
  <default>
    <joint armature="1" damping="1" limited="true"/>
    <geom contype="0" friction="1 0.1 0.1" rgba="0.7 0.7 0 1"/>
  </default>
  <option gravity="0 0 -9.81" integrator="RK4" timestep="0.01"/>

  <worldbody>
    <geom conaffinity="0" contype="0" name="ground" pos="0 0 0" rgba="0.9 0.9 0.9 1" size="1 1 10" type="plane"/>
    <geom conaffinity="0" fromto="-0.55 -0.55 .01 0.55 -0.55 .01" name="sideS" rgba="0.9 0.4 0.6 1" size=".01" type="capsule"/>
    <geom conaffinity="0" fromto=" 0.55 -0.55 .01 0.55 0.55 .01" name="sideE" rgba="0.9 0.4 0.6 1" size=".01" type="capsule"/>
    <geom conaffinity="0" fromto="-0.55 0.55 .01 0.55 0.55 .01" name="sideN" rgba="0.9 0.4 0.6 1" size=".01" type="capsule"/>
    <geom conaffinity="0" fromto="-0.55 -0.55 .01 -0.55 0.55 .01" name="sideW" rgba="0.9 0.4 0.6 1" size=".01" type="capsule"/>

    <geom conaffinity="0" contype="0" fromto="0 0 0 0 0 0.02" name="root" rgba="0.9 0.4 0.6 1" size=".011" type="cylinder"/>
    <body name="rootBody" pos="0 0 .01">
      <geom fromto="0 0 0 0.1 0 0" name="rootPod" rgba="0.0 0.4 0.6 1" size=".01" type="capsule"/>
      <joint axis="0 0 1" limited="true" name="rootjoint" pos="0 0 0" range='-3.14 3.14' type="hinge"/>
      
      <body name="body_1" pos="0.1 0 0">
        <joint axis="0 0 1" limited="true" name="joint_1" pos="0 0 0" range="-3.0 3.0" type="hinge"/>
        <geom fromto="0 0 0 0.1 0 0" name="link_1" rgba="0.0 0.4 0.6 1" size=".01" type="capsule"/>
      
        
        <body name="body_2" pos="0.1 0 0">
          <joint axis="0 0 1" limited="true" name="joint_2" pos="0 0 0" range="-3.0 3.0" type="hinge"/>
          <geom fromto="0 0 0 0.1 0 0" name="link_2" rgba="0.0 0.4 0.6 1" size=".01" type="capsule"/>
        
          
          <body name="body_3" pos="0.1 0 0">
            <joint axis="0 0 1" limited="true" name="joint_3" pos="0 0 0" range="-3.0 3.0" type="hinge"/>
            <geom fromto="0 0 0 0.1 0 0" name="link_3" rgba="0.0 0.4 0.6 1" size=".01" type="capsule"/>
          
            
            <body name="body_4" pos="0.1 0 0">
              <joint axis="0 0 1" limited="true" name="joint_4" pos="0 0 0" range="-3.0 3.0" type="hinge"/>
              <geom fromto="0 0 0 0.1 0 0" name="link_4" rgba="0.0 0.4 0.6 1" size=".01" type="capsule"/>
            
              
              <geom contype="0" name="fingertip" pos="0.11 0 0" rgba="0.0 0.8 0.6 1" size=".01" type="sphere"/>
              <site name="tip" pos="0.11 0 0" size="0.001 0.001"/>
              
            </body>
          </body>
        </body>
      </body>

    </body>
    <body name="target" pos=".1 -.1 .01">
      <joint armature="0" axis="1 0 0" damping="0" limited="true" name="targetX" pos="0 0 0" range="-0.5 0.5" ref=".1" stiffness="0" type="slide"/>
      <joint armature="0" axis="0 1 0" damping="0" limited="true" name="targetY" pos="0 0 0" range="-0.5 0.5" ref="-.1" stiffness="0" type="slide"/>
      <geom conaffinity="0" contype="0" name="target" pos="0 0 0" rgba="0.9 0.2 0.2 1" size=".009" type="sphere"/>
    </body>
    <body name="indicator" pos="0 0 .01">
      <geom conaffinity="0" contype="0" name="reacherIndicator" pos="0 0 0" rgba="0 0.9 0 1" size=".001" type="sphere"/>
      <geom conaffinity="0" contype="0" name="avoiderIndicator" pos="0 0 0" rgba="0.9 0 0 1" size=".001" type="sphere"/>
    </body>
  </worldbody>
  <actuator>
    <motor ctrllimited="true" ctrlrange="-1 1" gear="200.0" joint="rootjoint"/>
    <motor ctrllimited="true" ctrlrange="-1 1" gear="200.0" joint="joint_1"/>
    <motor ctrllimited="true" ctrlrange="-1 1" gear="200.0" joint="joint_2"/>
    <motor ctrllimited="true" ctrlrange="-1 1" gear="200.0" joint="joint_3"/>
    <motor ctrllimited="true" ctrlrange="-1 1" gear="200.0" joint="joint_4"/>
  </actuator>

</mujoco>
