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

Issues encountered when teaching OpenSim 4.0 #1146

Closed
sebastianskejoe opened this issue Nov 6, 2019 · 8 comments
Closed

Issues encountered when teaching OpenSim 4.0 #1146

sebastianskejoe opened this issue Nov 6, 2019 · 8 comments
Labels
bug Tools UI for editing/creating setup files for tools

Comments

@sebastianskejoe
Copy link

Hi!

Every fall I'm teaching a course, where we use the OpenSim GUI to perform inverse dynamics of running. Until this year, we used OpenSim 3.3, but now we have switched to 4.0. 4.0 is a great improvement in some areas (for instance allowing Mac users to participate) but we have also encountered some issues that make the workflow feel clunky and confusing at times. I believe these issues are mostly unintended and I will be happy to help fixing them (some should be pretty straightforward to fix) but I will need some pointers as to where the relevant source code is located.

List of issues we have encountered:

  • Checkboxes doesn't work - at least in here:
    • Scale Model -> Static Pose Weights -> "Enabled" boxes doesn't change anything. If you wan't to disable a marker you must change the weight to 0.
    • Inverse Kinematics -> Weights -> "Enabled" boxes doesn't change anything - see above.
    • Inverse Dynamics -> External Loads -> Edit specification file -> Add/edit a force -> "Applies Force/Torque" doesn't change anything. The external load specification will contain the dropbox values no matter if the checkboxes are enabled or not.
  • Reading .trc-files will fail with no or uninformative errors.
    • Using files with comma as the decimal separator will crash the scale tool, when setting up measurements.
    • .trc-files using UTF-8 with a byte order mark (BOM; https://en.wikipedia.org/wiki/Byte_order_mark) will result in "[path] does not appear to be a valid TRC".
  • After running the scale tool, not all markers are moved. I had to move two markers manually afterwards. I'm happy to provide test-files that show the problem.
  • Once you have loaded a previously stored model, there is no way to immediately associate a .trc-file.
  • Inverse Dynamics tool outputs to a directory instead of a specific file (like the IK tool). This results in the ID results .sto being overwritten if not manually renamed before running the ID tool again.

Best regards
Sebastian Skejø

@tkuchida tkuchida added bug Tools UI for editing/creating setup files for tools labels Nov 6, 2019
@aymanhab
Copy link
Member

aymanhab commented Nov 6, 2019

Thanks @sebastianskejoe for reporting. It would be good to create separate issues so we can address them separately as some belong in GUI, some in API (opensim-core), and some could be platform dependent as well. We can do that for you. In the meantime:

  • Were you using Mac or Windows?
  • Are you using US Locale? (This forces numbers to use . rather than , for floating point). We always used that convention explicitly in the application and the API implicitly does as well.
  • Please attach the tutorial/instructions if possible so we can reproduce/troubleshoot.
  • If you can't workaround the issues for now (since I don't know your timeline for teaching) you can always use version 3.3 from the downloads page, though our priority will continue to be to fix issues in 4.0 as the active development code base.

@jimmyDunne are you aware of similar issues on the forum or in direct communication so we can prioritize?

@sebastianskejoe
Copy link
Author

Thank you for the quick reply! I intentionally avoided splitting the issues into separate issues as I'm not entirely sure, which issues belongs to which repos, so if you can split it up, it would be great. To answer your questions:

  1. The students are a 50/50 mix of Mac and Windows. However, I think all of the issues listed are independent of platform.
  2. No, most students are using Danish locales. So when they use C3DTOOLS to convert C3D-files to .trc and .mot files, the files will be outputted with comma as the decimal separator. The issue is not so much that OpenSim can't handle comma separator (although that would be nice), but more that it doesn't inform the user that commas are a problem and even worse that it crashes in the scale tool if commas are used.
  3. Unfortunately we don't have any written instructions. I have some tutorial videos for 3.3 that we use as supplementary material to the "monkey-see-monkey-do" style of teaching we use, but these videos are in Danish, so it probably won't help you very much :-)
  4. We are done teaching OpenSim for now, so we have worked around it.

@aymanhab
Copy link
Member

aymanhab commented Nov 6, 2019

No worries, we'll do the split up, then we can discuss for each issue how to reproduce, troubleshoot.

@jenhicks
Copy link
Member

jenhicks commented Nov 13, 2019

@sebastianskejoe

Thanks again for reporting these issues. I tried to reproduce the issues on my Mac build of OpenSim 4.0. I had a couple follow-up questions about a few of them:

Scale Model -> Static Pose Weights -> "Enabled" boxes doesn't change anything. If you wan't to disable a marker you must change the weight to 0.

I was not able to reproduce this one. For example, using the files distributed for the gait2354 workflow, if I uncheck the "enabled" box for the pelvis markers I get different results (with a poor match to the pelvis, as expected). Can you give us more details to reproduce?

Inverse Kinematics -> Weights -> "Enabled" boxes doesn't change anything - see above.

Same thing. Also using gait2354, if I uncheck the Enabled boxes for the pelvis markers I get different pelvis tracking. Can you provide more details to reproduce this problem?

After running the scale tool, not all markers are moved. I had to move two markers manually afterwards.
I'm happy to provide test-files that show the problem.

Can you provide these test files? Thanks!

Once you have loaded a previously stored model, there is no way to immediately associate a .trc-file.

To preview the trc data, you will first need to load an IK solution. Then you can associate the marker data with that IK solution. Without the IK solution, there is no information to pose the model (the IK step is what solves for those poses to get a good fit between model and experimental markers). Please let us know if this helps or if there is another issue you were experiencing.

@sebastianskejoe
Copy link
Author

Using the gait2354 files, I placed the model in a "weird" default pose and ran the provided scale setup. As expected I got (model in the front is the scaled model):
scale_weightenabled
Keeping checkboxes enabled, but setting the weights to 0 of all markers (except Sternum), I also get the expected result, which uses the "weird" pose:
scale_noweightenabled
I would also expect this result if the checkboxes were disabled. However, this is not the case for me, even if the weights are set to 0:
scale_noweightdisabled
scale_weightdisabled
This is on Windows, so maybe behaviour is different on Mac?

Testcase.zip
Here is a test case for the scaling of gait2354. After scaling virtual RTHIGHLATERAL and RSHANKSUPERIOR are not moved to the measured locations.

Thank you for the clarification on my last issue. I guess I can store the scaling result and load that before loading the .trc, which will work just fine.

@jenhicks
Copy link
Member

@aymanhab Can you take a look at the information provided in @sebastianskejoe latest comment?

@aymanhab
Copy link
Member

aymanhab commented Nov 22, 2019

The two offending markers are specified as Fixed in the markerset file, not sure what was the intention here. Changing the flag "Fixed" to false allows the markers to move exactly as expected. Please let us know if this can be closed @sebastianskejoe Testing was performed in 4.1 environment.

@sebastianskejoe
Copy link
Author

Ah, yes, not sure how that happened, but I the markerset was used previously, so maybe the handling of "fixed" changed from 3.3 to 4.0 and that was why I hadn't encountered that before? Anyway, not a problem and totally my fault.

The checkbox issues in scaling and inverse kinematics also seem to have been fixed somewhere between 4.0 and the current git, so I'll go ahead and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Tools UI for editing/creating setup files for tools
Projects
None yet
Development

No branches or pull requests

4 participants