Closed 438749902 closed 1 year ago
Hi,
can you verify if liblearned_dyn.so
is actually missing? (Should be in examples/_l4c_generated
).
If liblearned_dyn.so
exists, please run
ldd libacados_ocp_solver_wr.so
in examples/c_generated_code
and post the output here.
My initial guess is that it has something to do with WSL. I am not able to test Windows and WSL, unfortunately.
the liblearned_dyn.so
is in examples/_l4c_generated.
lty@PC-LTY:/mnt/l/Python/MPC/l4casadi/examples/_l4c_generated$ ls
f.cpp f_forward.pt f_jacrev.pt g.json g_hess.pt l4casadi_f.cpp l4casadi_f_forward.pt l4casadi_f_jacrev.pt learned_dyn.json learned_dyn_hess.pt libf.so libl4casadi_f.so
f.json f_hess.pt g.cpp g_forward.pt g_jacrev.pt l4casadi_f.json l4casadi_f_hess.pt learned_dyn.cpp learned_dyn_forward.pt learned_dyn_jacrev.pt libg.so liblearned_dyn.so
then i run ldd libacados_ocp_solver_wr.so
in examples/c_generated_code
, the output is:
linux-vdso.so.1 (0x00007ffdd67f7000)
libacados.so => /home/lty/env/acados/lib/libacados.so (0x00007f907f901000)
liblearned_dyn.so => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f907f6d3000)
libqpOASES_e.so.3.1 => /home/lty/env/acados/lib/libqpOASES_e.so.3.1 (0x00007f907f696000)
libhpipm.so => /home/lty/env/acados/lib/libhpipm.so (0x00007f907f53c000)
libblasfeo.so => /home/lty/env/acados/lib/libblasfeo.so (0x00007f907f33e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f907f257000)
/lib64/ld-linux-x86-64.so.2 (0x00007f907f985000)
Hi,
for a quick fix: please add the absolute path to _l4c_generated
to the LD_LIBRARY_PATH
environment var.
I will try and find a better way to do this next week.
Best Tim
the problem is solved, thank you very much!
I add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/l/Python/MPC/l4casadi/examples/_l4c_generated
in .bashrc
and pycharm, then the code is wrok correctly.
Hi,
This should not be required anymore. If you do a pull and a fresh install of the package, the example should now work without explicitly setting LD_LIBRARY_PATH
.
Let me know if it works!
I pull the newest code and it is worked correctly.
Environment:
Windows10-22H2-lastest WSL2 - Ubuntu22.04 Pycharm2022.3.1 python3.10 venv with CUDA 11.7
Problem:
I can run
examples/readme.py
andexamples/simple_nlp.py
successfully, but when I run examples/acados.py, the output is:I think that mean there is no "liblearned_dyn.so", could you tell me how to solve this problem? thank you