<mujoco model="reacher">
  <compiler settotalmass="24" inertiafromgeom="true"/>
  <!-- <option timestep='0.01' gravity='0 0 -9.81' /> -->
  <option timestep="0.01" integrator="RK4" gravity="0 0 -9.81"/>
    <!-- <flag contact="disable"/> -->
  <!-- </option> -->

  <!-- <visual>
    <map znear=".01"/>
  </visual> -->

  <default>
    <!-- <geom contype="0" friction=".4 .4 .4" solimp="0.0 0.8 0.01" solref="0.02 1"/> -->
    <geom contype="0" friction="1 .1 .1"/>
    <joint type="hinge" axis="0 0 1" armature="1" damping="1"/>
    <!-- <joint type="hinge" axis="0 0 1"/> -->
    <velocity ctrlrange="-50.0 50.0" ctrllimited="true"/>
    <!-- <motor ctrlrange="-100.0 100.0" ctrllimited="true"/> -->
  </default>

  <asset>
    <texture name="skybox" type="skybox" builtin="gradient" width="100" height="100" rgb1="1 1 1" rgb2="0 0 0"/>
    <texture name="grid" type="2d" builtin="checker" rgb1="0 0 0" rgb2=".8 .8 .8" width="100" height="100"/>
    <material name="grid" texture="grid" shininess="1" texrepeat="60 60" specular="1" reflectance=".5"/>
    <material name="self" rgba=".7 .5 .3 1"/>
    <material name="decoration" rgba=".7 .4 .2 1"/>
    <material name="effector" rgba=".7 .4 .2 1"/>
  </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 conaffinity="0" contype="0" name="ground" type="plane" pos="0 0 0" size="40 40 40" rgba=".8 .9 .8 1" material="grid"/>
    <!-- <geom conaffinity="0" name="left_wall" pos="-4 0 0.2" zaxis="0 1 0" size="0.2 4" type="capsule" material="decoration"/>
    <geom conaffinity="0" name="right_wall" pos="4 0 0.2" zaxis="0 1 0" size="0.2 4" type="capsule" material="decoration"/>
    <geom conaffinity="0" name="front_wall" pos="0 4 0.2" zaxis="1 0 0" size="0.2 4" type="capsule" material="decoration"/>
    <geom conaffinity="0" name="back_wall" pos="0 -4 0.2" zaxis="1 0 0" size="0.2 4" type="capsule" material="decoration"/> -->

    <geom conaffinity="0" contype="0" name="root" type="cylinder" fromto="0 0 0 0 0 .2" size=".12" material="decoration"/>
    <body name="body0" pos="0 0 .1">
      <geom name="link0" type="capsule" fromto="0 0 0 .45 0 0" size=".1" material="self"/>
      <joint name="joint0" limited="false"/>
      <body name="body1" pos=".45 0 0">
        <geom name="link1" type="capsule" fromto="0 0 0 .45 0 0" size=".1" material="self"/>
        <joint name="joint1" limited="true" range="-160 160"/>
        <body name="body2" pos=".45 0 0">
          <geom name="link2" type="capsule" fromto="0 0 0 .45 0 0" size=".1" material="self"/>
          <joint name="joint2" limited="true" range="-160 160"/>
          <body name="body3" pos=".45 0 0">
            <geom name="link3" type="capsule" fromto="0 0 0 .45 0 0" size=".1" material="self"/>
            <joint name="joint3" limited="true" range="-160 160"/>
            <body name="fingertip" pos=".65 0 0">
              <geom contype="0" name="fingertip" type="sphere" size=".1" material="effector"/>
            </body>
          </body>
        </body>
      </body>
    </body>
  </worldbody>

  <actuator>
    <!-- <motor name="joint0" joint="joint0"/>
    <motor name="joint1" joint="joint1"/> -->
    <velocity name="joint0" joint="joint0"/>
    <velocity name="joint1" joint="joint1"/>
    <velocity name="joint2" joint="joint2"/>
    <velocity name="joint3" joint="joint3"/>
  </actuator>
</mujoco>