1
$\begingroup$

I want to implement a manipulator link using a physic library. I can only apply some torque to the centre of mass, but the torque should be applied at the beginning of the link.

Shifting a reference frame from the centre of mass and recalculating inertia tensor in the new frame is not a problem, neither is recalculating a new torque, based on the change of distance, but I think it is not the correct solution.

In short, how can I scale a torque of a control signal applied at the beginning of the link to a torque of a physic simulation applied to the centre of mass. Thanks.

$\endgroup$
  • $\begingroup$ Which physics library are you using that only allows torques applied at the COM? It is my experience that most physical simulators have some concept of joints, and allow torques at them. $\endgroup$ – Ben Jul 6 '14 at 13:46
  • $\begingroup$ Its bullet. Maybe i am mistaken, but to my knowledge there is no way to apply torque at an arbitrary point, not without hacking the source at least. Its possible yo create a compound object and shift a com of an added rigid body, but i am really not sure if its gonna do the trick. $\endgroup$ – andrey Jul 6 '14 at 17:10
1
$\begingroup$

Use the parallel axis theorem

$$ \tau=I\alpha \\ \alpha = \frac{\tau}{I} \\ I_{new} = I_{from.COM} + mr^2 $$ Assuming you want to keep the same acceleration as though you applied the torque at the center of mass, the new torque you need to apply to create the same angular acceleration from a different location is:

$$ \frac{\tau_{COM}}{I_{from.COM}} = \frac{\tau_{new}}{I_{new}} $$ $$ \tau_{new} = I_{new} \frac{\tau_{COM}}{I_{from.COM}} \\ \tau_{new} = (I_{from.COM} + mr^2)\frac{\tau_{COM}}{I_{from.COM}} $$

where $\tau_{COM}$ was the torque that had to be applied at the center of mass to get the desired angular acceleration, $I_{from.COM}$ is the moment of inertia through the center of mass, $m$ is the mass of the load, and $r$ is the distance from the center of mass to where you are now rotating the load.

$\endgroup$
0
$\begingroup$

From this page on Bullet's constraints (http://bulletphysics.org/mediawiki-1.5.8/index.php/Constraints), you can clearly create a hinge constraint that is not at the COM of the links it is attached to.

btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB,
                  const btVector3& pivotInA,
                  const btVector3& pivotInB,
                  btVector3& axisInA,
                  btVector3& axisInB,
                  bool useReferenceFrameA = false);

Once you set up a constraint like this, the bodies will pivot about this point (relative to each other). applying a torque to any location on one of the links will have the same affect.

$\endgroup$
0
$\begingroup$

I know how set up the constraint. I have it set up, have the control signal and it just do not behave as expected (though it also can be because of some mistake in my calculations). Constraining two bodies like this is just removing some dof to keep them at distance pivotInA, pivotInB and allow only for rotation about set axis. It does not dismiss the fact, that the inertia tensors is calculated for COM, not for the beginning of link. If you look at the methode applyForce (const btVector3 &force, const btVector3 &rel_pos) you can see that it is separated into

  applyCentralForce(force);

and
applyTorque(rel_pos.cross(force*m_linearFactor));

the offset is taken relative to the COM, you can not just apply a force relative to any other points but to the COM. So, the inertia tensor is wrong, force would be applied with a wrong shoulder, i doubt it is gonna produce the correct result.

$\endgroup$
-1
$\begingroup$

A moment applied to a rigid body does not matter where it is placed. (This simple fact is taught in the "Statics" class for freshmen mechanical engineers). Bullet does support joint constraints. So you only need apply the torque on one link relative to the previous link. Do not scale or transform the torque.

$\endgroup$
  • 1
    $\begingroup$ It is more about changing a pivot point. Picture this, on link has pivot point at the center of mass and another at the beginning. The torque has the meaning of applying some force relative to a pivot point (or an axis we chose to be a rotation axis and calculate the inertia tensor for this particular axis). Now we apply the same torque, say, the same force at the same distance from COM. Do you think its gonna have the same effect on both bodies? Bullet allows a rotation axis to go only through COM. There are some motors for constraints, but it is a kinematic thing, not dynamic. $\endgroup$ – andrey Jul 7 '14 at 4:12
  • $\begingroup$ "A torque applied to a rigid body does not matter where it is placed" I think it does. Applying torque at the center of a rigid body is not exactly like applying it at the edge of that body. Would you elaborate a bit? $\endgroup$ – CroCo Dec 2 '14 at 18:34
  • $\begingroup$ Do not confuse a force acting at a distance to create a torque, and a pure moment. Imagine a body floating in zero gravity. If you apply a moment at any point, the body will always rotate about its CoM. It may also translate though... But perhaps i should change the terminology in my post above. $\endgroup$ – Ben Dec 3 '14 at 1:50
  • $\begingroup$ -1 - He's asking about shifting the axis of rotation; this does matter; he needs the parallel axis theorem to update the moment of inertia tensor. If he wants a particular rotational acceleration, moving away from the center of mass increases the moment of inertia and thus increases the required torque. $\endgroup$ – Chuck Jun 1 '15 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.