<mujoco model="finger">
    <include file="./common/visual.xml"/>
    <include file="./common/skybox.xml"/>
    <include file="./common/materials.xml"/>
    
    <option timestep="0.02" iterations="50" solver="Newton" tolerance="1e-10" gravity = "0 0 0" collision="predefined" viscosity="0.1"/>

    <size njmax="500" nconmax="100" nstack="1000"/>
    
    <visual>
        <rgba haze=".15 .25 .35 1"/>
    </visual>
    
    <default>
        <joint type="hinge" pos="0 0 0" axis="0 1 0" limited="false" range="-180 180" damping=".5"/>
        <motor ctrllimited="false" ctrlrange="-1 1" gear="1"/>
		<tendon stiffness="0" damping=".5" width="0.03"/>
		<geom size="0.05"/>
		<site size="0.08"/>
    </default>

    <worldbody>
        <geom name="floor" pos="0 0 0" size="0 0 1" type="plane" material="grid"/>
        <light directional="true" diffuse=".8 .8 .8" specular=".2 .2 .2" pos="0 0 5" dir="0 0 -1"/>
        <site name="target" pos="3 0 7" size="0.14" rgba="1 0 0 .3"/>
        <body name="vbar1" pos="0 0 1">
            <geom type="capsule" fromto="0 0 0  0 0 2" material="self" mass="1"/>
            <site name="vb1s" pos="0 0 0"/>
			<site name="vb1e" pos="0 0 2"/>
            <site name="vb1m" pos="0 0 0.5"/>
            <body name="hbar1" pos="0 0 0.5">
                <geom type="capsule" fromto="0 0 0  0.5 0 0" material="self" mass="1"/>
                <joint name="j2" pos="0 0 0"/>
                <body name="vbar2" pos="0.5 0 0">
                    <geom type="capsule" fromto="0 0 -0.45  0 0 1.35" material="self" mass="1"/>
                    <site name="vb2s" pos="0 0 -0.45"/>
                    <site name="vb2e" pos="0 0 1.35"/>
                    <site name="vb2m" pos="0 0 0"/>
                    <!-- <joint name="j3" pos="0 0 0"/> -->
                    <body name="hbar2" pos="0 0 0">
                        <geom type="capsule" fromto="0 0 0  0.8 0 0" material="self" mass="1"/>
                        <joint name="j4" pos="0 0 0"/>
                        <body name="vbar3" pos="0.8 0 0">
                            <geom type="capsule" fromto="0 0 -0.4  0 0 1.2" material="self" mass="1"/>
                            <site name="vb3s" pos="0 0 -0.4"/>
                            <site name="vb3e" pos="0 0 1.2"/>
                            <site name="vb3m" pos="0 0 0"/>
                            <!-- <joint name="j5" pos="0 0 0"/> -->
                            <body name="hbar3" pos="0 0 0">
                                <geom type="capsule" fromto="0 0 0  1 0 0" material="self" mass="1"/>
                                <joint name="j6" pos="0 0 0"/>
                                <body name="vbar4" pos="1 0 0">
                                    <geom type="capsule" fromto="0 0 -0.35  0 0 1.05" material="self" mass="1"/>
                                    <site name="vb4s" pos="0 0 -0.35"/>
                                    <site name="vb4e" pos="0 0 1.05"/>
                                    <site name="vb4m" pos="0 0 0"/>
                                    <!-- <joint name="j7" pos="0 0 0"/> -->
                                    <body name="hbar4" pos="0 0 0">
                                        <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                        <joint name="j8" pos="0 0 0"/>
                                        <body name="vbar5" pos="1.2 0 0">
                                            <geom type="capsule" fromto="0 0 -0.3  0 0 0.9" material="self" mass="1"/>
                                            <site name="vb5s" pos="0 0 -0.3"/>
                                            <site name="vb5e" pos="0 0 0.9"/>
                                            <site name="vb5m" pos="0 0 0"/>
                                            <!-- <joint name="j9" pos="0 0 0"/> -->
                                            <body name="hbar5" pos="0 0 0">
                                                <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                                <joint name="j10" pos="0 0 0"/>
                                                <body name="vbar6" pos="1.2 0 0">
                                                    <geom type="capsule" fromto="0 0 -0.25  0 0 0.75" material="self" mass="1"/>
                                                    <site name="vb6s" pos="0 0 -0.25"/>
                                                    <site name="vb6e" pos="0 0 0.75"/>
                                                    <site name="vb6m" pos="0 0 0"/>
                                                    <!-- <joint name="j11" pos="0 0 0"/> -->
                                                    <body name="hbar6" pos="0 0 0">
                                                        <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                                        <joint name="j12" pos="0 0 0"/>
                                                        <body name="vbar7" pos="1.2 0 0">
                                                            <geom type="capsule" fromto="0 0 -0.2  0 0 0.6" material="self" mass="1"/>
                                                            <site name="vb7s" pos="0 0 -0.2"/>
                                                            <site name="vb7e" pos="0 0 0.6"/>
                                                            <site name="vb7m" pos="0 0 0"/>
                                                            <!-- <joint name="j13" pos="0 0 0"/> -->
                                                            <body name="hbar7" pos="0 0 0">
                                                                <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                                                <joint name="j14" pos="0 0 0"/>
                                                                <body name="vbar8" pos="1.2 0 0">
                                                                    <geom type="capsule" fromto="0 0 -0.15  0 0 0.45" material="self" mass="1"/>
                                                                    <site name="vb8s" pos="0 0 -0.15"/>
                                                                    <site name="vb8e" pos="0 0 0.45"/>
                                                                    <site name="vb8m" pos="0 0 0"/>
                                                                    <!-- <joint name="j15" pos="0 0 0"/> -->
                                                                    <body name="hbar8" pos="0 0 0">
                                                                        <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                                                        <joint name="j16" pos="0 0 0"/>
                                                                        <body name="vbar9" pos="1.2 0 0">
                                                                            <geom type="capsule" fromto="0 0 -0.1  0 0 0.3" material="self" mass="1"/>
                                                                            <site name="vb9s" pos="0 0 -0.1"/>
                                                                            <site name="vb9e" pos="0 0 0.3"/>
                                                                            <site name="vb9m" pos="0 0 0"/>
                                                                            <!-- <joint name="j17" pos="0 0 0"/> -->
                                                                            <body name="hbar9" pos="0 0 0">
                                                                                <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                                                                <joint name="j18" pos="0 0 0"/>
                                                                                <body name="vbar10" pos="1.2 0 0">
                                                                                    <geom type="capsule" fromto="0 0 -0.05  0 0 0.15" material="self" mass="1"/>
                                                                                    <site name="vb10s" pos="0 0 -0.05"/>
                                                                                    <site name="vb10e" pos="0 0 0.15"/>
                                                                                    <site name="vb10m" pos="0 0 0"/>
                                                                                    <!-- <joint name="j19" pos="0 0 0"/> -->
                                                                                    <body name="hbar10" pos="0 0 0">
                                                                                        <geom type="capsule" fromto="0 0 0  1.2 0 0" material="self" mass="1"/>
                                                                                        <joint name="j20" pos="0 0 0"/>
                                                                                        <site name="hb10e" pos="1.2 0 0"/>
                                                                                    </body>
                                                                                </body>
                                                                            </body>
                                                                        </body>
                                                                    </body>
                                                                </body>
                                                            </body>
                                                        </body>
                                                    </body>
                                                </body>
                                            </body>
                                        </body>
                                    </body>
                                </body>
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>
    </worldbody>

    <tendon>
        <spatial name="S11">
            <site site="vb1s"/>
            <site site="vb2s"/>
        </spatial>
		<spatial name="S12">
            <site site="vb1m"/>
            <site site="vb2s"/>
        </spatial>
		<spatial name="S13">
            <site site="vb1m"/>
            <site site="vb2e"/>
        </spatial>
		<spatial name="S14">
            <site site="vb1e"/>
            <site site="vb2e"/>
        </spatial>
        
        <spatial name="S21">
            <site site="vb2s"/>
            <site site="vb3s"/>
        </spatial>
		<spatial name="S22">
            <site site="vb2m"/>
            <site site="vb3s"/>
        </spatial>
		<spatial name="S23">
            <site site="vb2m"/>
            <site site="vb3e"/>
        </spatial>
		<spatial name="S24">
            <site site="vb2e"/>
            <site site="vb3e"/>
        </spatial>
        
        <spatial name="S31">
            <site site="vb3s"/>
            <site site="vb4s"/>
        </spatial>
		<spatial name="S32">
            <site site="vb3m"/>
            <site site="vb4s"/>
        </spatial>
		<spatial name="S33">
            <site site="vb3m"/>
            <site site="vb4e"/>
        </spatial>
		<spatial name="S34">
            <site site="vb3e"/>
            <site site="vb4e"/>
        </spatial>
        
        <spatial name="S41">
            <site site="vb4s"/>
            <site site="vb5s"/>
        </spatial>
		<spatial name="S42">
            <site site="vb4m"/>
            <site site="vb5s"/>
        </spatial>
		<spatial name="S43">
            <site site="vb4m"/>
            <site site="vb5e"/>
        </spatial>
		<spatial name="S44">
            <site site="vb4e"/>
            <site site="vb5e"/>
        </spatial>
        
        <spatial name="S51">
            <site site="vb5s"/>
            <site site="vb6s"/>
        </spatial>
		<spatial name="S52">
            <site site="vb5m"/>
            <site site="vb6s"/>
        </spatial>
		<spatial name="S53">
            <site site="vb5m"/>
            <site site="vb6e"/>
        </spatial>
		<spatial name="S54">
            <site site="vb5e"/>
            <site site="vb6e"/>
        </spatial>
        
        <spatial name="S61">
            <site site="vb6s"/>
            <site site="vb7s"/>
        </spatial>
		<spatial name="S62">
            <site site="vb6m"/>
            <site site="vb7s"/>
        </spatial>
		<spatial name="S63">
            <site site="vb6m"/>
            <site site="vb7e"/>
        </spatial>
		<spatial name="S64">
            <site site="vb6e"/>
            <site site="vb7e"/>
        </spatial>
        
        <spatial name="S71">
            <site site="vb7s"/>
            <site site="vb8s"/>
        </spatial>
		<spatial name="S72">
            <site site="vb7m"/>
            <site site="vb8s"/>
        </spatial>
		<spatial name="S73">
            <site site="vb7m"/>
            <site site="vb8e"/>
        </spatial>
		<spatial name="S74">
            <site site="vb7e"/>
            <site site="vb8e"/>
        </spatial>
        
        <spatial name="S81">
            <site site="vb8s"/>
            <site site="vb9s"/>
        </spatial>
		<spatial name="S82">
            <site site="vb8m"/>
            <site site="vb9s"/>
        </spatial>
		<spatial name="S83">
            <site site="vb8m"/>
            <site site="vb9e"/>
        </spatial>
		<spatial name="S84">
            <site site="vb8e"/>
            <site site="vb9e"/>
        </spatial>
        
        <spatial name="S91">
            <site site="vb9s"/>
            <site site="vb10s"/>
        </spatial>
		<spatial name="S92">
            <site site="vb9m"/>
            <site site="vb10s"/>
        </spatial>
		<spatial name="S93">
            <site site="vb9m"/>
            <site site="vb10e"/>
        </spatial>
		<spatial name="S94">
            <site site="vb9e"/>
            <site site="vb10e"/>
        </spatial>
        
        <spatial name="S101">
            <site site="vb10s"/>
            <site site="hb10e"/>
        </spatial>
        <spatial name="S102">
            <site site="vb10e"/>
            <site site="hb10e"/>
        </spatial>
    </tendon>   

    <actuator>
        <motor tendon="S11"/>
        <motor tendon="S12"/>
		<motor tendon="S13"/>
        <motor tendon="S14"/>
        
        <motor tendon="S21"/>
        <motor tendon="S22"/>
		<motor tendon="S23"/>
        <motor tendon="S24"/>
        
        <motor tendon="S31"/>
        <motor tendon="S32"/>
		<motor tendon="S33"/>
        <motor tendon="S34"/>
        
        <motor tendon="S41"/>
        <motor tendon="S42"/>
		<motor tendon="S43"/>
        <motor tendon="S44"/>
        
        <motor tendon="S51"/>
        <motor tendon="S52"/>
		<motor tendon="S53"/>
        <motor tendon="S54"/>
        
        <motor tendon="S61"/>
        <motor tendon="S62"/>
		<motor tendon="S63"/>
        <motor tendon="S64"/>
        
        <motor tendon="S71"/>
        <motor tendon="S72"/>
		<motor tendon="S73"/>
        <motor tendon="S74"/>
        
        <motor tendon="S81"/>
        <motor tendon="S82"/>
		<motor tendon="S83"/>
        <motor tendon="S84"/>
        
        <motor tendon="S91"/>
        <motor tendon="S92"/>
		<motor tendon="S93"/>
        <motor tendon="S94"/>
        
        <motor tendon="S101"/>
        <motor tendon="S102"/>
    </actuator>
</mujoco>
