RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.25k stars 1.26k forks source link

[multibody] Add unit test for derivatives on hydroelastic contact forces #15233

Open SeanCurtis-TRI opened 3 years ago

SeanCurtis-TRI commented 3 years ago

Resolving issue #14136 included all of the work on the geometry side to get derivatives in hydroelastic contact. It included a token effort to give evidence that the derivatives propagate through to the computed forces. However, the test is only indicative and needs to be made more robust.

See the comments in #15219 for details on how to formulate a more detailed test that fully considers the expected derivative values.

amcastro-tri commented 2 years ago

anything you think we'd need to test @SeanCurtis-TRI that #14963 does not cover? the traction calculator is covered in that PR. I do agree however that we do not seem to have an end-to-end unit test.

SeanCurtis-TRI commented 2 years ago

My best sense of this issue is that we should have confidence that the derivatives on the forces through hydroelastic contribution are "correct". The various tests on the geometry side:

All have test code that examines various ways in which inputs to these methods will have the expected impact on the derivatives on the output. As long as we have tests that show that the force evaluation (based on a given contact surface) has done the same, we should be content. If you feel the tests on the traction calculator achieve that, it's up to you.