Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
-
Yanran Jiang
- Posts: 10
- Joined: Sun Feb 09, 2020 11:48 pm
Post
by Yanran Jiang » Tue Jul 21, 2020 2:30 am
Hi there,
In the Analyse tool, the setup file of Body kinematics shows we can decide to express the result in global or body local frame. But when I found at the top of result file, it always write"Angular velocities and accelerations are given about the body-local axes." whether at global file or bodylocal file. I want to confirm does angular velocity expressed in global coordinates when I choose to express results in global frame?
<BodyKinematics name="BodyKinematics">
<!--Flag (true or false) specifying whether on. True by default.-->
<on>true</on>
<!--Start time.-->
<start_time>0</start_time>
<!--End time.-->
<end_time>248.34</end_time>
<!--Specifies how often to store results during a simulation. More specifically, the interval (a positive integer) specifies how many successful integration steps should be taken before results are recorded again.-->
<step_interval>1</step_interval>
<!--Flag (true or false) indicating whether the results are in degrees or not.-->
<in_degrees>false</in_degrees>
<!--Names of bodies to record kinematics for. Use 'all' to record all bodies. The special name 'center_of_mass' refers to the combined center of mass.-->
<bodies> all</bodies>
<!--Flag (true or false) indicating whether to express results in the global frame or local-frames of the bodies. Body positions and center of mass results are always given in the global frame. This flag is set to false by default.-->
<express_results_in_body_local_frame>true</express_results_in_body_local_frame>
</BodyKinematics>
-
Attachments
-
![MU00166960.png](./download/file.php?id=4066&sid=909b1000aea4a7237865a1d9c6e2e202)
- MU00166960.png (227.16 KiB) Viewed 846 times
Tags:
-
Carmichael Ong
- Posts: 381
- Joined: Fri Feb 24, 2012 11:50 am
Post
by Carmichael Ong » Wed Jul 22, 2020 10:10 am
I believe that the result should be in global coordinates when chosen to express in the global frame. The code in BodyKinematics relevant to this can be found here (L501-505):
https://github.com/opensim-org/opensim- ... s.cpp#L501
Looks like the code first calculates in the global (ground) frame, and then converts to the local frame if the property "express_results_in_body_local_frame" is True.
-
Yanran Jiang
- Posts: 10
- Joined: Sun Feb 09, 2020 11:48 pm
Post
by Yanran Jiang » Sun Jul 26, 2020 7:25 am
Hi carmichael,
Thank you so much for your answer. Do you know how opensim convert global angular velocity/acceleration to local angular velocity/acceleration? I didn't find the exact formula and code there.w(in local)=R*w(global) and obtain R from the the orientation of the segment with respect to the global frame. Is it the right way?
Much thanks,
Yanran
-
Attachments
-
![Euler+Angles+to+Matrix+Conversion.jpg](./download/file.php?id=4082&sid=909b1000aea4a7237865a1d9c6e2e202)
- Euler+Angles+to+Matrix+Conversion.jpg (65.47 KiB) Viewed 729 times
-
Yanran Jiang
- Posts: 10
- Joined: Sun Feb 09, 2020 11:48 pm
Post
by Yanran Jiang » Tue Jul 28, 2020 5:30 am
Hi Carmichael,
Thank you so much! That's what I want and really helpful. In the Analyze tool, orientation of body segment in BodyKinmatic is with respect to the global frame and it represents the orientation of COM of each body segment. Since I want to convert IMU data in Xsens MVN file to be expressed in OpenSim coordinates. Do you know could we have orientation of origin (not COM) of body segment wrt to the global frame?
Any help will be appreciated.
Thanks,
Yanran
-
Carmichael Ong
- Posts: 381
- Joined: Fri Feb 24, 2012 11:50 am
Post
by Carmichael Ong » Mon Aug 03, 2020 10:18 am
To the best of my knowledge, Simbody and OpenSim do not attribute an "orientation" to a Point. Orientations should only be attributed to Frame's or Body's, so I'm not sure what the difference between an orientation of two different points should be.
-
Junwei Sun
- Posts: 12
- Joined: Mon Mar 14, 2022 11:05 am
Post
by Junwei Sun » Thu Jun 16, 2022 12:39 pm
Can someone please confirm if the w(in local)=R*w(global) solution is correct?
yanran wrote: ↑Sun Jul 26, 2020 7:25 am
Hi carmichael,
Thank you so much for your answer. Do you know how opensim convert global angular velocity/acceleration to local angular velocity/acceleration? I didn't find the exact formula and code there.w(in local)=R*w(global) and obtain R from the the orientation of the segment with respect to the global frame. Is it the right way?
Much thanks,
Yanran