Coordinate values showing in radian

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
聂 倩文
Posts: 11
Joined: Tue Oct 30, 2018 4:21 am

Coordinate values showing in radian

Post by 聂 倩文 » Fri May 10, 2019 12:33 am

Hello everyone,
I am a opensim freshman. I have a question to ask you. In my GUI, some joint coordinate values are showing in degree, while the two ones are showing in radian. I browse the osim. But I don't found the difference between them in terms of BodySet. I pasted a screenshot in the attachment.Who can tell me how to change the situation? Thanks all!

Best wishes!
Qianwen Nie

User avatar
Thomas Uchida
Posts: 1792
Joined: Wed May 16, 2012 11:40 am

Re: Coordinate values showing in radian

Post by Thomas Uchida » Fri May 10, 2019 5:48 am

It would be very helpful to know which model you are referring to and which version of OpenSim you are using. In general, I would expect to see a difference in how these coordinates are defined. If a coordinate is not purely rotational, then its displacement may not be displayed in degrees.

User avatar
聂 倩文
Posts: 11
Joined: Tue Oct 30, 2018 4:21 am

Re: Coordinate values showing in radian

Post by 聂 倩文 » Sat Nov 09, 2019 6:08 am

Hello,
I have encountered this problem recently and would like to ask you. I am using opensim 4.0. In the model definition, the left and right leg joints are defined exactly the same. However, in the GUI and IK results, the left and right displays are inconsistent, such as knee and hip joint coordinates, some in degrees, and some in radians. Mainly the IK output format is different, and the ID results will be different. So I want to find a solution so that I don't need to manually change the IK results to get the correct ID results.
The next two figures show the problem, with the attached model, data, and control files (Ps: Motion files are changed from .trc format to .mot format for uploading).
Thank you very much!
Image
Image
Attachments
motion.mot
(496.26 KiB) Downloaded 17 times
Setup_IK.xml
(12.56 KiB) Downloaded 40 times
nqw_simbody.osim
(582.04 KiB) Downloaded 60 times
IK.mot
(130.72 KiB) Downloaded 10 times

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Coordinate values showing in radian

Post by jimmy d » Sat Nov 09, 2019 6:07 pm

I would suggest there is something wrong with your model since I can't even open it in OpenSim 4.0
Screen Shot 2019-11-09 at 8.07.16 PM.png
Screen Shot 2019-11-09 at 8.07.16 PM.png (115.13 KiB) Viewed 625 times

User avatar
聂 倩文
Posts: 11
Joined: Tue Oct 30, 2018 4:21 am

Re: Coordinate values showing in radian

Post by 聂 倩文 » Sat Nov 09, 2019 7:59 pm

Hi,
I am very sorry that my model contains geometry that is not in the installation folder. I attached the required geometry below. You only need to put the extracted folder in the same folder as the .osim model, without having to put it in the geometry of the installation file.
https://github.com/wopt00/STS/blob/4fb2 ... p?raw=true
In addition, I found that the inverse dynamics result obtained from the coordinates expressed by the angle is hip_moment, and the ID result of the coordinates expressed in radians is hip_force.I want to know where the problem is and how to correct it.
Image

Thank you once again!
Qianwen Nie

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Coordinate values showing in radian

Post by jimmy d » Mon Nov 11, 2019 7:07 am

Missing Geometry is not the issue. There is rather large exception pop-up when trying to open the model you posted;
Screen Shot 2019-11-09 at 8.07.16 PM.png
Screen Shot 2019-11-09 at 8.07.16 PM.png (35.34 KiB) Viewed 592 times
If you are seeing coordinates being expressed as Radians it is most likely due to this change in 4.0;
The MotionType of a Coordinate is now fully determined by the Joint. The user cannot set the MotionType for a Coordinate. There are instances such as in the leg6dof9musc and Rajagopal2015 models, where a Coordinate was assigned an incorrect type (e.g. when a coordinate of a CustomJoint is not a measure of a Cartesian angle). In 4.0, the coordinate is correctly marked as Coupled since a function couples the coordinate value to the angular displacement of the patella in Cartesian space. NOTE, this causes issues (e.g. opensim-org/opensim-gui#617, #2088) when using kinematics files generated in 3.3 (or earlier) where Rotational coordinates have been converted to degrees. Because OpenSim 4.0 does not recognize the coordinate's MotionType to be Rotational it will not convert it back to radians internally. For motion files generated prior to 4.0 where the file has inDegrees=yes, please use the following conversion utility: updatePre40KinematicsFilesFor40MotionType(). When loading a pre-4.0 model, OpenSim will warn users of any changes in MotionType when updating an existing model to OpenSim 4.0.

POST REPLY