<mujoco model="2-link 6-muscle arm">
    <!--  Copyright © 2018, Roboti LLC

          This file is licensed under the MuJoCo Resource License (the "License").
          You may not use this file except in compliance with the License.
          You may obtain a copy of the License at

            https://www.roboti.us/resourcelicense.txt
    -->

    <option timestep="0.005" iterations="50" solver="Newton" tolerance="1e-10"/>

    <size njmax="50" nconmax="10" nstack="200"/>

    <visual>
        <rgba haze=".3 .3 .3 1"/>
    </visual>

    <default>
        <joint type="hinge" pos="0 0 0" axis="0 1 0" limited="true" damping="0" frictionloss="10" />
        <muscle ctrllimited="true" ctrlrange="0 1" scale="1000"/>
    </default>

    <asset>
        <texture type="skybox" builtin="gradient" rgb1="0.6 0.6 0.6" rgb2="0 0 0" width="512" height="512"/> 

        <texture name="texplane" type="2d" builtin="checker" rgb1=".25 .25 .25" rgb2=".3 .3 .3" width="512" height="512" mark="cross" markrgb=".8 .8 .8"/>  

        <material name="matplane" reflectance="0.3" texture="texplane" texrepeat="1 1" texuniform="true"/>
    </asset>

    <worldbody>
        <geom name="floor" pos="0 0 -0.5" size="0 0 1" type="plane" material="matplane"/>

        <light directional="true" diffuse=".8 .8 .8" specular=".2 .2 .2" pos="0 0 5" dir="0 1 -5"/>

        <site name="S_J0_0" pos="-0.15 0 1.2" size="0.02" rgba="0.7 0.8 0.95 .1" group="1"/>
        <site name="S_J0_1" pos="0.15 0 1.2" size="0.02" rgba="0.7 0.8 0.95 .1" group="1"/>

        <site name="S_M0" pos="0.40 0 1.8" size="0.02"/>
        <site name="S_M2" pos="0.40 0 1.5" size="0.02"/>
        <site name="S_M1" pos="-0.40 0 1.5" size="0.02"/>

        <body pos="0 0 1.2">
            <joint name="Hip" range="-60 60"/>
            <geom name="Hip" type="cylinder" pos="0 0 0" zaxis="0 1 0" size=".1 .05" rgba="1 1 1 .5" mass="0"/>
            
            <geom name="L0" type="capsule" size="0.045" fromto="0 0 0  0 0 -.50" rgba=".7 .7 .7 1"/>
            
            <site name="S_L0_1" pos="0.05 0 -.1" size="0.02"/>
			<site name="S_L0_0" pos="-0.05 0 -.1" size="0.02"/>

			<site name="S_L0_2" pos="-0.1 0 -.25" size="0.02"/>
			<site name="S_L0_3" pos=" 0.00 0 -.25" size="0.02"/>
            <site name="S_L0_4" pos="+0.1 0 -.25" size="0.02"/>

            <body pos="0 0 -.5">
            	<joint name="Knee" range="-90 0"/>
            	<geom name="Knee" type="cylinder" pos="0 0 0" zaxis="0 1 0" size=".1 .05" rgba="1 1 1 .5" mass="0"/>
		        
		        <geom name="L1" type="capsule" size="0.045" fromto="0 0 0 0 0 -0.5" rgba=".7 .7 .7 1"/>
            	
				<site name="S_L1_0" pos="-0.05 0 -.1" size="0.02"/>
		        <site name="S_L1_1" pos="0.05 0 -.1" size="0.02"/>

		        <site name="S_J1_0" pos="-0.15 0 0" size="0.02" rgba="0.7 0.8 0.95 .1" group="1"/>
		        <site name="S_J1_1" pos="0.15 0 0" size="0.02" rgba="0.7 0.8 0.95 .1" group="1"/>
            </body>
        </body>
    </worldbody>

    <tendon>
        <spatial name="T_M0" width="0.01" rgba="0.55 0.78 0.55 1">
            <site site="S_M0"/>
            <geom geom="Hip" sidesite="S_J0_0"/>
            <site site="S_L0_3"/>
            <geom geom="Knee" sidesite="S_J1_1"/>
            <site site="S_L1_1"/>
        </spatial>
        
        <spatial name="T_M1" width="0.01" rgba="0.95 0.50 0.47 1">
            <site site="S_M1"/>
            <geom geom="Hip" sidesite="S_J0_1"/>
            <site site="S_L0_1"/>
        </spatial>

        <spatial name="T_M2" width="0.01" rgba="0.45 0.49 0.83 1">
            <site site="S_M2"/>
            <geom geom="Hip" sidesite="S_J0_0"/>
            <site site="S_L0_2"/>
            <geom geom="Knee" sidesite="S_J1_0"/>
            <site site="S_L1_0"/>
        </spatial>

    </tendon>   

    <actuator>
    	<muscle name="T_M0" tendon="T_M0"/>
    	<muscle name="T_M1" tendon="T_M1"/>
    	<muscle name="T_M2" tendon="T_M2"/>
    </actuator>
</mujoco>
