RobotLocomotion / drake

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

Add Generic Binding<Cost> and Binding<Constraint> to vertices and edges within a GcsTrajectoryOptimization::Subgraph #22179

Closed cohnt closed 3 days ago

cohnt commented 1 week ago

Towards #21981.

The use of templates gets a little messy, but allows a ton of code reuse. Note that in the test cases, we use solvers::internal::ParseCost and solvers::internal::ParseConstraint to convert Expression and Formula to Binding<Cost> and Binding<Constraint>, respectively.

+@Russtedrake for feature review, please! cc @wrangelvid


This change is Reviewable