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

PolynomialFitter detects too many actuated coordinates when model kinematic chain is not standard #674

Open
tomvanwouwe1992 opened this issue Jun 6, 2024 · 3 comments

Comments

@tomvanwouwe1992
Copy link

Error:
File "C:\Users\tom_v\miniconda3\envs\BioToHydrow\lib\opensim\actuators.py", line 4802, in run
return _actuators.PolynomialPathFitter_run(self)
RuntimeError: std::exception in 'void OpenSim::PolynomialPathFitter::run()': The path '/forceset/addbrev_l' depends on more than 6 coordinates. This is not supported.
In Object '' of type PolynomialPathFitter.
Thrown at PolynomialPathFitter.cpp:830 in filterSampledData().
See minimal code to replicate error. When I change the model definition, pelvis as floating base and no kinematic constraints, it works well.
testFitting.zip

@nickbianco
Copy link
Member

When I change the model definition, pelvis as floating base and no kinematic constraints, it works well.

Did the original model not have a floating base? Though, my guess is that it has to do with the patella constraints, I think I've seen those lead to incorrect moment arms before.

You could try adjusting the moment arm threshold setting in PolynomialPathFitter as a temporary fix to ignore slighly non-zero moment arms that erroneously appear. That might be the best solution for now, fixing moment arm calculations with constraints would be a much deeper issue.

@tomvanwouwe1992
Copy link
Author

The model for which it does not work has a slider joint to connect a floating base to the ground. The toes are welded to this base and then the kinematic chain continues to the pelvis. The pelvis is also connected to this base (point on line constraint), closing the kinematic loop.
To perform the fitting process now, I just made a version of the same model with a more standard definition (6D pelvis as floating base and without kinematic constraints). This works well.

@nickbianco
Copy link
Member

Thanks for the clarification. I do think this is a deeper issue related to how moment arms are calculated in OpenSim.

By the way, all Moco development happens within the core OpenSim repo (https://github.com/opensim-org/opensim-core), so please post future issues there.

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