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

Five undefined names in ./mpc/lqr_step.py #1

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

Undefined names have the potential to raise NameError at runtime.

flake8 testing of https://github.com/locuslab/mpc.pytorch on Python 3.7.0

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./mpc/lqr_step.py:140:16: F821 undefined name 'lqr'
        _lqr = lqr.LQR(
               ^
./mpc/lqr_step.py:239:38: F821 undefined name 'Vtp1'
                Qt = C[t] + Ft_T.bmm(Vtp1).bmm(Ft)
                                     ^
./mpc/lqr_step.py:241:42: F821 undefined name 'vtp1'
                    qt = c[t] + Ft_T.bmm(vtp1.unsqueeze(2)).squeeze(2)
                                         ^
./mpc/lqr_step.py:244:42: F821 undefined name 'Vtp1'
                    qt = c[t] + Ft_T.bmm(Vtp1).bmm(ft.unsqueeze(2)).squeeze(2) + \
                                         ^
./mpc/lqr_step.py:245:34: F821 undefined name 'vtp1'
                        Ft_T.bmm(vtp1.unsqueeze(2)).squeeze(2)
                                 ^
5     F821 undefined name 'lqr'
5
bamos commented 6 years ago

Thanks!