Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What do exactly getPrincipalMomentsOfInertia() gives?

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
478 Views, 3 Replies

What do exactly getPrincipalMomentsOfInertia() gives?

Anonymous
Not applicable

In short,

 

1. getPrincipalMomentsOfInertia() didn't work as I expected. So what exactly it returns?

2. I have a model with "moments of inertia atcenter of mass" with ixy, izy, ixz != 0 (or saying far away). Is it a normal case? I thought it should be a diagonalized matrix.

 

----


I was working on grabbing diagonalize moments of inertia from the models, saying I want the diagonalized form of the MOI, getting ixx, iyy, izz with all other elements (ixy, iyz, ixz) equals to 0

 

The Properties UI will display MOI_world and MOI_CoM (Center of Mass), and I can export these two information by using getXYZMomentsOfInertia(), and calculating MOI_CoM from getXYZMomentsOfInertia and physicalProperties.centerOfMass().

 

However, sometimes the CoM is magically not have ixy, iyz, ixz equals to 0 when my model is complex. And the value not looks like caused by numerical error and it is relatively not small enough to close to 0.

 

And then I try to explore getPrincipalMomentsOfInertia(). At first from the description I think it will give the ixx, iyy, izz I want but it does not. And I am also not sure what exactly these values are.

 

# Get the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.
(retVal,i1,i2,i3) = physicalProperties.getPrincipalMomentsOfInertia()

 

Here is an example with a Ball, Ring and Cylinder. Theoratically the Ball should have the diagonalize MOI with same value as shown in List of moments of Inertia Wiki

MOI.PNG

 

MOI_CoM displayed in UI looks reasonable, but the value of getPrincipalMomentsOfInertia()  (In my document, it is the "MOI_principal", where I add another three 0.0 b.c. I thought it was the ixx,iyy,izz) is strange and I cannot tell what they are.

 

----

 

MoI about CoM with ixy, ixz, iyz != 0. (Sorry I cannot show you my model but only the Properties screenshot)

 

Is it a normal case?

 

moi000.PNG

 

It looks like a physical problem. Will I always get a diagonalized MoI about center of mass? I know MOI is diagnolized when it align with principal axes, but are they the same for the concept of "MoI at CoM"?

 

----

 

Notes:

dict_of_links["center_of_mass"]: Direct output from physicalProperties.centerOfMass

dict_of_links["inertia"] : The moment of inertia about center of mass. It is diplayed in UI but have no direct method to get this from API. I calculated it from the MOI about world frame and CoM.

dict_of_links["MOI_principal"]: Direct output from physicalProperties.getPrincipalMomentsOfInertia() and just add another three 0.0.

dict_of_links["radius_of_gyration"]: Direct output from physicalProperties.getRadiusOfGyration(). 

 


Ref
1. Get Physical Properties API Sample API Sample

2. PhysicalProperties.getPrincipalMomentsOfInertia Method 

0 Likes

What do exactly getPrincipalMomentsOfInertia() gives?

In short,

 

1. getPrincipalMomentsOfInertia() didn't work as I expected. So what exactly it returns?

2. I have a model with "moments of inertia atcenter of mass" with ixy, izy, ixz != 0 (or saying far away). Is it a normal case? I thought it should be a diagonalized matrix.

 

----


I was working on grabbing diagonalize moments of inertia from the models, saying I want the diagonalized form of the MOI, getting ixx, iyy, izz with all other elements (ixy, iyz, ixz) equals to 0

 

The Properties UI will display MOI_world and MOI_CoM (Center of Mass), and I can export these two information by using getXYZMomentsOfInertia(), and calculating MOI_CoM from getXYZMomentsOfInertia and physicalProperties.centerOfMass().

 

However, sometimes the CoM is magically not have ixy, iyz, ixz equals to 0 when my model is complex. And the value not looks like caused by numerical error and it is relatively not small enough to close to 0.

 

And then I try to explore getPrincipalMomentsOfInertia(). At first from the description I think it will give the ixx, iyy, izz I want but it does not. And I am also not sure what exactly these values are.

 

# Get the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.
(retVal,i1,i2,i3) = physicalProperties.getPrincipalMomentsOfInertia()

 

Here is an example with a Ball, Ring and Cylinder. Theoratically the Ball should have the diagonalize MOI with same value as shown in List of moments of Inertia Wiki

MOI.PNG

 

MOI_CoM displayed in UI looks reasonable, but the value of getPrincipalMomentsOfInertia()  (In my document, it is the "MOI_principal", where I add another three 0.0 b.c. I thought it was the ixx,iyy,izz) is strange and I cannot tell what they are.

 

----

 

MoI about CoM with ixy, ixz, iyz != 0. (Sorry I cannot show you my model but only the Properties screenshot)

 

Is it a normal case?

 

moi000.PNG

 

It looks like a physical problem. Will I always get a diagonalized MoI about center of mass? I know MOI is diagnolized when it align with principal axes, but are they the same for the concept of "MoI at CoM"?

 

----

 

Notes:

dict_of_links["center_of_mass"]: Direct output from physicalProperties.centerOfMass

dict_of_links["inertia"] : The moment of inertia about center of mass. It is diplayed in UI but have no direct method to get this from API. I calculated it from the MOI about world frame and CoM.

dict_of_links["MOI_principal"]: Direct output from physicalProperties.getPrincipalMomentsOfInertia() and just add another three 0.0.

dict_of_links["radius_of_gyration"]: Direct output from physicalProperties.getRadiusOfGyration(). 

 


Ref
1. Get Physical Properties API Sample API Sample

2. PhysicalProperties.getPrincipalMomentsOfInertia Method 

3 REPLIES 3
Message 2 of 4
kandennti
in reply to: Anonymous

kandennti
Mentor
Mentor

Hi yl1242.

 

I do not understand the contents, but here physicalProperties_var.getXYZMomentsOfInertia ()
Some people point out that the documentation for is incorrect.
(However, it is Japanese)

http://syuntoku14.hatenablog.com/entry/2018/09/24/085723 

 

(returnValue, xx, yy, zz, xy, yz, xz) = physicalProperties_var.getXYZMomentsOfInertia()

not

(returnValue, xx, yy, zz, xy, xz, yz) = physicalProperties_var.getXYZMomentsOfInertia()

Seems to be correct.

 

There may be these effects.

 

0 Likes

Hi yl1242.

 

I do not understand the contents, but here physicalProperties_var.getXYZMomentsOfInertia ()
Some people point out that the documentation for is incorrect.
(However, it is Japanese)

http://syuntoku14.hatenablog.com/entry/2018/09/24/085723 

 

(returnValue, xx, yy, zz, xy, yz, xz) = physicalProperties_var.getXYZMomentsOfInertia()

not

(returnValue, xx, yy, zz, xy, xz, yz) = physicalProperties_var.getXYZMomentsOfInertia()

Seems to be correct.

 

There may be these effects.

 

Message 3 of 4
Anonymous
in reply to: kandennti

Anonymous
Not applicable

Thank you for pointing that out 🙂

 

I am exactly working with syuntoku14's code. (https://github.com/syuntoku14/fusion2urdf)

I sent a pull request to his repo and thought it was a bug but looks like it's not after reading the post.

 

After testing, I think the issue you pointed out has already been fixed by Fusion.

 

So there should be some other staff happening here

0 Likes

Thank you for pointing that out 🙂

 

I am exactly working with syuntoku14's code. (https://github.com/syuntoku14/fusion2urdf)

I sent a pull request to his repo and thought it was a bug but looks like it's not after reading the post.

 

After testing, I think the issue you pointed out has already been fixed by Fusion.

 

So there should be some other staff happening here

Message 4 of 4
kandennti
in reply to: Anonymous

kandennti
Mentor
Mentor
0 Likes

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report