Convert Solidwork's center of mass to OpenSim's center of mass

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
junkai chen
Posts: 2
Joined: Mon Sep 26, 2022 11:58 pm

Convert Solidwork's center of mass to OpenSim's center of mass

Post by junkai chen » Mon Dec 19, 2022 8:35 pm

Hi,

I am working on adding an object in my OpenSim Model. To do so, I am defining the body of that object in OpenSim Model. I also have the object's model in Solidwork that provides the object's center of mass and moment of inertia. I intend to use these parameters to help me define the object's body in OpenSim. But Solidwork's center of mass is based on another coordinate frame.

Is there a way for me to convert the center of mass in Solidwork's coordinate frame to the one required in OpenSim? Thank you.

Best,
Junkai

Tags:

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: Convert Solidwork's center of mass to OpenSim's center of mass

Post by Carmichael Ong » Mon Jan 23, 2023 2:27 pm

I'm not aware of tools that will directly help convert between Solidworks and OpenSim (if there are any users around that are doing this and would be willing to share, that would be great!)

There are some methods in the OpenSim's Frame class that could be helpful. In particular:
findTransformBetween()
expressVectorInAnotherFrame()
findStationLocationInAnotherFrame()

Using a PhysicalOffsetFrame may also help to define the Solidworks frame within the same OpenSim Body.

POST REPLY