Hi
When I add the following lines to the chain_mass example (python interface) at line 154 in run_nominal_control.py
:
ocp.constraints.uh = np.array([10000])
ocp.constraints.lh = np.array([-10000])
ocp.model.con_h_expr = model.x[0]
The code generation fails. Why is this? Output is as follows:
acados_solver_chain_mass_ds_3.c:(.text+0x7eb): undefined reference to `chain_mass_ds_3_constr_h_fun_jac_uxt_zt'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x7f6): undefined reference to `chain_mass_ds_3_constr_h_fun_jac_uxt_zt_n_in'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x816): undefined reference to `chain_mass_ds_3_constr_h_fun_jac_uxt_zt_n_out'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x82d): undefined reference to `chain_mass_ds_3_constr_h_fun_jac_uxt_zt_sparsity_in'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x83c): undefined reference to `chain_mass_ds_3_constr_h_fun_jac_uxt_zt_sparsity_out'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x847): undefined reference to `chain_mass_ds_3_constr_h_fun_jac_uxt_zt_work'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x867): undefined reference to `chain_mass_ds_3_constr_h_fun'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x86e): undefined reference to `chain_mass_ds_3_constr_h_fun_n_in'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x88e): undefined reference to `chain_mass_ds_3_constr_h_fun_n_out'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x8a5): undefined reference to `chain_mass_ds_3_constr_h_fun_sparsity_in'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x8b4): undefined reference to `chain_mass_ds_3_constr_h_fun_sparsity_out'
/usr/bin/ld: acados_solver_chain_mass_ds_3.c:(.text+0x8bf): undefined reference to `chain_mass_ds_3_constr_h_fun_work'
collect2: error: ld returned 1 exit status
distcc[92618] ERROR: compile (null) on localhost failed
make: *** [Makefile:116: example] Error 1
I encountered this error in my own example, but reverse engineered it to one of the examples to make it easily reproducible :).
It seems to be an issue with a combination of SIM/OCP solver, since when I comment out the simsolver the code generation works again.