Issues when running minimal example

Hello,

I am trying to install acados on ubuntu 20.04 (I need to work on ros noetic as well), and I am facing issues. The interface I want to install is the Python one. My python version is 3.8.10.

I followed the step by step instructions, but I keep facing issues when running the minimal_example_ocp.py script. See below

(env) fmccastro@francisco:~/acados/examples/acados_python/getting_started$ python minimal_example_ocp.py

Tera template render executable not found, while looking in path:
/home/fmccastro/acados/bin/t_renderer
In order to be able to render the templates, you need to download the tera renderer binaries from:
https://github.com/acados/tera_renderer/releases

Do you wish to set up Tera renderer automatically?
y/N? (press y to download tera or any key for manual installation)
y
Downloading https://github.com/acados/tera_renderer/releases/download/v0.2.0/t_renderer-v0.2.0-linux-amd64
Successfully downloaded t_renderer.
Successfully made t_renderer executable.
/home/fmccastro/acados/bin/t_renderer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/fmccastro/acados/bin/t_renderer)
/home/fmccastro/acados/bin/t_renderer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/fmccastro/acados/bin/t_renderer)
/home/fmccastro/acados/bin/t_renderer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/fmccastro/acados/bin/t_renderer)
Traceback (most recent call last):
  File "minimal_example_ocp.py", line 109, in <module>
    main()
  File "minimal_example_ocp.py", line 88, in main
    ocp_solver = AcadosOcpSolver(ocp)
  File "/home/fmccastro/acados/interfaces/acados_template/acados_template/acados_ocp_solver.py", line 231, in __init__
    self.generate(acados_ocp, json_file=acados_ocp.json_file, simulink_opts=simulink_opts, cmake_builder=cmake_builder, verbose=verbose)
  File "/home/fmccastro/acados/interfaces/acados_template/acados_template/acados_ocp_solver.py", line 132, in generate
    acados_ocp.render_templates(cmake_builder=cmake_builder)
  File "/home/fmccastro/acados/interfaces/acados_template/acados_template/acados_ocp.py", line 1226, in render_templates
    render_template(tup[0], tup[1], output_dir, json_path)
  File "/home/fmccastro/acados/interfaces/acados_template/acados_template/utils.py", line 336, in render_template
    raise RuntimeError(f'Rendering of {in_file} failed!\n\nAttempted to execute OS command:\n{os_cmd}\n\n')
RuntimeError: Rendering of main.in.c failed!

Attempted to execute OS command:
/home/fmccastro/acados/bin/t_renderer '/home/fmccastro/acados/interfaces/acados_template/acados_template/c_templates_tera/**/*' 'main.in.c' '/home/fmccastro/acados/examples/acados_python/getting_started/acados_ocp.json' 'main_pendulum_ode.c'

I have already tried to update the LIBC version to a newer one, but I get a segmentation fault message when running minimal_example_ocp.py script again. However, it is more likely there’s an issue with the t_renderer executable. I have also tried to build it from source
as it is mentioned in the , but I dont’ succeed as well.

Thanks in advance :victory_hand:

Hi,

I am not sure what is the issue with tera here.
Can you

  1. remove the t_renderer binary /home/fmccastro/acados/bin/t_renderer
  2. roll back the change in this commit to use the old tera version, using git revert c4965e7d585e1aeba4ac876a70740bbd8b4e2163 or just checkout the last release: git checkout v0.5.0
  3. try the example again.

Please let me know if it works.
Also, what is the issue with compiling t_renderer from source?

Best,
Jonathan

1 Like

It worked. You are a genius. Thanks.

1 Like