ComputationalBiomechanicsLab / opensim-creator

A UI for building OpenSim models
https://opensimcreator.com
Apache License 2.0
141 stars 17 forks source link

Can't get motion to load to model #746

Closed Kristofferson777 closed 1 year ago

Kristofferson777 commented 1 year ago

Hello, I'm quite new to opensim creator and I'm having a lot of trouble getting my .mot(s) to load into either opensim or opensim creator. I'm making my own custom model for opensim and I'm not having any trouble importing .stl(s) and rigging them with bodies, joints, stations, and muscles. My problem comes into loading the motions. When I do so in opensim it tells me it could not associate the motion with the model. When I try to load the motion into opensim creator I get the following error:

[warning] the provided STO file is missing the following columns: /jointset/UlnoHumoral_Joint/UlnoHumoral_Joint_rz/value, /jointset/UlnoHumoral_Joint/UlnoHumoral_Joint_rz/speed, /jointset/Right_Radius_B_to_Right_Ulna_B/Right_Radius_B_to_Right_Ulna_B_rz/value, /jointset/Right_Radius_B_to_Right_Ulna_B/Right_Radius_B_to_Right_Ulna_B_rz/speed [warning] The STO file was loaded successfully, but beware: the missing state variables have been defaulted in order for this to work [warning] Therefore, do not treat the motion you are seeing as a 'true' representation of something: some state data was 'made up' to make the motion viewable

I was hoping you could link me to a video or let me know how I might be able to properly get the motion to apply to the model. If you need to contact via email or phone let me know and I can give you that information. Below I have my .mot and .trc files and the c3d file they originally came from. This data come from a vicon, full body, gait cycle study I performed on a subject. opensim data.zip

Thank you for your time.

adamkewley commented 1 year ago

Hi @Kristofferson777

Apologies for the late reply, I'm currently away on holiday so I can't respond or investigate very much for the next two weeks or so.

As a quick look, I would guess that the file you're loading is missing a few columns. Both Opensim GUI and Opensim creator will have a problem with that, it's just that OSC tries to at least bodge some fake numbers in so that everything limps along (plus warning messages)

Usually, the columns are missing when (eg) loading an old motion file from some "base" model against a "new" (custom) model that has additional mobilities added to it (eg the thing that makes it "new" is that joints have been added to it). In that case, there's no way for Opensim or OSC to reasonably guess what the new mobilities' state variable values should be (they weren't computed in the original file)

You can see the columns in the file by viewing the file in a text editor. You'll likely see that the listed columns are missing :(

adamkewley commented 1 year ago

Closing because I'm assuming it's fine - reopen if not.