<mujoco model="dm-lqr-2-1">
  <include file="../../common/materials.xml"/>

  <compiler angle="radian" inertiafromgeom="true"/>
  <option timestep="0.01" integrator="RK4" gravity="0 0 -9.81"/>

  <statistic center="0 0 0.12" extent="1.8" />

  <default>
    <geom type="sphere" size="0.04" density="300" material="self" contype="0" conaffinity="0"/>
    <joint type="slide" axis="1 0 0" damping="0.3" limited="true" range="-1.5 1.5"/>
    <motor ctrlrange="-1 1" ctrllimited="true" gear="1"/>
  </default>

  <asset>
    <texture name="skybox" type="skybox" builtin="gradient" rgb1="0.4 0.4 0.4" rgb2="0 0 0"
      width="512"
      height="512" />
    <texture name="motphys-ground" type="2d" file="../../common/motphys-ground.png" />
    <material name="motphys-ground" texture="motphys-ground" texuniform="true"
      texrepeat="0.4 0.4" />
  </asset>

  <worldbody>
    <light name="light" dir="0 1 -1" directional="true" />
    <camera name="side" pos="0 -2.8 0" quat="0.707 0.707 0 0" mode="trackcom" />
    <camera name="back" pos="-1.2 -1.8 1.1" xyaxes="0.55 -0.84 0 0.28 0.18 0.94" />
    <geom name="ground" type="plane" pos="0 0 -0.02" size="0 0 0.01"
      material="motphys-ground"
      contype="0"
      conaffinity="0" />
    <geom
      name="origin"
      type="capsule"
      fromto="0 -0.6 0.05 0 0.6 0.05"
      size="0.01"
      rgba="1 0.8 0.2 1"
      contype="0"
      conaffinity="0"/>

    <body name="m0" pos="0 -0.15 0.1">
      <joint name="q0"/>
      <geom name="geom_0"/>
    </body>

    <body name="m1" pos="0 0.15 0.1">
      <joint name="q1"/>
      <geom name="geom_1"/>
    </body>

  </worldbody>

  <tendon>
    <fixed
      name="rope_01"
      limited="false"
      width="0.016"
      rgba="0.9 0.82 0.74 1"
      stiffness="50"
      damping="2"
      springlength="0">
      <joint joint="q0" coef="-1"/>
      <joint joint="q1" coef="1"/>
    </fixed>
  </tendon>

  <actuator>
    <motor name="motor_1" joint="q1"/>
  </actuator>
</mujoco>
