Closed jwnimmer-tri closed 2 weeks ago
+@SeanCurtis-TRI curious to get your thoughts / review here. I did this as part of preparation for #20545, but I'd like to consider it on its own merits for now. Is this a readability / clarity improvement on its own? \CC @amcastro-tri @joemasterjohn also
(I think it might still end up being using for #20545, but without finishing my full branch of changes I'm not sure. I might need to totally rework how proximity properties are cached, which might end up deleting most all of the intra-plant and sap-driver call sites here.)
Given my recent progress on #20545 this will very likely be helpful -- so I'll revise my question from "should we do this?" to "any reason we shouldn't do this?".
Towards https://github.com/RobotLocomotion/drake/issues/20545.
Distinguishing between property changes (only) vs configuration or contact changes is important for performance and caching. Refactor the plant to only directly touch the query object when doing a configuration-dependent query. Use the new inspector sugar when only properties are being accessed.
Note that this does not change any input ports or add any cache entries, so no changes to cache dependency tickets are required.
This change is![Reviewable](https://reviewable.io/review_button.svg)