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

Upd os4.x #12

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Upd os4.x #12

wants to merge 8 commits into from

Conversation

modenaxe
Copy link
Owner

@modenaxe modenaxe commented May 6, 2021

@eravera @darios93
I have upgraded a bit the project:

  • created a neat function to replace body.getJoint() in OpenSim 4.0
  • made the tool compatible with both OpenSim 3.3 and 4.x
  • update the tests (OpenSim 4.0 gives slightly different results)
    Would you mind give it a run on your machine and confirm that everything works well before I merge on main?
    Thank you,
    Luca

@modenaxe
Copy link
Owner Author

@Dario93 thank you for the email, that was helpful! Could you give it another try with the new code I added?

@eravera
Copy link
Contributor

eravera commented May 11, 2021

Hi @modenaxe,

I'm sorry for the delay but I needed to install MATLAB in my laptop again.

I can run without problem the new version of the scripts. I also note lite differences in results but they are similar at differences presented in Python version. I think these differences could be due to algorithms used to solve the system Ax=b.

In addition, other difference between Python and Matlab version is in fval because I used mean squared error instead of sum of squared errors.

Emi

@modenaxe
Copy link
Owner Author

@eravera thank you - I feel bad I wasted your time and space drive reinstalling MATLAB!

You are right, I also noted a difference in the results from 4.0, which is why I modified the reference model for the tests.

I will double check one last time (getOpenSimVersion() is not very robust yet) and merge the pull request.

@modenaxe
Copy link
Owner Author

@eravera do you think the different objective function makes a large difference? (worth spending time on it?)

@eravera
Copy link
Contributor

eravera commented May 12, 2021

@modenaxe , don't worry, installing MATLAB was not a problem for me.
Regarding differences in solutions between python and MATLAB algorithms used to solve the optimization problem, I think that they are not representative and we are not worth spending time for this because they are less than 0.005%.

On the other hand, I think that we will have no problem between OpenSin versions in the python script due to the fact that I have generated functions to extract the joint's features reading the model.osim as xml file directly. However, of course, you feel free to tell me if you want me to change any of this.

@modenaxe modenaxe changed the title Upd os4 Upd os4.x May 13, 2021
@modenaxe
Copy link
Owner Author

@eravera that's a good solution. For the MATLAB version instead I have written a function getBodyJoint that replaced the old and deeply missed aBody.getJoint() function. I am mentioning it in case it's helpful for other projects.

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

Successfully merging this pull request may close these issues.

2 participants