<!-- Cartpole Model

State-Space (name/joint/parameter):

- cart      slider      position (m)
- pole      hinge       angle (rad)
- cart      slider      velocity (m/s)
- pole      hinge       angular velocity (rad/s)

Actuators (name/actuator/parameter):

- cart      motor       force x (N)
-->
<mujoco model='test_cartpole'>
  <compiler inertiafromgeom='true' coordinate='local'/>

  <size nkey="1"/>

  <option timestep='0.1'/>

  <default>
    <joint damping='0.0' solreflimit='.08 1'/>
    <geom density='22.75' contype='0' friction='1 0.1 0.1'/>
  </default>

  <worldbody>
    <camera name='fixed' pos='0 -2.5 0' quat='0.707 0.707 0 0'/>
    <geom name='floor' pos='0 0 -2' size='4 4 4' type='plane' />
    <geom name='rail1' type='capsule' pos='0 0 0' quat='0.707 0 0.707 0'
          size='0.025 2.0' />
    <body name='cart' pos='0 0 0'>
      <camera name='cart' pos='0 -2.5 0' quat='0.707 0.707 0 0' />
      <joint name='slider' type='slide' limited='false' pos='0 0 0'
               axis='1 0 0' range='-1 1' />
      <geom name='cart' type='capsule' pos='0 0 0' fromto='-0.5 0 0 0.5 0 0'
              size='0.1125 1.0' rgba='0.7 0.7 0.7 1' />
      <site name='cart sensor' type='box' pos='0 0 0'
              size='0.2 0.1 0.05' rgba='0.7 0.7 0 0' />
      <body name='pole' pos='0 0 0'>
        <camera name='pole'  pos='0 -2.5 0' quat='0.0 0.0 0 0' />
        <joint name='hinge' type='hinge' pos='0 0 0' axis='0 1 0'/>
        <geom name='cpole' type='capsule' fromto='0 0 0 0 0 1.0'
                size='0.075 1.0' rgba='0.7 0.7 0.7 1' />
        <site type='sphere' size='.01' name='tip' pos='.001 0 .6'/>
      </body>
    </body>
  </worldbody>

  <actuator>
    <motor name='slide' joint='slider' gear='1' ctrllimited='false' ctrlrange='-1000 1000' />
  </actuator>

  <keyframe>
    <key name="hanging_down" qpos="0 1.57"/>
  </keyframe>

</mujoco>
