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

Custom spatial transform within model definition appears to block Radians --> Degrees conversion within GUI/IK #3936

Open
JoshCarter97 opened this issue Oct 9, 2024 · 2 comments
Assignees

Comments

@JoshCarter97
Copy link

Hi,

I believe we have found a bug whereby within a model file at the location:
jointset --> <joint_name> --> SpatialTransform --> <TransformAxis_name> --> LinearFunction

if the coefficients are not set to "1 0", but instead scaled in some way (i.e "0.2 0") then the range and coordinate values within the GUI (and also those output from inverse kinematics) remain in radians rather than being converted to degrees. This can become quite confusing as all other coordinate values are shown/output in degrees as expected, so it may not be immediately noticeable in your results if you are unaware of this behaviour.

This was discovered when using an adapted version of the below model, which has a custom coefficient within the "L5_S1_IVDjnt" joint and the "flex_extension" coordinate.
https://simtk.org/frs/?group_id=1021

We found that changing the custom coefficient value back to 1 resolved the conversion issue within the Coordinates tab of the GUI.

This was tested on version 4.5 and can be recreated by changing the first coefficient value within a coordinates Spatial Transform Linear Function in a text editor, save the model file, load the model file back into the GUI, go to the coordinates tab and check if the range current position of those values remain in radians.

@nickbianco
Copy link
Member

Hi @JoshCarter97, is this issue limited to GUI output? If so, this issue might be more appropriate at https://github.com/opensim-org/opensim-gui. If not, could you provide a minimum working example?

@JoshCarter97
Copy link
Author

Hi @nickbianco,
I just checked this and the missing conversion step does seem to happen regardless of whether you are calling the Inverse Kinematics Tool within the GUI or via the API (Python in my case).

I have added a working example below, where I think regardless of the effect that the SpatialTransform has on the joint angles the output is in Radians rather than Degrees.

SpatialTransformOutputUnits.zip

@nickbianco nickbianco self-assigned this Nov 4, 2024
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