<mujoco model="Cart Pole System">
    
    <default class="main">
        <geom rgba="1 0 0 1"/>
    </default>

    <visual>
        <global fovy="45"/>

    </visual>

    <option timestep='0.002' iterations="50" solver="PGS" collision="predefined">
        <flag energy="enable" fwdinv="enable"/>
    </option>

    <asset>
        <texture type="skybox" builtin="gradient" width="128" height="128" rgb1=".4 .6 .8" rgb2="0 0 0"/> 

        <texture name="texplane" type="2d" builtin="checker" rgb1=".2 .3 .4" rgb2=".1 0.15 0.2" 
            width="512" height="512"/>  

        <material name='MatPlane' reflectance='0.5' texture="texplane" texrepeat="1 1" texuniform="true"/>
    </asset>

    <worldbody>
	
        <geom name='floor' pos='0 0 -0.1' size='100 1 0.1' type='plane' material="MatPlane" condim='3'/>

        <light mode='targetbodycom' target='cart' directional='false' diffuse='.8 .8 .8' specular='0.3 0.3 0.3' pos='0 0 4.0' dir='0 0 -1'/>

        <camera name='targeting' pos='1 1 2' mode='targetbodycom' target='cart'/>

        <body name='cart' pos='0 0 0.05'>

     		<joint name='cart_x' type='slide' pos='0 0 0' axis='1 0 0' limited='false' damping='0' armature='0' stiffness='0' ref='0'/>

     		<geom type='box' pos='0 0 0' size='0.5 0.25 0.05' mass='1000' rgba='0.85 0.32 0.07 1'/>

     		<body name='pole' pos='0 -0.3 0'  axisangle='0 -1 0 90'>

     			<joint name='pole_theta' type='hinge' pos='0 0 0' axis='0 -1 0' />

                <inertial pos='0.5 0 0' mass='100' diaginertia='0.0001 0.0001 0.0001'/>

     			<geom type='box' pos='0.5 0 0' size='0.5 0.05 0.05' rgba='0.55 0.79 0.57 1'/>

     		</body>

     	</body>

    </worldbody>

    <actuator>
    	<general name="cartForce" joint="cart_x"/>
   	</actuator>

</mujoco>
