<?xml version="1.0" ?>

<mujoco>
  <compiler angle="radian" coordinate="local" meshdir="meshes_R820/"/>

  <option>
    <flag gravity="disable"/>
  </option>


  <default>
    <joint damping="0.5"/>
    <default class="visual">
      <geom contype="0" conaffinity="0"/>
    </default>
    <default class="collision">
      <geom contype="1" conaffinity="1" friction=".6 0.005 0.0001"/>
    </default>
    <site rgba="1 0 0 .5"/>
  </default>

  <asset>
    <include file="kuka_R820/kuka_assets.xml"/>
    <texture type="skybox" builtin="gradient" rgb1="1 1 1" rgb2=".6 .8 1" width="256" height="256"/>
  </asset>

  <equality>
        <weld body1="kuka_mocap" body2="needle_tip" solimp="0.9 0.95 0.001" solref="0.02 1"></weld>
  </equality>

  <worldbody>
    <body mocap="true" name="kuka_mocap" pos="needle_tip" quat = "1 0 1 0">
		<geom conaffinity="0" contype="0" pos="0 0 0" rgba="0 0.5 0 0.7" size="0.005 0.005 0.005" type="box"></geom>
		<geom conaffinity="0" contype="0" pos="0 0 0" rgba="0 0.5 0 0.1" size="1 0.005 0.005" type="box"></geom>
		<geom conaffinity="0" contype="0" pos="0 0 0" rgba="0 0.5 0 0.1" size="0.005 1 0.001" type="box"></geom>
		<geom conaffinity="0" contype="0" pos="0 0 0" rgba="0 0.5 0 0.1" size="0.005 0.005 1" type="box"></geom>
    </body>
    <light pos="0 0 1000" castshadow="false"/>
    <geom class="collision" type="plane" size="10 10 1" rgba=".8 .8 .8 1"/>
    <body name="kuka_table" pos="0 0 1">
      <site name="target0" pos="-0.5 0 0.5" size="0.02 0.02 0.02" rgba="1 0 0 1" type="sphere"></site>
      <geom class="collision" type="box" size=".5 .5 .5" pos="0 0 -.5" />
      <body name="kuka_base" pos=".2 0 0">
        <include file="kuka_R820/kuka_mesh_collision_needle.xml"/>
      </body>
    </body>
  </worldbody>

  <actuator>
    <include file="kuka_R820/kuka_actuators.xml"/>
  </actuator>

  <sensor>
    <include file="peg/peg_sensors.xml" />
  </sensor>
</mujoco>
