Page 1 of 2

A body between two joints.

Posted: Wed Jun 08, 2011 7:50 am
by gphilips3
In the upper extremity model, I would like to include an extra body so that it acts as a straight line joining the elbow joint to the hand. It doesnt have a visible object. However when I try to add it to the elbow joint it says that it is unable to add multiple joints to the same segment.

How can I implement it?

RE: A body between two joints.

Posted: Wed Jun 08, 2011 10:28 am
by aymanh
Hi Gregory,

I'm not sure about the topology/layout of your model but the model is assumed to have a tree structure of bodies connected by Joints. Every joint you add also adds a single body to the model. The tree is rooted in ground (no coincidence ;) and has no loops. A joint has a parent body (inboard) and a child body (outboard).

If the addition of the new joint closes a loop then you shouldn't use a joint, you should use a constraint instead.

Hope this helps,
-Ayman

RE: A body between two joints.

Posted: Wed Jun 08, 2011 10:48 am
by gphilips3
Thank you Ayman. I will modify the tree structure then inorder to try and achieve the result.

RE: A body between two joints.

Posted: Mon Jun 13, 2011 8:04 pm
by gphilips3
Can you suggest an easier way of achieving what I am trying to do?

I am trying to get the center of mass of the arm incorporated into the upper extremity model. The problem is that in my experiments, the arm is placed such that the two bones of the arm are parallel to each other.

Since the bones are of different lengths and masses, the only way that seems to work is to create a dummy body between the elbow and shoulder joint to achieve this.

When doing this, the tree structure is proving a problem. Also since this is a dummy structure I dont want to add a geometry file. Will that be a problem?

I would appreciate any suggestions you may have. Thank you.

RE: A body between two joints.

Posted: Tue Jun 14, 2011 9:20 am
by gphilips3
I have created an osim file with the additional body called forearm added. However when I try to run it on Opensim, the application shuts down completely before giving me an error message. What could be the possible error?

RE: A body between two joints.

Posted: Tue Jun 14, 2011 10:09 am
by aymanh
Hi Gregory,

The very likely issue is a mistake in the new body/joint definition. I'd recommend checking the Wiki page http://wiki.simtk.org/opensim/ and going thru the example under the title "Osim file editing" which shows how to add a segment to a model (in XML). Please let us know if you run into issues so we we can update the example.

Thanks much and good luck,
-Ayman

RE: A body between two joints.

Posted: Thu Jun 16, 2011 2:18 pm
by gphilips3
Thank you Ayman.

It is very helpful. Is there anyway to record a log of Opensim parsing through a model? I looked into the log files that are recorded in Opensim and they dont show what I want.

When I open my model in Opensim, I get a message saying that a body is unassigned and since I am unable to find it, a log of every body being added to the mdoel would help. Is there such a log in the current version of Opensim? (Its not in err.log)

RE: A body between two joints.

Posted: Fri Jun 17, 2011 1:05 pm
by aymanh
Hi Gregory,

There's a debug level that you can set in the GUI, and if you set it to 3 you'll get more detailed level of XML parsing than you ever want but could be useful. Try that before loading your model (Edit->Preferences->Debug set value to 3) and let me know what you find. If the application crashes please report a bug and attach the file as we should be more tolerant to incorrect file format.

Good luck,
-Ayman

RE: A body between two joints.

Posted: Fri Jun 17, 2011 1:22 pm
by gphilips3
It continued to crash so I sent a copy of the model file and reported the bug. Thank you.

RE: A body between two joints.

Posted: Wed Jul 13, 2011 9:13 am
by gphilips3
Hi Ayman.

I have been taking down the osim file that I created piece by piece. And I keep getting a coupler deviation error (Coordinate coupler: unknown independent coordinate deviation).

Using the debug tool at the higest setting I can see that the Osim file has been parsed to the end. How can I see where this error is occuring?

Since I inserted a new body between two bodies is the error arising because I need to set a coordinate coupler for it?