HybridRobotics / car-racing

A toolkit for testing control and planning algorithm for car racing.
MIT License
165 stars 29 forks source link

mpccbf_test.py solve failed #9

Open luozhexin opened 10 months ago

luozhexin commented 10 months ago

System information OS Platform and Distribution (e.g., Linux Ubuntu 18.04): Linux Ubuntu 20.04 Branch: master python3.9(no python3.6 due to cvxopt install failed) Steps to reproduce the issue: python car_racing/test/mpccbf.py --track-layout l_shape --simulation --plotting --animation

Error detail: Car-Racing/src/policy.py", line 224, in calc_input sol = opti.solve() File "/home/wsco/anaconda3/envs/car_racing/lib/python3.9/site-packages/casadi/casadi.py", line 47783, in solve return _casadi.Opti_solve(self, *args) RuntimeError: Error in Opti::solve [OptiNode] at .../casadi/core/optistack.cpp:157: .../casadi/core/optistack_internal.cpp:998: Assertion "return_success(accept_limit)" failed: Solver failed. You may use opti.debug.value to investigate the latest values of variables. return_status is 'Infeasible_Problem_Detected'

hesuieins commented 10 months ago

Did this error occurs consistently? Since random noise is included in the simulator, the optimization problem could be infeasible in some cases. Can you try with the option zero_noise to see if the error occurs again?

luozhexin commented 10 months ago

Thanks for your reply, but the problem is still not solved. I made the following modifications to the code: 1、In mpccbf_test.py add ego.set_zero_noise() car1.set_zero_noise() car2.set_zero_noise() in if args["simulation] 2、In base.py self.zero_noise_flag = True

It will still report the same error as before,Only by making the following modifications can the program run simulator.sim(sim_time=5.0) If the simulation time is set to 10, an error may still be reported.

junzengx14 commented 10 months ago

One general suggestion, could we specify a few ubuntu versions in our CI setup?

junzengx14 commented 10 months ago

@hesuieins @yifanzeng0408 Are you tracking this issue?

Bubblefn commented 5 months ago

@luozhexin Have you solved this problem? I also encountered the same problem.

yifanzeng0408 commented 5 months ago

@luozhexin Have you solved this problem? I also encountered the same problem.

I have run the test and didn't encounter the problem. My guess is that the solver fails because of conflicting obstacle avoidance constraints. Maybe you can try deleting car1 and see the results?

yifanzeng0408 commented 5 months ago

@junzengx14 the fixes of this issue is proposed in this PR.

junzengx14 commented 5 months ago

@Bubblefn @luozhexin Are the problem resolved with above patches?

luozhexin commented 5 months ago

@junzengx14 Yes, it solved the problem, thank you