Acados installation in Pycharm

Yes, I’ve got the same error.

Might it be a problem of paths? I am not expert of linux, I just use it mainly copying and pasting instructions. In acados_template instructions it says:

“Notice that, if you want to run the examples from a location that differs from ‘<acados_root>/interfaces/acados_template’ or you want the generated Makefile to refer to a specific path (e.g. when cross-compiling or compiling from a location different from the one where you generate the C code), you will have to adapt ‘ocp.acados_include_path’ and ‘ocp.acados_lib_path’ accordingly in the generating Python code.”

I don’t know what it means but I ran the example not from <acados_root>/interfaces/acados_template.

Thank you

BR,
Walter

Hi @FreyJo, @ZandorT,

I tried also installing Anaconda but I always get the same error with
ocp_solver = AcadosOcpSolver(ocp, json_file = ‘acados_ocp.json’)

OSError: /home/walter/acados/lib/libblasfeo.so: undefined symbol: kernel_sgemm_nt_4x4_lib4

BR,
Walter

I think there could be something wrong with the HPIPM & BLASFEO targets.
Can you try the following, namely recompiling with GENERIC and running a C example:

cd <acados_dir>
rm build/* -rf
cd build
cmake .. -DACADOS_WITH_QPOASES=ON -DACADOS_EXAMPLES=ON -DHPIPM_TARGET=GENERIC -DBLASFEO_TARGET=GENERIC
make -j4
make install -j4
# run a C example, e.g.:
./examples/c/sim_wt_model_nx6

If that works, also try the Python example.

This is outdated. I will update the instructions soon.

Cheers,
Jonathan

Hi @FreyJo,

I compiled it using gcc

Sorry but I think I missed some instruction in running a C program

BR,
Walter

Recompiling as I suggested should have compiled the examples into
<acados_root>/build/examples/c.
you can just execute them, no need to compile them again…

Yes the C file worked!!

The python example made progress but still stopped with an error after a matplotlib window popped up.

Thank you
BR,
Walter

I guess replacing the last line in the example with:
plot_pendulum(Tf/N, Fmax, simU, simX, latexify=False)
will fix this.

I am wondering what dependency you are missing though.
Maybe you dont have Latex installed?

It would be great to find what went wrong with the automatic target…
Maybe you can run the cmake without the Target flags again and paste the output somewhere.

I checked. Latex is not installed on my Ubuntu. Shall I install a particular version?

I will install on another Ubuntu virtual machine acados with cmake without target flags and let you know.

BR,
Walter

Actually I thought you are interested in seeing the output of cmake running on this Ubuntu installation. This is the output

I installed texlive-base but I got the same error
“PermissionError: [Errno 13] Permission denied: ‘latex’”
So I did as you suggested and finally everything worked out perfectly

Thank you again Jonathan for your outstanding support!!!

BR,
Walter

Hi @FreyJo,

I made a fresh installation of acados in a fresh Ubuntu 19.04 virtual machine using atomatic targets. At the end I got the same error as before. So it’s sistematic. I have all the outputs of the installation but I don’t know how to paste it here.

Hi @walter,

I am glad I could help.

you can paste the installation output here:

I dont know what is going on with the Latex option, but will just set the default to False probably.

Hi @FreyJo,

I pasted the output in Pastebin (Acados fresh installation).
I am installing texlive-full to see if it works without False.
Thank you again

Sorry, I forgot the link
https://pastebin.com/wTLy5LQU

Hi @FreyJo,

I installed texlive_full, ran minimal_example_ocp.py with the default settings (no latexify=False) and it completed successfully with the matplotlib plot displayed.

Hi @FreyJo,

I succeeded in running acados examples within PyCharm.
I created a dedicated environement in anaconda and launched PyCharm from there.
I then created a project in PyCharm that I called Acados and selected as python interpreter Python3.7 from anaconda folder.

Doing this linked also acado_template as the installed packages seen by PyCharm.
I then opened home/walter/acados/examples/acados_python/getting_started/minimal_example_ocp.py and ran it without problems.

Great!

We also fixed the problem with the BLASFEO target.

Excellent!! :slightly_smiling_face:
Thank you again for your support.

BR,
Walter