soonho-tri / drake

A planning, control, and analysis toolbox for nonlinear dynamical systems. More info at
http://drake.mit.edu
Other
1 stars 0 forks source link

Add AddSosConstraint(const symbolic::Expression& e) #17

Closed soonho-tri closed 7 years ago

soonho-tri commented 7 years ago

This is a small PR adding AddSosConstraint(const symbolic::Expression& e). I think it should be useful for beginners who do not even want to know about symbolic::Polynomial.


This change is Reviewable

moritzkuhne commented 7 years ago
:lgtm:

Review status: 0 of 3 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

hongkai-dai commented 7 years ago

Reviewed 2 of 3 files at r1. Review status: 2 of 3 files reviewed at latest revision, 1 unresolved discussion.


drake/solvers/mathematical_program.cc, line 677 at r1 (raw file):

pair<Binding<PositiveSemidefiniteConstraint>, Binding<LinearEqualityConstraint>>
MathematicalProgram::AddSosConstraint(const symbolic::Expression& e) {
  return AddSosConstraint(symbolic::Polynomial{e});

I think we should do

return AddSosConstraint(symbolic::Polynomial{e, indeterminates_});

Comments from Reviewable

soonho-tri commented 7 years ago

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


drake/solvers/mathematical_program.cc, line 677 at r1 (raw file):

Previously, hongkai-dai (Hongkai Dai) wrote…
I think we should do ```C++ return AddSosConstraint(symbolic::Polynomial{e, indeterminates_}); ```

Done. Thanks!


Comments from Reviewable

hongkai-dai commented 7 years ago
:lgtm:

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable