I am trying to weld a mocap body to the tip of a finger in mujoco. I am using the following code:
<equality>
<weld body1="mocap_test" body2="finger1_distal" solimp="0.9 0.95 0.001" solref="0.02 1" anchor="0.0 0.1035 0.0"></weld>
</equality>
However, the mocap keeps getting welded to the base of the finger not the tip (see image. Currently the base of the distal body is going to the mocap body but I would like the tip (blue point) to go there). How do I weld it to the tip in mujoco? I thought I could use the anchor command but that seems to be doing nothing. Thanks for the help
For reference, the full finger xml is:
<body name="finger1_proximal" childclass="prox_link" pos="0.26 0.0 0.0" euler="1.57079632679 3.14159265359 -1.57079632679">
<geom name="finger1_proximal" rgba="0.0 01 0.0 1"></geom>
<body name="finger1_middle" childclass="middle_link" pos="0 0.0655 0" euler="0 0 0">
<inertial pos="0 0 0" mass="0.09930" fullinertia="0.00030191767 0.00001861456 0.00030797470 0.00000203190 0.00000000003 0.00000000011"></inertial>
<joint name="finger1_middle_joint"></joint>
<geom name="finger1_middle"></geom>
<body name="finger1_distal" childclass="dist_link" pos="0 0.069 0" euler="0 3.14159265359 0">
<inertial pos="0 0 0" mass="0.09268" fullinertia="0.00053149692 0.00001518193 0.00053424309 -0.00000000003 0.00000000000 0.00000474504"></inertial>
<joint name="finger1_dist_joint"></joint>
<geom name="finger1_distal_bracket" mesh="distal_bracket" user="0.0285"></geom>
<geom name="finger1_distal" mesh="distal_tip" pos="0 0.0285 0" user="0.075"></geom>
<site name="finger1_tip" pos="0 0.1035 0"></site>
</body>
</body>
</body>