Jump to content

  • Log In with Google      Sign In   
  • Create Account


Need Help With Inertial tensor


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 ScanCrowRadio   Members   -  Reputation: 109

Like
0Likes
Like

Posted 07 January 2014 - 08:07 PM

HI! Im currently working with Navidia PhysX. I resently encxountered a problem. Im trying to calculate the torque I need to apply to rotetate a Rigidbody between two rotations, over a set time. I find the difference between a target quaternion, and the RigidBody's current rotation, then I convert this into a euler rotation, and multiply by the diagonal of the RigidBody's Inertial tensor. I then convert this into Axis Angle form, and plug it into RigidBody.addTorque(vector). The results im getting from this are incorrect.

MY PROBLEM: The inertial tensor is in body space while the target rotation, and RigidBody rotation are in global space (the addTorque(vector) function also takes a axis angle rotation that is in global space). How do I over come this? Do I need to convert my varables somehow?



Sponsor:

#2 Doublefris   Members   -  Reputation: 297

Like
0Likes
Like

Posted 08 January 2014 - 03:39 AM

If the tensor is a vector or matrix, you could multiply with the inverse transformation matrix of the body you are talking about. This should transform it from body to world space. This works because 

 

A * A^-1 = I 

where A is a matrix.

 

In other words, it's like dividing by itself to get to 1(identity). This has the effect of 'undoing' any transformation and what is left is in 'world' space.


Edited by Doublefris, 08 January 2014 - 03:43 AM.


#3 Doublefris   Members   -  Reputation: 297

Like
0Likes
Like

Posted 08 January 2014 - 03:41 AM

Also, I don't think you need to convert to euler angles, just convert your quaternion to an axis-angle or get it directly. Then you should transform this axis vector by the inverse matrix like I described in the previous post.



#4 Doublefris   Members   -  Reputation: 297

Like
0Likes
Like

Posted 08 January 2014 - 04:28 AM

Also, if you are working with quaternions, the inverse of a unit quaternion is it's conjugate.



#5 jjd   Crossbones+   -  Reputation: 2062

Like
0Likes
Like

Posted 08 January 2014 - 08:09 AM

HI! Im currently working with Navidia PhysX. I resently encxountered a problem. Im trying to calculate the torque I need to apply to rotetate a Rigidbody between two rotations, over a set time. I find the difference between a target quaternion, and the RigidBody's current rotation, then I convert this into a euler rotation, and multiply by the diagonal of the RigidBody's Inertial tensor. I then convert this into Axis Angle form, and plug it into RigidBody.addTorque(vector). The results im getting from this are incorrect.

MY PROBLEM: The inertial tensor is in body space while the target rotation, and RigidBody rotation are in global space (the addTorque(vector) function also takes a axis angle rotation that is in global space). How do I over come this? Do I need to convert my varables somehow?

 

The inertia tensor is not a transformation; it is a property that is related to the distribution of mass about a point. Typically, the inertia tensor is defined about the center-of-mass of a rigid body. If you are trying to rotate about another point then you need to use a different inertia tensor. Fortunately, there is an easy way to do that. The transform, if it needs to be done, should be to apply the torque in the body space.

 

-Josh


--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet


#6 ScanCrowRadio   Members   -  Reputation: 109

Like
0Likes
Like

Posted 26 January 2014 - 02:16 PM

none of these worked for me sorry.



#7 Burnt_Fyr   Members   -  Reputation: 1190

Like
0Likes
Like

Posted 21 February 2014 - 03:49 PM

Seems to me that you just need to use a few matrices to convert back and forth. Your difference quaternion changes an object from it's local orientation to the target one. What space do you think it's in? what space is the inertial tensor in? and finally what space does your torque vector need to be in? Answer these questions and you should have what you need.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS