Greetings.
I tried to work with various control flow techniques and happen to find your repository was a better place to learn. But on trying the mpc_discrete.py example, we had encountered with some ValueErrors.
On digging in further, I found the error is due to the following trace.
Running mpc.py as a standalone code and the stacktrace is as follows.
Traceback (most recent call last):
File "..\libs_control-main\libs_control-main\LibsControl\libs_common\mpc.py", line 153, in
u_new = mpc.forward(xr, x, u_prev)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "..\libs_control-main\libs_control-main\LibsControl\libs_common\mpc.py", line 114, in forward
self.xr_aug[ofs:ofs + self.n_states, :] = xr[n, :]
~~^^^^^^
IndexError: index 4 is out of bounds for axis 0 with size 4
Thanks and Regards
ARAVINDAKSHAN G A
Greetings.
I tried to work with various control flow techniques and happen to find your repository was a better place to learn. But on trying the mpc_discrete.py example, we had encountered with some ValueErrors.
On digging in further, I found the error is due to the following trace.
Running mpc.py as a standalone code and the stacktrace is as follows.
Thanks and Regards
ARAVINDAKSHAN G A