urosolia / RacingLMPC

Implementation of the Learning Model Predictive Controller for autonomous racing
284 stars 77 forks source link

AttributeError: 'OSQP' object has no attribute 'constant' #8

Open zjk1234 opened 4 years ago

zjk1234 commented 4 years ago

Starting PID ===== PID terminated Starting MPC ===== MPC terminated Starting TV-MPC ===== TV-MPC terminated Starting LMPC Traceback (most recent call last): File "main.py", line 173, in LMPCSimulator.Sim(ClosedLoopLMPC, LMPController, LMPCOpenLoopData) File "fnc/SysModel.py", line 37, in Sim Controller.solve(x[i, :]) File "fnc/LMPC.py", line 117, in solve res_cons, feasible = osqp_solve_qp(sparse.csr_matrix(M), q, sparse.csr_matrix(F), b, sparse.csr_matrix(G), np.add(np.dot(E,x0),L[:,0])) File "fnc/LMPC.py", line 426, in osqp_solve_qp if res.info.status_val != osqp.constant('OSQP_SOLVED'): AttributeError: 'OSQP' object has no attribute 'constant'

jayraj3 commented 4 years ago

Hello zjk1234,

Do you get any solution? I am facing same problem.

Thanks

junzengx14 commented 4 years ago

status_val is actually an integer in the latest OSQP package.