Joint definition issues when merging models

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jennifer Dowling-Medley
Posts: 4
Joined: Wed Sep 30, 2015 10:41 am

Joint definition issues when merging models

Post by Jennifer Dowling-Medley » Fri Apr 05, 2019 10:47 am

I am attempting to combine add an accessory (a box) to an existing .osim model using Python, but receive the following error message:

RuntimeError: std::exception in 'SimTK::State & OpenSim::Model::initSystem()': Failed to connect Socket 'parent' of type PhysicalFrame (details: Component 'Wu_G' could not find '/jointset/ground_box/ground' of type PhysicalFrame. Make sure a component exists at this path and that it is of the correct type.
Thrown at Component.h:764 in getComponent().).
In Object 'ground_offset' of type PhysicalOffsetFrame.
Thrown at Component.cpp:312 in finalizeConnections().


Both models were created in OpenSim 4.0, and as far as I can tell from the XML files, there are no differences in the way in which the joints are defined between the two models. I am able to open the models individually in the GUI, as well a manually merged version of the models without any issues. The issue seems to be with the box model, as I am able to combine an older version of this model in which the joints were defined without the use of offsets.

Any suggestions as to why this might be? I have attached the .osim file for the box model that is proving to be problematic.
Attachments
box_expertsnovices.osim
(28.58 KiB) Downloaded 32 times

Tags:

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

Re: Joint definition issues when merging models

Post by jimmy d » Mon Apr 15, 2019 9:19 am

I was able to download and open your model in OpenSim 4.0 with no error messages-- are you sure you are using the most up-to-date version of OpenSim 4.0, not one of the Beta releases?

User avatar
Jennifer Dowling-Medley
Posts: 4
Joined: Wed Sep 30, 2015 10:41 am

Re: Joint definition issues when merging models

Post by Jennifer Dowling-Medley » Mon Apr 15, 2019 12:05 pm

Thanks for your response. I am definitely using OpenSim 4.0.

The issue seems to be within the Python script itself - the box opens in the GUI by itself, and if I do a manual merge (copy and paste relevant bodies, joints, markers into my main .osim), the merged model opens without problems as well. From there, everything function correctly when run from either Python or the GUI.

Since the manual merge workaround was able to solve my problem, this is perhaps not so critical for me personally anymore. However, not being able to use the merge (add model) function within the Python code might be something other users come across?

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

Re: Joint definition issues when merging models

Post by jimmy d » Tue Apr 16, 2019 6:46 am

Are you refering to some code that we distribute? Can you point me to this script that you are referring to?

POST REPLY