Difference between "free" joint and "slide"+"hinge"

Discussion in 'Modeling' started by jamesp, Apr 8, 2019.

  1. Hello,

    I would like to define a 6-DOF free joint for a child body relative to its parent, with the intention of being able to toggle specific DOF later during runtime via mjModel's jnt_axis. This is to simulate the constraints that a threaded fastener would be subject to when attached to another body.

    On lines 38-39 of the attached .xml I have defined slide and hinge joints of a child body both with axis="1 1 1". However its parent also moves as shown in the attached image, so unfortunately those combined joints do not really behave as a free 6-DOF joint.

    Is there a better way to achieve what I'm trying to do? :)
    Apologies in advance if I'm missing something obvious, but I've been stuck on this for a while.


    Thanks!
     

    Attached Files:

  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    You need three joints, with axes "1 0 0", "0 1 0" and "0 0 1". What you are doing is creating a single DOF with oblique axis.
     
  3. That was indeed a pretty obvious thing to miss. Thanks!