How to convert relative transform to global transform ?
Posted: Mon Oct 13, 2014 4:03 pm
I am trying to use bullet to detect collision between two robotic arms with several degree of freedom.
I have setup a btCollisionWorld with btRigidBody for each part of my arms.
I want to update the position of each body according to the commands I receive from the pilot. From what I read, I should use the setWorldTransform() function to do so.
Unfortunately the commands I receive for my arms only contains the transform of each body in the coordinate frame of its parent body whereas setWorldTransform() uses global coordinates.
Is there an easy way to get my local transform into a global transform I can give to bullet ?
I saw that btTransform has a multiplication and a ' *= ' operator but I don't know if this is the right method to use and how should I use them ?
I have setup a btCollisionWorld with btRigidBody for each part of my arms.
I want to update the position of each body according to the commands I receive from the pilot. From what I read, I should use the setWorldTransform() function to do so.
Unfortunately the commands I receive for my arms only contains the transform of each body in the coordinate frame of its parent body whereas setWorldTransform() uses global coordinates.
Is there an easy way to get my local transform into a global transform I can give to bullet ?
I saw that btTransform has a multiplication and a ' *= ' operator but I don't know if this is the right method to use and how should I use them ?