Can't import .osim model saved from python - "connectee_name"
Posted: Tue Oct 16, 2018 1:01 pm
Hi,
I am trying to batch analyze data using scale, IK, and ID. I am working in python to do this.
To test things out, I am trying to save interim results and open them in the GUI. However, I am unable to open the .osim files that were saved from the gui. I get the error:
It seems that the problem in the .osim file has to do with identifying parent and child frames in a joint. In particular, when writing the tag for the sockets, they do not contain the suffix "_connectee_name".
For example, if I export a .osim file from the GUI and we look at the pelvis definition, I get:
On the 5th line, we have '<socket_parent_frame_connectee_name>' . However, for the file exported from python, using model.printToXML('fileName.osim') I get:
Again, on the 5th line, you can see that it says `<socket_parent_frame>`, and doesnt have the suffix. I played around a bit to see which of the differences between the files seemed to be causing the error, and it is the lack of _connectee_name. If I add that to the parent and child tags it will now give an import error on the next joint in the file.
Is this a known issue? Is there something I might be doing wrong?
Thanks,
Anthony.
I am trying to batch analyze data using scale, IK, and ID. I am working in python to do this.
To test things out, I am trying to save interim results and open them in the GUI. However, I am unable to open the .osim files that were saved from the gui. I get the error:
Code: Select all
Failed to connect Socket 'child_frame' of type PhysicalFrame (details:
Model'LaiArnold2017_refined'::findComponent() cannot find a nameless subcomponent.).
In Object 'ground_pelvis' of type CustomJoint.
Thrown at Component.cpp:287 in finalizeConnections().
For example, if I export a .osim file from the GUI and we look at the pelvis definition, I get:
Code: Select all
<JointSet>
<objects>
<CustomJoint name="ground_pelvis">
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
<socket_parent_frame_connectee_name>../ground</socket_parent_frame_connectee_name>
<!--Path to a Component that satisfies the Socket 'child_frame' of type PhysicalFrame (description: The child frame for the joint.).-->
<socket_child_frame_connectee_name>../pelvis</socket_child_frame_connectee_name>
<!--List containing the generalized coordinates (q's) that parameterize this joint.-->
Code: Select all
<JointSet name="jointset">
<objects>
<CustomJoint name="ground_pelvis">
<!--Path to a Component that satisfies the Socket 'parent_frame' of type PhysicalFrame (description: The parent frame for the joint.).-->
<socket_parent_frame>../../ground</socket_parent_frame>
<!--Path to a Component that satisfies the Socket 'child_frame' of type PhysicalFrame (description: The child frame for the joint.).-->
<socket_child_frame>../../bodyset/pelvis</socket_child_frame>
<!--List containing the generalized coordinates (q's) that parameterize this joint.-->
Is this a known issue? Is there something I might be doing wrong?
Thanks,
Anthony.