Joints between bodies from different kinematic trees

Discussion in 'Modeling' started by jernejc, May 23, 2018.

  1. Hi,

    I want to connect two bodies with a hinge joint - one body from kinematic tree 1 and another from kinematic tree 2. I am using the equality connect to connect them by specifying the connect two times - as written in the documentation. All is fine, the bodies connect. Now, is it possible to treat this newly created 'joint' as an actual hinge joint? What I want is to be able to pass the qpos values to this joint. How do I model this?
    I am attaching my model so you get a better idea.

    Thanks,
    Jernej
     

    Attached Files:

  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    You can define a single tree that contains the two original tree and the hinge joint. Start with tree A. Then redefine tree B so that the body where you connected the hinge joints becomes the root of tree B. There is no tool to do this automatically, you would have to do it by hand.

    In general, joints are much better than constraints, so you should use joints when possible (unless of course you want to model soft joint violations -- in which case you have to use equality constraints because the minimal-coordinate convention cannot represent joint violations).
     
  3. If I understand you correctly, what you are proposing is how the 'humanoid' model is made - model from top of body to bottom? Or?
    What I want to do is to model a human from the ground up. This means that I start modeling with the foot and then need to connect the thigh and the upper part of the body (starting with the pelvis). But the I come to the problem how to connect the other leg to the upper part of the body, which should be on the same level as the first leg? I hope this makes sense.
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    If you have a tree, you can always define a new tree where any node is the root. Then you have to redefine the parent-child relations accordingly, starting from the new root. So in your example, you can start with the foot as the root, then go to the pelvis, then make the other leg a child of the pelvis, and eventually the other foot will be the most distant child.

    But it is better to avoid this. You should put the root of the tree somewhere in the middle. This will give you slightly better performance and accuracy.