Page 1 of 1

Joint definition issues when merging models

Posted: Fri Apr 05, 2019 10:47 am
by jdowlingmedley
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.

Re: Joint definition issues when merging models

Posted: Mon Apr 15, 2019 9:19 am
by jimmy
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?

Re: Joint definition issues when merging models

Posted: Mon Apr 15, 2019 12:05 pm
by jdowlingmedley
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?

Re: Joint definition issues when merging models

Posted: Tue Apr 16, 2019 6:46 am
by jimmy
Are you refering to some code that we distribute? Can you point me to this script that you are referring to?