<!--
Based on Coulomb's [1] rather than Spong's [2] model.
[1] Coulom, Rémi. Reinforcement learning using neural networks, with applications to motor control.
    Diss. Institut National Polytechnique de Grenoble-INPG, 2002.
[2] Spong, Mark W. "The swing up control problem for the acrobot."
    IEEE control systems 15, no. 1 (1995): 49-55.
-->
<mujoco model="acrobot">
    <visual>
        <headlight ambient=".4 .4 .4" diffuse=".8 .8 .8" specular="0.1 0.1 0.1"/>
        <map znear=".01"/>
        <quality shadowsize="2048"/>
    </visual>
    <asset>
        <texture name="skybox" type="skybox" builtin="gradient" rgb1=".4 .6 .8" rgb2="0 0 0"
                width="800" height="800" mark="random" markrgb="1 1 1"/>
    </asset>
    <asset>
        <texture name="grid" type="2d" builtin="checker" rgb1=".1 .2 .3" rgb2=".2 .3 .4" width="300" height="300" mark="edge" markrgb=".2 .3 .4"/>
        <material name="grid" texture="grid" texrepeat="1 1" texuniform="true" reflectance=".2"/>
        <material name="self" rgba=".7 .5 .3 1"/>
        <material name="self_default" rgba=".7 .5 .3 1"/>
        <material name="self_highlight" rgba="0 .5 .3 1"/>
        <material name="effector" rgba=".7 .4 .2 1"/>
        <material name="effector_default" rgba=".7 .4 .2 1"/>
        <material name="effector_highlight" rgba="0 .5 .3 1"/>
        <material name="decoration" rgba=".3 .5 .7 1"/>
        <material name="eye" rgba="0 .2 1 1"/>
        <material name="target" rgba=".6 .3 .3 1"/>
        <material name="target_default" rgba=".6 .3 .3 1"/>
        <material name="target_highlight" rgba=".6 .3 .3 .4"/>
        <material name="site" rgba=".5 .5 .5 .3"/>
    </asset>
  <default>
    <joint damping="0.0" limited="true"/>
    <geom type="capsule" mass="1"/>
  </default>

  <option timestep="0.05" integrator="RK4">
    <flag contact="disable" energy="enable"/>
  </option>

  <worldbody>
    <light name="light" pos="0 0 6"/>
    <geom name="floor" size="3 3 .2" type="plane" material="grid"/>
    <site name="target" type="sphere" pos="0 0 4" size="0.2" material="target" group="3"/>
    <camera name="fixed" pos="0 -6 2" zaxis="0 -1 0"/>
    <body name="upper_arm" pos="0 0 2">
      <joint name="shoulder" type="hinge" limited="false" range="-45 45" axis="0 1 0"/>
      <geom name="upper_arm" fromto="0 0 0 0 0 1" size="0.05" material="self"/>
      <inertial pos="0 0 0" mass="1" diaginertia="0.33 0.33 0.01"/>
      <body name="lower_arm" pos="0 0 1">
        <joint name="elbow" type="hinge" limited="true" range="-90 90" axis="0 1 0"/>
        <geom name="lower_arm" fromto="0 0 0 0 0 1" size="0.049" material="self"/>
        <inertial pos="0 0 0" mass="1" diaginertia="0.33 0.33 0.01"/>
      </body>
    </body>
  </worldbody>

   <actuator>
    <motor name="elbow" joint="elbow" gear="1" ctrllimited="false" ctrlrange="-1000 1000"/>
  </actuator>
</mujoco>
