Can a body have 2 joints?

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Elon Martin
Posts: 6
Joined: Sat Oct 05, 2013 12:11 pm

Can a body have 2 joints?

Post by Elon Martin » Wed Jun 18, 2014 6:59 pm

I am trying to create a mesh type system in OpenSim that can contract and extend when forces act upon it. In real life, each body segment in the system would have three joints on it. I have no idea if OpenSim lets you do this but It seems like it would be rather complicated to accomplish. Any help is gladly appreciated!

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Can a body have 2 joints?

Post by jimmy d » Thu Jun 26, 2014 10:59 am

Hi Elon,

A body can have multiple joints. You can look at the pelvis as an example (two legs and a trunk). If you want a looped structure of bodies, there needs to be at least 1 constraint (rather than a joint).

Cheers,
-james

User avatar
Elon Martin
Posts: 6
Joined: Sat Oct 05, 2013 12:11 pm

Re: Can a body have 2 joints?

Post by Elon Martin » Thu Jun 26, 2014 1:11 pm

So in the case of the pelvis, the body object only has one associated joint in the xml code (pelvis to trunk). The two leg joints are actually associated with each femur body object. They connect and I suppose they would be considered pelvis joints. I guess what I am asking is can a single body object have more than one associated joint in the xml code?

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Can a body have 2 joints?

Post by jimmy d » Thu Jul 03, 2014 9:49 am

Hi Elon,

You can't have bodies with two joints like you are suggesting. You would have to use a combination of 'slave' bodies connected with constraints. The Simbody manual has some description of this;

https://simtk.org/docman/?group_id=47

Gluck,
-james

User avatar
Michael Sherman
Posts: 807
Joined: Fri Apr 01, 2005 6:05 pm

Re: Can a body have 2 joints?

Post by Michael Sherman » Thu Jul 03, 2014 10:27 am

Hi, Elon. To add to James' response --

The discussion in the Simbody theory manual is in section 2.3 and is brief. This is easier to do in practice than it may sound. When you have a topological loop in the graph formed by the bodies and joints, you have to cut the loop so that the mobility of the bodies is represented by a tree (that is, each body has a single joint leading back towards the ground). That establishes the set of coordinates in which the system's motion is expressed. Then constraints must be added to restrict that motion in a way consistent with the loop.

The easiest way to do that is to make the cut in a body, rather than at a joint which at first seems more natural. That is, you pick one of the bodies that is in the loop and split it into two bodies, each with half the mass (and half the inertia). Each body specifies one of the two joints. Then add a Weld constraint to reattach the two halves of the body.

OpenSim's assembly analysis will solve for a set of coordinates that satisfies the Weld constraint. You may have to help by setting the initial conditions so that the welded pieces are brought approximately together (say within 45 degrees of the proper orientation). Then OpenSim will go the rest of the way to satisfy the Weld to a very high precision, after which the body will look and behave as though it were in just one piece.

We have plans to automate this process in a future OpenSim release, but for now you have to do it manually.

Regards,
Sherm

User avatar
Tom Van Wouwe
Posts: 4
Joined: Sun Sep 07, 2014 9:22 am

Re: Can a body have 2 joints?

Post by Tom Van Wouwe » Fri Mar 24, 2017 1:48 am

In order to do predictive simulations I want to build up a model from ground via the feet up to the torso. This means (in topology view) that I do have to create a loop (that comes together at the pelvis) and I will try it like James and Michael have suggested. I am now trying to understand how the state, specifically the kinematics, of the model are kept consistent. Suppose I assign a kinematic state to the model which breaks my weld constraint between my two pelvis bodies. To respect the weld constraint in the model, some coordinates will need to be adapted. How does OpenSim/Simbody deal with this?

Regards
Tom

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Can a body have 2 joints?

Post by Thomas Uchida » Fri Mar 24, 2017 3:43 am

Suppose I assign a kinematic state to the model which breaks my weld constraint between my two pelvis bodies. To respect the weld constraint in the model, some coordinates will need to be adapted. How does OpenSim/Simbody deal with this?
See the Simbody Theory Manual here: https://github.com/simbody/simbody/tree ... imbody/doc (e.g., Section 8.2, Chapter 10). For example, if you call Coordinate::setValue() with the "enforce constraints" flag set to true (see the doxygen here: https://simtk.org/api_docs/opensim/api_ ... 0004213229), the coordinate's value will be set and then the model's pose will be adjusted so that the kinematic constraints are satisfied.

Additional information can be found in the doxygen documentation for the SimTK::Assembler class here: https://simtk.org/api_docs/simbody/3.5/ ... mbler.html.

POST REPLY