jrl-umi3218 / RBDyn

RBDyn provides a set of classes and functions to model the dynamics of rigid body systems.
BSD 2-Clause "Simplified" License
163 stars 47 forks source link

Topic/integration #66

Closed aescande closed 2 years ago

aescande commented 5 years ago

This PR reworks the numerical integration for the non-trivial joints (planar, spherical and free):

This PR is not polished yet, but I'd like to have some general feedback first/while polishing. First of all the tests. I'm currently performing 4 types:

The last test is an attempt to ensure that the integration is coherent with the library as a whole, because it could be possible to misunderstand the conventions adopted in RBDyn and write a wrong integration that could however pass the 3 first tests. The idea of using the Jacobian matrix is to get quantities in the world frame, where there is no specific convention, from whatever the original spaces are for the joint variables and velocities/accelerations. If anyone has a better idea, I'd be happy to hear it. Something related is done in EulerTestV2 in AlgoTest, but quantites are brought back in some variable space, which makes the test dependent on conventions, and makes it actually wrong for planar and free joints (although because of the very low accuracy required, the planar test is still passing - but I had to disable the one for free joint). I believe this test should be removed completely.

Another point is that the estimation of the error is adding some overhead. I didn't measure it for now, as it is up to a few dozens of scalar additions/multiplications, but it could be equivalent to the integration computation in itself. Does it seems ok? Or do I add a flag/versions without any precision check?

The PR solves #35, without addressing #65 (I could not get an integration coherent with the Jacobian matrix when changing the convention for the planar joint, and I don't get where I'm making a mistake).

aescande commented 5 years ago

@gergondet : there does not seems to be a mechanism for deprecation in RBDyn yet. Do you have any guidelines on how to proceed? Here are a few options I see:

aescande commented 5 years ago

Baring feedbacks, I'm done with the code so far. Code review can start :)