Hi,
I’m having some difficulty with a parameterized nonlinear terminal constraint. I have pulled and installed the latest acados updates as of this morning, and for reference I’m working with a simple kinematic vehicle model driving around a track.
Here, xp, yp
are my position state variables, and x_e, y_e
are parameters I pass in for a target point ahead on the track. If I try to bound the euclidean distance to a small circle around that target point then the terminal solution is almost always outside the constraint. I have this set using:
ocp.model.con_h_expr_e = ( (xp - x_e) ** 2 + (yp - y_e) ** 2 ) ** 0.5
ocp.constraints.lh_e = np.array([0.])
ocp.constraints.uh_e = np.array([0.1])
It acts as though it is actually lower bounded by uh_e
here, as the distance values are almost always greater than 0.1 (EDIT: occasionally I do see a value within the constraints though). I don’t have these set as soft constraints, so there should be no slack. I also saw these on the interfaces documentation that seem swapped:
Any ideas on what might be happening or what I’m doing wrong here?
Thanks,
Ben