Hi guys, I met a weird problem with HPIPM solver failure. The error is:
SQP_RTI: QP solver returned error status 3 QP iteration 30.
Solver failed with status: 4
return status 4.0 in closed loop iteration 1732.
1733
1734
1735
1736
Traceback (most recent call last):
File "/lhome/zikhuan/MB_MC/motion-control-sim/main.py", line 53, in <module>
sim.current_pose_v = np.array([0, 0, sim.current_pose_v[2], u_prev])
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.
The related snippet codes are followings:
sim.current_pose_v[2] = (current_ref_traj['ref_yaw'][0] - sim.current_pose_sim[2] + np.pi) % (2 * np.pi) - np.pi
sim.current_pose_v = np.array([0, 0, sim.current_pose_v[2], u_prev])
I focus on the line sim.current_pose_v = np.array([0, 0, sim.current_pose_v[2], u_prev])
with trying the debugger to find each term out.
current_ref_traj['ref_yaw'][0] = np.float64(1.4617725313547052)
sim.current_pose_sim[2] = np.float64(-1.75365108)
sim.current_pose_sim = array([474.63264591, 189.64698091, -1.75365108, 35. ])
(current_ref_traj['ref_yaw'][0] - sim.current_pose_sim[2] + np.pi) % (2 * np.pi) - np.pi = np.float64(-3.0677616946074515)
(current_ref_traj['ref_yaw'][0].item() - sim.current_pose_sim[2].item() + np.pi) % (2 * np.pi) - np.pi = -3.0677616946074515
Therefore, the sim.current_pose_v
is supposed to be the consequence above. However, I found the result of sim.current_pose_v = array([-3.06776169, -3.06776169, -3.06776169])
in the DEBUG CONSOLE, which has 3 same entries.
My assumption is the something wrong with the solver. Since the solver failed solving the problem, such that the calculation could not be guaranteed correctly. That’s basic description about my problem. Anyone has the same experience, I would like to know:)
Thanks in advance.
Best,
Brian