Crash with model migrated to simbody eng.

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Simon Harrison
Posts: 19
Joined: Mon Oct 29, 2007 5:39 pm

Crash with model migrated to simbody eng.

Post by Simon Harrison » Sun Aug 03, 2008 11:18 pm

Hi,

I've migrated my model from SIMM to opensim, creating a model based on the simmkinematics engine. Based on the layout of the examples, I have attempted to further migrate the model to employ the Simbody engine.

I think that I have addressed all of the error messages:
1. transformed the model such that all rot2planar joints are in the XY plane
2. ensured at least one (fixed) DOF per joint (i.e. no "welded" joints)
3. added the SpeedSet for each DOF

Now when I load the file, opensim crashes without any error report. Maybe there is a typo in the model, but VIM editor doesn't show any obvious XML errors.

How can I determine what is wrong in the file?

User avatar
Simon Harrison
Posts: 19
Joined: Mon Oct 29, 2007 5:39 pm

RE: Crash with model migrated to simbody eng.

Post by Simon Harrison » Wed Aug 06, 2008 8:11 pm

here is the diagnostics using opensim_w.exe from a command window:

Created model forelimb from file D:\ ...\fullForelimb.osim
Handling locked coordinate.
Found constant rotational offset.
Constant rotational offsets are not currently supported.
Setting the constant rotational offset to 0.0.
Found constant rotational offset.
Constant rotational offsets are not currently supported.
Setting the constant rotational offset to 0.0.
Found constant rotational offset.
Constant rotational offsets are not currently supported.
Setting the constant rotational offset to 0.0.
Found constant rotational offset.
Constant rotational offsets are not currently supported.
Setting the constant rotational offset to 0.0.
Found constant rotational offset.
Constant rotational offsets are not currently supported.
Setting the constant rotational offset to 0.0.
Found constant rotational offset.
Constant rotational offsets are not currently supported.
Setting the constant rotational offset to 0.0.
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0c973852, pid=5864, tid=3840
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
# Problematic frame:
# C [SimTKsimbody.dll+0x53852]
#
# An error report file with more information is saved as hs_err_pid5864.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Deleted model default

User avatar
Kathleen Reilly
Posts: 30
Joined: Fri Jan 11, 2008 6:25 am

RE: Crash with model migrated to simbody eng.

Post by Kathleen Reilly » Wed Aug 20, 2008 12:08 pm

I've received numerous Access Violations that crash the JVM as well. If you trace through the log files that are output, you will see that there is an error in the native code written for OpenSim(probably C++?) It is likely there is a non-existent pointer being dereferenced (or a similar error).

Only registered developers of the project will be able to access this native source code and trace back to the exact point throwing this exception.

User avatar
Sam Hamner
Posts: 58
Joined: Tue Jun 26, 2007 5:03 pm

RE: Crash with model migrated to simbody eng.

Post by Sam Hamner » Fri Aug 22, 2008 9:13 am

Hi Simon,

Creating a new model is tricky, as the GUI may crash if the model format is not quite right. I have two suggestions.

(1) Did you try importing the SIMM model and changing the Dynamics Engine to Simbody? If that works you won't have to edit the model by hand.

(2) Could you post the model file online? Maybe then I (or someone on the OpenSim team) could take a look at the file and help you debug it.

Thanks,
Sam

User avatar
Simon Harrison
Posts: 19
Joined: Mon Oct 29, 2007 5:39 pm

RE: Crash with model migrated to simbody eng.

Post by Simon Harrison » Sun Aug 24, 2008 10:57 pm

ok - I have managed to overcome this problem by pasting my model properties into a model works, item by item.

The causes of crashes were:

1. The joint hierarchy was not directional, i.e. ground was attached to segment1, but the next joint specified "segment2 segment1" instead of "segment1 segment2". While this is not an issue for SimmKinematics engine, Simbody doesn't appear to handle this.

2. When I was pulling segments out of the model I left behind a generalised coordinate that was no longer referenced in the joint specifications.

Both of these issues cause the immediate crash of OpenSim

Hope this of assistance to others building from scratch :)

User avatar
Joseph Alston
Posts: 26
Joined: Tue May 13, 2008 9:51 am

RE: Crash with model migrated to simbody eng.

Post by Joseph Alston » Sat Aug 30, 2008 11:38 am

Hi Simon,

I'm also trying to build a model basically from scratch. How did you transform the model such that all rot2planar joint are in the xy plane?

Joseph

User avatar
Simon Harrison
Posts: 19
Joined: Mon Oct 29, 2007 5:39 pm

RE: Crash with model migrated to simbody eng.

Post by Simon Harrison » Sat Aug 30, 2008 5:15 pm

Joseph

I am working with an equine model, which approximates all joints of one limb as (near) hinge joints in the same plane. Therefore all joints with translations relating to the joint angle are in the same plane.

All of these joints were previously in the X-Z plane. To rotate into the X-Y plane, I rotated the bone geometry in paraview (www.paraview.org/). Then I transformed all muscle and joint parameters to suit.

Hope this helps :)

User avatar
Joseph Alston
Posts: 26
Joined: Tue May 13, 2008 9:51 am

RE: Crash with model migrated to simbody eng.

Post by Joseph Alston » Mon Sep 01, 2008 11:14 am

Simon,

That does help. Thank you.

Related to my prevision question, is it possible to have multiple joints move with the same coordinate? For example, with the more complicated Simm version of the lower body models the patella and the tibia moved together with the knee joint angle. Do you know if that is possible with the Simbody dynamics engine?

User avatar
Simon Harrison
Posts: 19
Joined: Mon Oct 29, 2007 5:39 pm

RE: Crash with model migrated to simbody eng.

Post by Simon Harrison » Mon Sep 01, 2008 5:28 pm

Joseph,

I had two separate joints that moved using the same generalised coordinate in my original model. This was fine with SimmKinematicsEngine, but would not work with SimBody.

Do you need to have the patella and tibia as different bodies? From the look of the example models, you can include more than one geometry in a single body if you orientate it correctly. Have a look at the definition of the pelvis or tibia in gait2392_simbody.osim. There is more than one .vtp file included in the <geometry_files> tag.

User avatar
Sam Hamner
Posts: 58
Joined: Tue Jun 26, 2007 5:03 pm

RE: Crash with model migrated to simbody eng.

Post by Sam Hamner » Tue Sep 02, 2008 3:09 pm

Hi Joseph & Simon,

Unfortunately Simbody does not support "constrained" joints (i.e., multiple joints move with the same coordinate). Currently, SimmKinematics handles these types of constrained joints, BUT SimmKinematics cannot be used to perform dynamics analysis (Inv Dynamics, RRA, CMC, Static Opt...).

Very soon, we will be releasing OpenSim 1.6. One of the new features will be the ability of SimBody to handle constrained joint. This will also make SimmKinemaitcs obsolete, so we will be dropping it in future versions of OpenSim.

Not exactly sure when 1.6 will be released to the public. We had a workshop here at Stanford last week where attendees used OpenSim 1.6, and there are still some things to iron out. But, there should be a release very soon.

Let me know if that answers your question.

Cheers,
Sam

POST REPLY