why it doesn't match with the equations of Brian Mirtich in his PhD thesis? #3622
Replies: 12 comments
-
It is complicated indeed. Could you have a look at this PhD thesis, search for Coriolis and check out chapter 8.3.1B: http://delibra.bg.polsl.pl/Content/12190/J.Stepien-rozprawa-dr.pdf?handler=pdf The original implementation is here: It would be good to have a more clear/clean implementation of this indeed. |
Beta Was this translation helpful? Give feedback.
-
Also, the implementation changed from original Mirtich PhD thesis towards Featherstone 2008 book by Jakub Stephien. So checking up that chapter 8.3.1 that I pointed you to will be helpful anyway. We do have a unit test to round-trip Bullet inverse dynamics and forward dynamics, and they match well. See https://github.com/bulletphysics/bullet3/blob/master/test/InverseDynamics/test_invdyn_bullet.cpp
It would be very useful to re-implement it again, or hook up RBDL library and compare the input and ouput carefully for this forward dynamics ABA implementation. Someone did such comparison for the inverse dynamics implementation, and the difference is very small (although not totally zero, close to 1e-6 for 1 step). See #2246 Are you interested in helping with this? |
Beta Was this translation helpful? Give feedback.
-
thanks, it would be honour for me to accept this task. |
Beta Was this translation helpful? Give feedback.
-
i have finished the code, including:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for looking into this. If/when you got the comparison right, it would be nice to also re-implement only the computeAccelerationsArticulatedBodyAlgorithmMultiDof call using rbdl. It could be that the URDF loader or other parts of RBDL are different. It would involve some conversion between Bullet and RBDL/Eigen data structures. |
Beta Was this translation helpful? Give feedback.
-
i have finished this part and meanwhile also find the rootcause of the #2246, now the difference between them is less than the 1e-11, i will submit the codereview. after this, i will try to re-implement the computeAccelerationsArticulatedBodyAlgorithmMultiDof call using rbdl. |
Beta Was this translation helpful? Give feedback.
-
Were you able to map and/or derive computeAccelerationsArticulatedBodyAlgorithmMultiDof to the formulation described in Featherstone's book/Jakub's PhD thesis? |
Beta Was this translation helpful? Give feedback.
-
yes. i mainly refer to the Featherstone's book, the Table 7.1 for details of the ABA. the RBDL tightly follows the procedure of this book, so the code is more easily to be understood.
So do you still think it is necessary or important to re-implement the computeAccelerationsArticulatedBodyAlgorithmMultiDof? if not, i can help to investigate other issues. |
Beta Was this translation helpful? Give feedback.
-
It would be great to have some document going over the implementation line by line to compare RBDL and Bullet. Do you have time to work on such doc? Some sketches on paper helps too (like your previous writing in the beginning of this thread). Yes, it would still be helpful to re-implement the computeAccelerationsArticulatedBodyAlgorithmMultiDof in a much more readable way, similar to RBDL and Featherstone book. Preferably without requiring the RBDL library dependency. Thanks a lot for looking into all this! |
Beta Was this translation helpful? Give feedback.
-
OK, i will think about a easy and clear way to compare these two methods. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
attach the original excel also. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
these days i again read the function of computeAccelerationsArticulatedBodyAlgorithmMultiDof() and try to derive the result according to the process of this function, but find it doesn't match with the equations of Mirtich in his PhD thesis. i don't know if i made some mistake or the engine has its own other consideration that i don't know. hope someone can give me some explanation. thanks in advance.
Take the revolute for example, this is some code snippet.
`fromParent.transform(spatVel[parent + 1], spatVel[i + 1]); //step 1
spatJointVel.setZero()
for(int dof = 0; dof < m_links[i].m_dofCount; ++dof)
spatJointVel += m_links[i].m_axes[dof] * getJointVelMultiDof(i)[dof] //step 2
spatVel[i+1] += spatJointVel //step 3
spatVel[i+1].cross(spatJointVel, spatCoriolisAcc[i]) //step 4
zeroAccSpatFrc[i+1].addLinear(m_links[i].m_mass * spatVel[i+1].getAngular().cross(spatVel[i+1].getLinear())) //step 5`

derive these variables with this below
In my understanding, the Rw x (Rw x r) is the centripetal force and the 2Rw x (u x d)q' is the coriolis force(refer to the Definition 10 of Brian Mirtich's thesis). i have these several questions.
Beta Was this translation helpful? Give feedback.
All reactions