RobotLocomotion / drake

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

Add GetFreeVariables() overload to Expression #22145

Closed RussTedrake closed 2 weeks ago

RussTedrake commented 2 weeks ago

We have Expression::GetVariables() and Formula::GetFreeVariables(). In #22091, we could see that this difference (which is mostly unnecessary) made the downstream code unnecessarily clunky. This simple overload resolves it.

+@cohnt for feature review, please.


This change is Reviewable

RussTedrake commented 2 weeks ago

+@sammy-tri for platform review, please.