Open guzhaoyuan opened 5 years ago
@RussTedrake If I'm reading it correctly, you added LQR in #4041. Could you weigh in on the rename suggestion?
Note that the overload set for LinearQuadraticRegulator
includes some that return a System and some that return a LQRResult. Possibly we should use different names for those two cases?
It's an interesting case -- in controls "LQR" is used frequently to refer to the mathematical problem/formulation; though I agree that technically that should be "LQR problem" and "LQR" should refer to the controller/gains that are the result of solving the problem.
I'm ok with changing the methods that return a system to "MakeLinearQuadraticRegulator". I think leaving the ones that return LQRResult as simply "LinearQuadraticRegulator" is probably right, too.
I was confused by
builder.AddSystem<LinearQuadraticRegulator>(...)
not working.The
LinearQuadraticRegulator
actually creates anAffineSystem
and returns a unique_ptr of theAffineSystem
.LinearQuadraticRegulator
is not the constructor for theAffineSystem
.It would be better to call the function
MakeLinearQuadraticRegulator
.