<mujoco model="two-link planar reacher">
  <include file="./common/skybox.xml"/>
  <include file="./common/visual.xml"/>
  <include file="./common/materials.xml"/>

  <default>
    <joint armature='0.0' damping="0.1" limited="true"/>
    <motor gear=".05" ctrlrange="-3 3" ctrllimited="true"/>
  </default>

  <worldbody>
    <light name="light" pos="0 0 1"/>
    <camera name="cam0" pos="0 0 .8" quat="1 0 0 0"/>
    <!-- Arena -->
    <geom name="ground" type="plane" rgba="0 0 0 1" pos="0 0 0" size=".3 .3 10" material="grid"/>
    <geom name="wall_x" type="plane" condim="1" pos="-.3 0 .02" zaxis="1 0 0"  size=".02 .3 .02" material="decoration"/>
    <geom name="wall_y" type="plane" condim="1" pos="0 -.3 .02" zaxis="0 1 0"  size=".3 .02 .02" material="decoration"/>
    <geom name="wall_neg_x" type="plane" condim="1" pos=".3 0 .02" zaxis="-1 0 0"  size=".02 .3 .02" material="decoration"/>
    <geom name="wall_neg_y" type="plane" condim="1" pos="0 .3 .02" zaxis="0 -1 0"  size=".3 .02 .02" material="decoration"/>


    <geom name="wall1A" type="box" condim="1" pos="-0.15 0.25 .02" zaxis="-1 0 0"  size=".02 .2 .005" material="decoration" />
    <geom name="wall2A" type="box" condim="1" pos="0.15 0.25 .02" zaxis="-1 0 0"  size=".02 .2 .005" material="decoration" />
    <geom name="wall1B" type="box" condim="1" pos="-0.15 -0.25 .02" zaxis="-1 0 0"  size=".02 .2 .005" material="decoration" />
    <geom name="wall2B" type="box" condim="1" pos="0.15 -0.25 .02" zaxis="-1 0 0"  size=".02 .2 .005" material="decoration" />

    <body name="tool" pos="0.0 -0.0 0.0" >
      <geom name="toolgeom" rgba="1 0 0 1" type="box" size="0.025 0.025  0.025 " pos="0.0 -0.00 0.025" />
      <joint name="tool_x" type="slide" pos="0 0 0" axis="1 0 0" range="-0.3 0.3" damping="0.01"/>
      <joint name="tool_y" type="slide" pos="0 0 0" axis="0 1 0" range="-0.3 0.3" damping="0.01"/>
    </body>

    <!-- Target -->
    <geom name="target" rgba="1 0 0 0" pos="0 0 .01" material="target" type="sphere" size=".025" contype="0" conaffinity="0"/>
  </worldbody>

  <actuator>
    <motor name="x" joint="tool_x"/>
    <motor name="y" joint="tool_y"/>
  </actuator>
</mujoco>