<mujoco model="panda_hand">
    <asset>
        <mesh name="finger_plastic" file="meshes/panda_gripper/3dprinted_finger.stl" />

        <mesh name="hand" file="meshes/panda_gripper/hand.stl" />
        <mesh name="hand_vis" file="meshes/panda_gripper/hand_vis.stl" />
        <mesh name="finger" file="meshes/panda_gripper/finger.stl" />
        <mesh name="finger_vis" file="meshes/panda_gripper/finger_vis.stl" />
        <mesh name="finger_vis2" file="meshes/panda_gripper/finger_longer.stl" />
    </asset>

    <worldbody>
        <body name="right_gripper" pos="0 0 0" quat="0.707107 0 0 -0.707107">
            <site name="ft_frame" pos="0 0 0" size="0.01 0.01 0.01" rgba="1 0 0 1" type="sphere" group="1"/>
            <geom pos="0 0 0." quat="0.707107 0 0 0.707107" type="mesh" contype="0" conaffinity="0" group="1" mesh="hand_vis" name="hand_visual" rgba="1 1 1 1" />
            <geom pos="0 0 0." quat="0.707107 0 0 0.707107" type="mesh" mesh="hand"  group="0" name="hand_collision"/>
            <!-- This site was added for visualization. -->
            <site name="grip_site" pos="0 0 0.16" size="0.0025 0.0025 0.0025" rgba="1 0 0 0.5" type="sphere" group="1"/>

            <geom name="grip_geom" pos="0 0 0.16" size="0.0025 0.0025 0.0025" rgba="1 0 0 0.5" type="sphere" group="1"/>

            <!-- This site was added for visualization. -->
            <body name="leftfinger" pos="0 0 0.0524" quat="0.707107 0 0 0.707107">
                <geom type="mesh" contype="0" conaffinity="0" group="1" mesh="finger_plastic" name="finger1_visual" rgba="0.499 0.499 0.499 1" />
                <geom type="mesh" group="0" conaffinity="1" contype="0" solref="0.02 1" friction="1 0.005 0.0001" condim="4" mesh="finger_plastic" name="finger1_collision"/>
                <body name="finger_joint1_tip" pos="0 0.0085 0.056">
                    <geom size="0.008 0.004 0.008" pos="0 -0.005 -0.015" quat="0 0 0 1" type="box" group="0" solref="0.01 0.5" friction = "2 0.05 0.0001" conaffinity="1" contype="1" name="finger1_pad_collision"/>
                </body>
            </body>
            <body name="rightfinger" pos="0 0 0.0524" quat="0.707107 0 0 0.707107">
                <geom quat="0 0 0 1" type="mesh" contype="0" conaffinity="0" group="1" mesh="finger_plastic" name="finger2_visual" rgba="0.499 0.499 0.499 1" />
                <geom quat="0 0 0 1" type="mesh" group="0" conaffinity="1" contype="0" solref="0.02 1" friction="1 0.005 0.0001" condim="4" mesh="finger_plastic" name="finger2_collision"/>
                <body name="finger_joint2_tip" pos="0 -0.0085 0.056">
                    <geom size="0.008 0.004 0.008" pos="0 0.005 -0.015" quat="0 0 0 1" type="box" group="0" solref="0.01 0.5" friction = "2 0.05 0.0001" conaffinity="1" contype="1" name="finger2_pad_collision"/>
                </body>
            </body>
        </body>
    </worldbody>
    <sensor>
        <force name="force_ee" site="ft_frame"/>
        <torque name="torque_ee" site="ft_frame"/>
    </sensor>
</mujoco>
