Strange behaviours on a simple problem

Hi !
I am experiencing what I believe to be unexpected behaviours on a “simple” problem.
I am trying to solve the following : a 6 DoF rigid body with 6 controls (3 translations + 3 rotations).
I’m building my OCP to bring the solid from one configuration (0,0,0,0,0,0) + zero velocity to another (1,1,1,0,0,0) + zero velocity.
I know that this problem is feasible with my constraints (final time and bounds) since IPOPT is able to solve it (in seconds).
I am aware that the formulation is different and that one should be careful with the choice of the weights in order not to cause bad conditioning of the matrices…
However, setting hard constraints on the initial state (through ocp.constraints.x0) seem to crash the QP solver (PARTIAL_CONDENSING_HPIPM) -> 0 iterations… I don’t get why.
So I removed them and only kept :

  • a Mayer term on the final test (1e-3)
  • a smaller Lagrange term on the full state (1e-8)
  • an even smaller Lagrange term on the control (1e-12)

My goal is to force the solver to control the system… But its behavior is REALLY sensitive to a LOT of parameters : the relative values of the above costs (I can understand why, but a slight change can jeopardize convergence) and more surprisingly , the bounds on the control. Currently they are set to +/- 1e4 and the solver only finds controls of the order of 1e-4. If I raise these bounds (+/- 1e6), it crashes, if I lower them (+/- 1e2), it even lowers its optimal values (1e-6)… I believe this behavior to be unexpected, but I might be wrong !
Can someone enlighten me ?!
Best,
Fb

P.S. : I should add that the derivatives of my ODE are computed by casadi in finite difference, because i’m using an external .so lib for computing the dynamics of my system (which is the same in my IPOPT setup)

Hi,

it is quite hard to answer here.

I see that the the model seems rather simple. But with everything that is happening in internally, it is not.
So, unfortunately there is no easy/complete answer.

I agree that modifying the bounds on u should not change their values, if these constraints are not active.
However, if the solver crashes, these values are not really meaningful anyway.

One thing, you should definitely check, is to initialize the solver with the optimal solution from IPOPT.
In Python the primal solution can be initialized using:

 acados_ocp_solver.set( stage, 'x', x_stage_val)

similarly for u.

Best,
Jonathan