Forward Kinematics Calculation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kunpeng Yao
Posts: 3
Joined: Wed Apr 18, 2018 1:43 pm

Forward Kinematics Calculation

Post by Kunpeng Yao » Sat Nov 17, 2018 12:25 pm

Hello,

I am new to OpenSim & SimTK and I am trying to use osim model to simulate human movements.

I am confused by one simple problem: how to calculate the forward kinematics (FK) of the model, given joint angles? All I can find in the OpenSim/Simbody tutorial is how to calculate the inverse kinematics given measured force/torque as inputs. I suspect the calculation of FK should be simple and straight forward, but I have not found any related information in the tutorial.

BTW, does OpenSim provides any functions to extract kinematic chain of the osim model, or convert 'osim' file to other formats, such as 'urdf' or 'xacro'?

Many thanks!

Tags:

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

Re: Forward Kinematics Calculation

Post by Thomas Uchida » Sat Nov 17, 2018 7:49 pm

I am confused by one simple problem: how to calculate the forward kinematics (FK) of the model, given joint angles?
What are you trying to compute? I will assume you have joint angles and want to compute marker locations. To do that, you can write a script (e.g., in MATLAB or Python) to step through your data, posing the model and extracting the marker locations at each time step.

User avatar
Kunpeng Yao
Posts: 3
Joined: Wed Apr 18, 2018 1:43 pm

Re: Forward Kinematics Calculation

Post by Kunpeng Yao » Sun Nov 18, 2018 4:12 am

Thanks for the reply. In fact, I want to compute the position and orientation (6D coordinates) of each link (center of mass position) of the model, rather than marker locations, given joint angles.
Indeed, stepping through the code will do the work, but I am just wondering if there is a built-in function of OpenSim to access the real-time position and orientation of each link? Thanks.

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

Re: Forward Kinematics Calculation

Post by Thomas Uchida » Sun Nov 18, 2018 11:31 am

I want to compute the position and orientation (6D coordinates) of each link (center of mass position) of the model
You could prescribe the motion of each joint and use the Analyze Tool with a BodyKinematics analysis (https://simtk-confluence.stanford.edu/d ... h+Analyses), or you could write a script to step through your data, posing the model and computing the desired quantities at each time step.
I am just wondering if there is a built-in function of OpenSim to access the real-time position and orientation of each link?
In OpenSim 3.3, you can use the SimbodyEngine class (https://simtk.org/api_docs/opensim/api_ ... ngine.html) to get the position and orientation of each Body once the Model has been posed.

User avatar
Kunpeng Yao
Posts: 3
Joined: Wed Apr 18, 2018 1:43 pm

Re: Forward Kinematics Calculation

Post by Kunpeng Yao » Mon Nov 19, 2018 2:18 am

Thanks a lot! I think this is what I need. :D

POST REPLY