All that changes for me is, instead giving acceleration to joint motors, i give my accelerations to the general solver.
you still give the joint motors accelerations and torque limits, the difference is that now we have a tool that calculate them for us using the physics system. Again, an IK systm could get the same results, but IK deal with kinematic giving you real displacement and from that you need to get the accelerations, The immediate solver uses the system internal derivatives to get that accelerating to achieve a goal. the physics has some advantage and disadvantages.
one advantage is that the solution considers momentum, this is important when over and under constrained systems.
few huge disadvantages are: is more expensive, is harder to use, it can be more unstable.
I tried the IK and I found it not attractive, but I also accept that it was my bias.
JoeJ wrote:But how do we handle torque limits, or min/max friction as you called it in your joints?
all the information is provided, class ndJointBilateralConstraint
has these functions.
ndVector GetForceBody0() const;
ndVector GetTorqueBody0() const;
ndVector GetForceBody1() const;
ndVector GetTorqueBody1() const;
say you have a motor that can only deliver a max torque.
you read the torque applied by that joint, and you check again the joint limit.
it does far more than just setting the limit, when you have a motor that is spinning, the torque is a measure of the maximum that can excerpt on a load until it reaches nominal speed.
but once it reached that speed, them not torque is applied.
What we do is, we set the torque limit the solver gives you as the actual max toque been applied by the motor.
if it was a simulation of an actual physical model, that value can be used to set the motor actual input, voltage or a gas. In fact, I use that trick to model an internal combustion engine for the vehicle.
later when we have the full model. I will place objects in the scene for the robot to pick up.
objects will have different weights so that the robot picking objects that do not break any internal motor limit and will struggle with heavy objects.