locuslab / mpc.pytorch

A fast and differentiable model predictive control (MPC) solver for PyTorch.
https://locuslab.github.io/mpc.pytorch/
MIT License
872 stars 146 forks source link

Could not import mpc, QuadCost, mpc from mpc #9

Closed RahulBhalley closed 6 years ago

RahulBhalley commented 6 years ago

Following Example: Time-Varying Linear Control on project page I failed importing mpc, QuadCost, LinDx from mpc package. I installed mpc with pip install mpc and the version is 0.0.2.

bamos commented 6 years ago

Thanks! That import statement is incorrect. I just fixed the example, and have also added a Jupyter notebook for it that should work: https://github.com/locuslab/mpc.pytorch/blob/master/examples/Time%20Varying%20Linear-Quadratic%20Control.ipynb

I'm going to add significantly more docs/examples over the next few weeks. If you're interested you can follow them at https://github.com/locuslab/mpc.pytorch/issues/8