eric-bradford / ukf-snmpc Goto Github PK
View Code? Open in Web Editor NEWThis repository contains the source code for “Unscented Kalman filter stochastic nonlinear model predictive control” (UKF-SNMPC).
License: MIT License
This repository contains the source code for “Unscented Kalman filter stochastic nonlinear model predictive control” (UKF-SNMPC).
License: MIT License
Hey Eric,
do you remember which version of casadi you used? I tried to run the example but I get this error
C:\Users\morabito\Documents\Repos\UKF-SNMPC\venv\lib\site-packages\casadi\casadi.py:168: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar. (This may have returned Python scalars in past versions.
if m.dtype!=np.object: return None
Traceback (most recent call last):
File "C:\Users\morabito\Documents\Repos\UKF-SNMPC\Simulation_UKF_SNMPC.py", line 6, in <module>
UKF_SNMPC = UKF_SNMPC()
File "C:\Users\morabito\Documents\Repos\UKF-SNMPC\UKF_SNMPC.py", line 42, in __init__
self.set_inequality_constraints_UKF()
File "C:\Users\morabito\Documents\Repos\UKF-SNMPC\UKF_SNMPC.py", line 483, in set_inequality_constraints_UKF
Sigmapoints_a[k] = Sigma_points(x_hat[k-1],Sigma_chol[k-1],nun,sqrt_CovP,MeanP,nd,lambda_ukf,n_L)
File "C:\Users\morabito\Documents\Repos\UKF-SNMPC\UKF_SNMPC.py", line 393, in Sigma_points
x_hat_a_previous = vertcat(x_hat_before,MeanP)
File "C:\Users\morabito\Documents\Repos\UKF-SNMPC\venv\lib\site-packages\casadi\casadi.py", line 466, in vertcat
def vertcat(*args): return _vertcat(args)
File "C:\Users\morabito\Documents\Repos\UKF-SNMPC\venv\lib\site-packages\casadi\casadi.py", line 20204, in _vertcat
return _casadi._vertcat(*args)
NotImplementedError: Wrong number or type of arguments for overloaded function '_vertcat'.
Possible prototypes are:
_vertcat([Sparsity])
_vertcat([DM])
_vertcat([SX])
_vertcat([MX])
You have: '((np.array(SX),np.array(float)))'
It's due to the fact that you vertcat a SX variable with a numpy array. Maybe in older versions of casadi it was possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.