<mujoco xmlns:xacro="http://www.ros.org/wiki/xacro" model="conical_pendulum">

    <xacro:property name="mass"         value="1000" />
    <xacro:property name="radius"       value="0.2" />
    <xacro:property name="digInertia"   value="${(2/5)*(mass)*(radius**2)}" />
    
    <asset>
        <texture builtin="checker" height="100" name="texplane" rgb1="0 0 0" rgb2="0.8 0.8 0.8" type="2d" width="100"/>
        <material name="MatPlane" reflectance="0.5" shininess="1" specular="1" texrepeat="2 2" texture="texplane"/>
    </asset>

    <option integrator="RK4" iterations="50" solver="PGS" timestep="0.003" >
        <!-- <flags solverstat="enable" energy="enable"/>-->
    </option>

    <worldbody>
        <light cutoff="100" diffuse="1 1 1" dir="-0 0 -1.3" directional="true" exponent="1" pos="0 0 1.3" specular=".1 .1 .1"/>
        <geom condim="3" friction="1 .1 .1" material="MatPlane" name="floor" pos="0 0 0" rgba="0.8 0.9 0.8 1" size="2 2 0.125" type="plane"/>
            <body name="link_rope" pos="0 0 3">
                <site name="end1" pos="0 0 0" type="sphere" size="0.01"/>
                
                <body name="esfera" pos="0 0 -2" >
                    <site name="end2" pos="0 0 0" type="sphere" size="0.01"/>

                    <joint name="amarraX" type="hinge" damping="0.1" axis="1 0 0" pos="0 0 2"/>
                    <joint name="amarraY" type="hinge" damping="0.1" axis="0 1 0" pos="0 0 2"/>
                    <joint name="amarraZ" type="hinge" damping="0.1" axis="0 0 1" pos="0 0 2"/>

                    <geom name="sphere_geom" size="${radius}" type="sphere" rgba="1 0 0 1"/>

                    <inertial pos="0 0 0" mass="${mass}" diaginertia="${digInertia} ${digInertia} ${digInertia}"/>

                </body>
            </body>
            <site name="end3" pos="0 0 0" type="sphere" size="0.01"/>
    </worldbody>

    <actuator>
        <motor name='aX' joint="amarraX"/>
        <motor name='aY' joint="amarraY"/>
        <motor name='aZ' joint="amarraZ"/>
    </actuator>

    <tendon>
        <spatial limited="false" rgba="0 1 0 1" range="0 0.6" width="0.005">
            <site site="end1"/>
            <site site="end2"/>
        </spatial>
    </tendon>

    <tendon>
        <spatial limited="false" rgba="0 0 1 1"  width="0.005">
            <site site="end1"/>
            <site site="end3"/>
        </spatial>
    </tendon>
  
</mujoco>