RobotLocomotion / drake

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

[multibody] Deny set_contact_surface_representation post-Finalize #21559

Closed jwnimmer-tri closed 2 weeks ago

jwnimmer-tri commented 3 weeks ago

Changing this value in the middle of a simulation fails to properly invalidate the contact surface cache entries. Rather than try to fix that (which would be extremely complicated), instead we fail-fast. The contact surface representation (triangle vs polygon) must now be configured pre-Finalize.

Towards #20545.

(I'm not using deprecation here because computing wrong answers is one of the better reasons to break users, and because we will not be able to support post-Finalize changes as we work on #20545. This function is never called from Anzu.)


This change is Reviewable

jwnimmer-tri commented 3 weeks ago

+@rpoyner-tri for feature review please, per follow-up from #16238. FYI @DamrongGuoy likewise.

FYI @amcastro-tri and/or @SeanCurtis-TRI you're welcome to add yourself as a second feature reviewer, if you like.