Repository navigation
Independent closed-form verification of Drake's dynamics across three mechanism families #24975
Replies: 7 comments 5 replies
|
@GuiloScion thank you for doing this! Regarding the slider-crank, it is true that constraints are not supported with our OG integrators over the continuous model. However, we do have a newer integrator, CENIC, which does support constraints in continuous models. It is still in development, but may already have sufficient support for your tests. Please let us know which version of Drake you are using. Then I believe Rico Poyner @rpoyner-tri can tell you what level of CENIC support is in that version. |
|
The one piece you may need that is not yet added is constraint-aware reporting of reaction forces. This is tracked by #24061. |
|
Following up on the slider–crank. On Drake 1.56.0, a continuous-time MultibodyPlant carrying a distance constraint refuses EvalTimeDerivatives with "Continuous time does not support constraints," the same both rigid and compliant. On a discrete plant the constraint is accepted but EvalTimeDerivatives returns an empty vector. I suspect I'm probing the wrong interface. Is constrained continuous support under CENIC reached by stepping a Simulator rather than by evaluating derivatives? And is there any path that exposes accelerations for a constrained continuous model? My adjudication compares accelerations against a closed-form reference, so if no right-hand side is available for that configuration, that's a limitation of my design rather than of Drake, and I'd like to state it correctly in the paper. |
|
CENIC is an odd beast. Rather than using EvalTimeDerivatives, like all of the other integrators, it gets (read-only) access to the plant, builds its own model, and (re)implements DoStep() itself. Currently, the right answers it gives are positions and velocities resulting from simulator steps. As for accelerations, I'm not entirely sure if correct accelerations are implemented. I suspect that may be wrapped up in #24601. Tagging @sherm1 to double-check me here. |
|
FWIW, you may find reading the open CENIC issues and project board of interest: CENIC (view) |
|
That settles it, thank you, and thank you for the detail. So the position for my study is that constrained continuous dynamics are reachable in 1.56.0, but only through an integrator that reimplements stepping rather than exposing a derivative, and the acceleration port doesn't reflect what CENIC actually solved until #24061 lands. My adjudication compares accelerations against a closed-form reference, so there's no acceleration field available for that family regardless of integrator. That's a limitation of my design meeting a design decision in CENIC, not a defect in either, and I'll state it that way in the paper rather than the vaguer wording I had. Useful to know that CenicIntegrator can be stepped alone for a purely continuous system, that's the right shape for a future comparison adjudicated on positions and velocities instead, which would be a separate study with its own protocol. I'll read through the open CENIC issues and the project board. Thanks again to you all. |
|
Hello, I have submitted the paper to the Journal of Systems and Software (JSS). I am writing to thank you all for your time and effort; your feedback has been invaluable to the development of the manuscript. I have ensured that CENIC's limitations, our discussion, and the issues you highlighted are all accurately reflected and cited in the final paper. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have completed an independent verification study that includes Drake, and I am posting the results here because they may be of interest to maintainers, and because I have one question about a limitation that may be mine rather than the library's.
Drake 1.56.0 was adjudicated against a closed-form reference derived by hand and implemented in NumPy alone, sharing no derivation code, symbolic algebra system or code-generation backend with it. Three mechanism families were used — a planar N-link chain, a slider–crank, and a cart–pole — with a 55-case matrix frozen before measurement, and integration pinned to DOP853 at identical tolerances for every engine compared.
Drake agrees with the reference on every adjudicated case. Residuals run from 6×10⁻¹⁵ at three links to 6×10⁻¹¹ at thirty, growing with N as expected of a recursive articulated-body algorithm measured against a direct closed-form solve, and remaining orders of magnitude inside the 10⁻⁸ adjudication tolerance throughout. On the cart–pole the ordering reverses and Drake returns the smallest residuals of the three engines, at order 10⁻¹⁶. Cost is flat at roughly 0.2–0.3 s from 40 to 80 coordinates, against symbolic engines growing as approximately O(N³).
My question concerns the slider–crank. I found that constrained dynamics are enforced within the discrete solver and are not available through the continuous-time interface I used elsewhere, so Drake could not share the pinned integrator on that family and was scored on constraint satisfaction alone. I would be glad to know whether that is correct or whether I missed an interface.
Data, reference implementations, adapters and raw records: doi:10.5281/zenodo.22315172
All reactions