Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Convert .mot to .gltf File #6

Open
yugzan opened this issue May 2, 2024 · 2 comments
Open

Unable to Convert .mot to .gltf File #6

yugzan opened this issue May 2, 2024 · 2 comments
Assignees

Comments

@yugzan
Copy link

yugzan commented May 2, 2024

I'm trying to use convertMotForce2Gltf.py to convert a .mot file to a .gltf file. However, when it executes timeSeriesTableVec3 = table.packVec3(), an issue arises:

Error -std::exception in 'OpenSim::TimeSeriesTable_< SimTK::Vec3 > OpenSim::TimeSeriesTable_< double >::packVec3()': Invalid Argument. Input DataTable must contain 3x number of columns. Thrown at DataTable.h:294 in DataTable_().

Is there an issue with the format of my .mot file? or any sample code can convert mot file to gltf

motfile01.mot

@aymanhab aymanhab self-assigned this May 2, 2024
@aymanhab
Copy link
Member

aymanhab commented May 2, 2024

The mot file you provided does not have ground reaction forces (as the name of the method suggests) instead it contains coordinate values. Coordinates mean nothing without an underlying model so can't be visualized as is. There's an interface to pass a model and a list of mot files to generate the gltf file. If that's what you're looking for please let me know. Sorry for the sparse documentation as this is still work in progress but definitely would appreciate your feedback, experience using it.

@yugzan
Copy link
Author

yugzan commented May 3, 2024

Thank you for your reply. I want to reproduce the functionality of animating a skeletons figure. I've trying to tests on converting TRC files (capturing several moving markers to GLTF) and OSIM files (displaying skeletons).

Therefore, based on what you mentioned, it seems I may require an interface that accepts OSIM files along with one or more MOT files. This way, I can obtain a GLTF file depicting the animated skeletons figure. Is this the right way?

============================================

Thank you. I think I've succeeded. I was able to pass the OSIM file and several MOT files into the gltf file using the viewport.py you provided.

9d7dd128-33be-4120-a139-a39a28dfb670.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants