<mujoco model="arm3d">
    <compiler inertiafromgeom="true" angle="radian" coordinate="local" />
    <option timestep="0.01" gravity="0 0 0" iterations="20" integrator="Euler" />
    
    <default>
        <joint armature='0.04' damping="1" limited="true"/>
        <geom friction=".8 .1 .1" density="300" margin="0.002" condim="1" contype="1" conaffinity="1"/>
    </default>
    
    <worldbody>
        <light diffuse=".9 .9 .9" pos="0 0 5" dir="0 0 -1"/>
        <!--<geom rgba="0.16470588 0.60392157 0.5372549 1.0" type="plane" pos="0 0.5 -0.15" size="2 4 0.1" contype="1" conaffinity="1"/>-->
        <geom rgba="1.0 1.0 1.0 1.0" type="plane" pos="0 0.5 -0.15" size="4 4 0.1" contype="1" conaffinity="1"/>

        <body name="palm" pos="1 2.1 0">
            <geom rgba="0.14117647 0.17647059 0.0. 0. 0. 1." type="capsule" fromto="0 0 -0.1 0 0 0.1" size="0.12"/>
            <body name="proximal_1" pos="0 0 -0.075" axisangle="0 0 1 0.785">
                <joint name="proximal_j_1" type="hinge" pos="0 0 0" axis="0 0 1" range="1.5 3.0" damping="1.0" />
                <geom rgba="0. 0. 0. 1." type="capsule"  fromto="0 0 0.0 .95 0 0" size="0.03" contype="1" conaffinity="1"/>
                <body name="distal_1" pos=".95 0 0" axisangle="0 0 1 -0.785">
                    <joint name="distal_j_1" type="hinge" pos="0 0 0" axis="0 0 1" range="1.5 3.5" damping="1.0"/>
                    <geom rgba="0. 0. 0. 1." type="capsule"  fromto="0 0 0 .75 0 0" size="0.03" contype="1" conaffinity="1"/>
                    <body name="distal_2" pos=".75 0 0" axisangle="0 0 1 -1.57">
                        <joint name="distal_j_2" type="hinge" pos="0 0 0" axis="0 0 1" range="0.5 2.0" damping="1.0"/>
                        <geom rgba="0. 0. 0. 1." type="capsule" fromto="0 0 0 .75 0 0" size="0.03" contype="1" conaffinity="1"/>
                        <body name="distal_3" pos=".75 0 0" axisangle="0 0 1 0">
                            <joint name="distal_j_3" type="hinge" pos="0 0 0" axis="0 0 1" range="0.5 2.0" damping="1.0"/>  
                            <geom rgba="0. 0. 0. 1." type="capsule" fromto="0 0 0 .9 0 0" size="0.03" contype="1" conaffinity="1"/>
                            <body name="distal_4" pos=".9 0 0">
                                <site name="tip arml" pos="0.1 -0.1 0" size="0.01" />
                                <site name="tip armr" pos="0.1 0.1 0" size="0.01" />
                                <!--<joint name="distal_j_3" type="hinge" pos="0 0 0" axis="1 0 0" range="-3.3213 3.3" damping="0.5"/>-->
                                <geom rgba="0. 0. 0. 1." type="capsule" fromto="0 0 0 0.15 0.15 0" size="0.03" contype="1" conaffinity="1" />
                                <geom rgba="0. 0. 0. 1." type="capsule" fromto="0.15 0.15 0 0.3 0.15 0" size="0.03" contype="1" conaffinity="1" />
                                <geom rgba="0. 0. 0. 1." type="capsule" fromto="0 0 0 0.15 -0.15 0" size="0.03" contype="1" conaffinity="1" />
                                <geom rgba="0. 0. 0. 1." type="capsule" fromto="0.15 -0.15 0 0.3 -0.15 0" size="0.03" contype="1" conaffinity="1" />
                            </body>
                        </body>
                    </body>
                </body>
            </body>
        </body>
        
        <body name="object" pos="0.074 .075 0">    <!-- Object propoerties: pos="0.05 .05 0" (new) ! "0.074 .075 0" (new10) ! --->
            <!--<geom rgba="1. 1. 1. 1" type="box" size="0.05 0.05 0.05" density='0.00001' contype="1" conaffinity="1"/>-->
            <geom rgba="1 0 0 1" type="cylinder" size="0.1 0.1 1.4" density='0.00001' contype="1" conaffinity="1"/>
            <joint name="obj_slidey" type="slide" pos="0.025 0.025 0.025" axis="0 1 0" range="-10.3213 10.3" damping="0.5"/>
            <joint name="obj_slidex" type="slide" pos="0.025 0.025 0.025" axis="1 0 0" range="-10.3213 10.3" damping="0.5"/>
        </body>


        <!-- Backgoround Object propoerties --

        <body name="bgobject0" pos="1.2 -0.9 0">    
            <geom rgba="0 1 0 1" type="box" size="0.1 0.1 .1" density='0.00001' contype="1" conaffinity="1"/>
            <joint name="obj_slidey_bg0" type="slide" pos="0.025 0.025 0.025" axis="0 1 0" range="-10.3213 10.3" damping="0.5"/>
            <joint name="obj_slidex_bg0" type="slide" pos="0.025 0.025 0.025" axis="1 0 0" range="-10.3213 10.3" damping="0.5"/>
        </body>
        <body name="bgobject1" pos="1.9 -0.6 0">    
            <geom rgba="0 0 0 1" type="ellipsoid" size="0.1 0.1 .1" density='0.00001' contype="1" conaffinity="1"/>
            <joint name="obj_slidey_bg1" type="slide" pos="0.025 0.025 0.025" axis="0 1 0" range="-10.3213 10.3" damping="0.5"/>
            <joint name="obj_slidex_bg1" type="slide" pos="0.025 0.025 0.025" axis="1 0 0" range="-10.3213 10.3" damping="0.5"/>
        </body>

        <!-- Backgoround Object propoerties --->


        <body name="goal" pos="0 -1.0 -0.145">
            <!--<body name="goal" pos="0.0 0.0 -0.1">-->
            <!--<geom rgba="1. 0. 0. 1" type="box" size="0.1 0.1 0.1" density='0.00001' contype="0" conaffinity="0"/>-->
            <geom rgba="0. 0. 1. 1" type="box" size="0.2 0.2 0.01" density='0.00001' contype="0" conaffinity="0"/>
            <joint name="goal_slidey" type="slide" pos="0 0 0" axis="0 1 0" range="-10.3213 10.3" damping="0.5"/>
            <joint name="goal_slidex" type="slide" pos="0 0 0" axis="1 0 0" range="-10.3213 10.3" damping="0.5"/> 
        </body>

    </worldbody>

    <actuator>
        <motor joint="proximal_j_1" ctrlrange="-3 3" ctrllimited="true"/>
        <motor joint="distal_j_1" ctrlrange="-3 3" ctrllimited="true"/>
        <motor joint="distal_j_2" ctrlrange="-3 3" ctrllimited="true"/>
        <motor joint="distal_j_3" ctrlrange="-3 3" ctrllimited="true"/>
        <!--<motor joint="distal_j_3" ctrlrange="-3 3" ctrllimited="true"/>-->
    </actuator>
</mujoco>
