-
Notifications
You must be signed in to change notification settings - Fork 323
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
Throw if passed in name or index of marker is invalid #3970
Conversation
@aymanhab thanks for looking into this. The code looks good, but I think I'm realizing there are some higher level questions to sort first (we can chat about this in person too if that's quicker too, but wanted to put my thoughts down here before I forget):
|
@carmichaelong I agree with your assessment overall. Just keep in mind that the solver is a low level class designed to be efficient use-at-your-own-risk type, while the tool is more the user facing abstraction. I'd move the methods that take an index to be private as indexing is into an internal container, and require clients to use names exclusively along with the method to get the name of marker/orientation for an index. Please let me know if that would be sufficient on balance. |
…s the internal container.
…opensim-org/opensim-core into robustify_iksolver_err_handling
Done @carmichaelong thanks for the quick turnaround and review. |
Thanks @aymanhab. Sorry one more other thing I should have mentioned: just adding the same tests that make sure all the updated methods properly throw would be helpful. |
ok, done @carmichaelong will wait for ci to finish, let me know if ready to go then. Thank you |
@carmichaelong ready to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @aymanhab
Thanks @carmichaelong 👍 |
Fixes issue #3951
Brief summary of changes
This was mainly an issue with trying to call methods on markers that are not in the intersection of model markers and those in the trc file. Code innocently assumed names passed in to be valid. Now throw exceptions and test case beefed up accordingly.
Testing I've completed
Looking for feedback on...
CHANGELOG.md (choose one)
This change is