-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python bindings for methods of GcsTrajectoryOptimization::Subgraph for adding generic costs and constraints. #22156
Python bindings for methods of GcsTrajectoryOptimization::Subgraph for adding generic costs and constraints. #22156
Conversation
Hi @cohnt, is this PR ready to be reviewed yet? (asking per https://drake.mit.edu/platform_reviewer_checklist.html) |
Yes, I need a feature reviewer. I asked in slack, but didn't get any responses yet. |
I see @sadraddini lurking in this PR. Would you like to review it? If not, I'll kick this PR to Russ to review/delegate per platform reviewer checklist. |
Per Jeremey's comment in the Drake Developers Slack, since this is just adding python bindings, we can send this directly to platform review. So @xuchenhan-tri for review, please! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: 2 unresolved discussions
bindings/pydrake/planning/planning_py_trajectory_optimization.cc
line 435 at r1 (raw file):
-> const MatrixX<symbolic::Variable> { return self.vertex_control_points(); },
What's the point of the const qualifier if we are returning a copy?
Ditto for the same pattern below.
Suggestion:
[](const GcsTrajectoryOptimization::Subgraph& self)
-> MatrixX<symbolic::Variable> {
return self.vertex_control_points();
},
bindings/pydrake/planning/test/trajectory_optimization_test.py
line 365 at r1 (raw file):
regions.AddEdgeCost(edge_cost) regions.AddEdgeConstraint(edge_constraint)
We should add some tests that exercises the keyword arguments (with and without the default arg).
…r adding generic costs and constraints.
466a636
to
544bd62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 unresolved discussions
bindings/pydrake/planning/planning_py_trajectory_optimization.cc
line 435 at r1 (raw file):
Previously, xuchenhan-tri wrote…
What's the point of the const qualifier if we are returning a copy?
Ditto for the same pattern below.
Done.
bindings/pydrake/planning/test/trajectory_optimization_test.py
line 365 at r1 (raw file):
Previously, xuchenhan-tri wrote…
We should add some tests that exercises the keyword arguments (with and without the default arg).
Like so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all discussions resolved, LGTM from assignee xuchenhan-tri(platform)
bindings/pydrake/planning/test/trajectory_optimization_test.py
line 365 at r1 (raw file):
Previously, cohnt (Thomas Cohn) wrote…
Like so?
Yes, thank you!
Towards #21981. Adds python bindings to the methods introduced in #22091.
This change is