Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail installation #2

Open
BaiBaiBaiSTRONG opened this issue Jun 12, 2024 · 17 comments
Open

Fail installation #2

BaiBaiBaiSTRONG opened this issue Jun 12, 2024 · 17 comments
Labels
help wanted Extra attention is needed

Comments

@BaiBaiBaiSTRONG
Copy link

Hi! Thanks for this amazing code base. I finished all the installation steps provided in README. But there is still a problem shows.
"OSError: ~/Projects/Quadruped-PyMPC/gradient/nominal/c_generated_code/libacados_ocp_solver_centroidal_model.so: cannot open shared object file: No such file or directory "
I checked the corresponding path. It seems like the code is not correctly compiled.

@BaiBaiBaiSTRONG
Copy link
Author

Just Update the code case will tackle this problem

@giulioturrisi
Copy link
Collaborator

Hi, glad it is solved now. What do you mean by code case?

@BaiBaiBaiSTRONG
Copy link
Author

I first cloned the project last week. and spending several days trapped by the aforementioned issue. But I saw you update the repo recently ("cleaning" submission recent days). After I synced the code. The issue disappeared.

THANK You for this amazing project.

@BaiBaiBaiSTRONG
Copy link
Author

BaiBaiBaiSTRONG commented Jun 12, 2024

Two suggestions:

  • After the compilation of acados, the project may contain several path with same name. It would be better provide some hint on "path_to_acados", like "~/Project/Quadruped-PyMPC/acados".
  • If someone would like to run this on macOS, here should be
    DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/path_to_acados/lib" , according to acados-doc-installation

Besides, maybe it would be super helpful if you and your team could share more details on the Sim-2-Real process.

@RX-00
Copy link

RX-00 commented Jun 12, 2024

Hello @BaiBaiBaiSTRONG ,

I have run into the same issue you have except I'm on an Ubuntu 22.04 machine and I'm using regular old venv instead of conda. Everything else compiled correctly, but the acados ocp centroidal model solver never generated:

"
OSError: /home/roy/Quadruped-PyMPC/gradient/nominal/c_generated_code/libacados_ocp_solver_centroidal_model.so: cannot open shared object file: No such file or directory
"

I also have the latest version of the repo so I'm confused as to what you did to have this file generate?

@BaiBaiBaiSTRONG
Copy link
Author

Have you ever tried to update the repo? There was a "cleaning" commit recently.

@RX-00
Copy link

RX-00 commented Jun 12, 2024

Thanks for the fast response! Yeah I just cloned the repo ~2 hours ago. May I ask what your acados path says? I had mine like this:
"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/home/roy/Quadruped-PyMPC/acados/lib"
export ACADOS_SOURCE_DIR="/home/roy/Quadruped-PyMPC/acados"
"

@RX-00
Copy link

RX-00 commented Jun 12, 2024

I actually just updated mine to read:
"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"~/Quadruped-PyMPC/acados/lib"
export ACADOS_SOURCE_DIR="~/Quadruped-PyMPC/acados"

"
but now get the error of:

OSError: ~/Quadruped-PyMPC/acados/lib/../lib/libacados.so: cannot open shared object file: No such file or directory

@BaiBaiBaiSTRONG
Copy link
Author

Your path seems right. Otherwise it won't pop out the error like this. More like ".dylib" not found. I also did another thing. I installed the acados from its official website and set the path to corresponding folder.

@BaiBaiBaiSTRONG
Copy link
Author

Your updated comment here is wrong. I do think your first version seems better. You can manually find where the "libacados.so" is and correct the path in bashrc.

@RX-00
Copy link

RX-00 commented Jun 12, 2024

I started to try install acados as mentioned in its own documentation. I'm now running into terra renderer issues, which I think is more on acados' end.

Thank you for all the help though! I'll update here if I manage to fix this issue on my end, there's a lot of people on their forums with my issue now

@giulioturrisi
Copy link
Collaborator

giulioturrisi commented Jun 12, 2024

Hi, the instructions in the README should be the same as the ones on the official website, plus, the first paths you wrote seem ok to me. Tomorrow I will ask some colleagues to replicate the installation procedure, because for me everything works fine.

@BaiBaiBaiSTRONG, for the test on the real robot we have the mpc wrapped in a ros node, and our main framework runs separately in order to avoid delay from the mpc. We add there to what basically you see here in this repo (swing controller, etc..) some additional PD for the legs in stance. If you have some other questions regarding this, check my email in my profile.

@Loskiz
Copy link

Loskiz commented Jun 14, 2024

Issue: OSError with Nominal Type in Simulation on macOS Sonoma

Hello,

I am running into the same problem after following the setup procedure specified. I am able to play the simulation with 'type': 'input_rates' in config.py, but not with nominal.

I am using an M1 Pro MacBook Pro running macOS Sonoma 14.5.

Environment Variables in .zshrc

sh
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/Users/zhangletian/Projects/Quadruped-PyMPC/acados/lib"
export ACADOS_SOURCE_DIR="/Users/zhangletian/Projects/Quadruped-PyMPC/acados"

Error Message


OSError: dlopen(/Users/zhangletian/Projects/Quadruped-PyMPC/gradient/nominal/c_generated_code/libacados_ocp_solver_centroidal_model.dylib, 0x0006): tried: '/libacados_ocp_solver_centroidal_model.dylib' (no such file), '/Users/zhangletian/Projects/Quadruped-PyMPC/acados/lib/libacados_ocp_solver_centroidal_model.dylib' (no such file), '/Users/zhangletian/Projects/Quadruped-PyMPC/gradient/nominal/c_generated_code/libacados_ocp_solver_centroidal_model.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/zhangletian/Projects/Quadruped-PyMPC/gradient/nominal/c_generated_code/libacados_ocp_solver_centroidal_model.dylib' (no such file), '/Users/zhangletian/Projects/Quadruped-PyMPC/gradient/nominal/c_generated_code/libacados_ocp_solver_centroidal_model.dylib' (no such file)

@BaiBaiBaiSTRONG
Copy link
Author

It seems like this issue isn't fix for now. Reopened for more following discussion.

@Loskiz
Copy link

Loskiz commented Jun 14, 2024

Quick update: I did the installation all over again and nominal works for me now! I don't think I did anything differently.

@giulioturrisi
Copy link
Collaborator

A possible problem was solved here 85a2379

I was doing a check to avoid to recompile the mpc every time we run the sim, checking if a folder was created by acados during compilation previously. But if there was a problem during the first run (i.e. wrong acados path), the folder was created no matter what, and the second time one ran the code, acados avoided the recompilation. Now i force recompilation every time, soon or later i will find a clever fix for this.

Regarding dlopen, this is usually related to wrong acados path. I tried on a different machine following the same step i wrote in the README, and i did not encounter any problems. I will leave this open in case this is something else.

@RX-00
Copy link

RX-00 commented Jun 17, 2024

I was able to solve my problem with a simple fix of the acados path! As seen on their discourse: https://discourse.acados.org/t/fresh-installation-problems-on-ubuntu-22-04-python3-10/1642/4

Also a note is that as I was not using conda, I had to pip install pin instead of pip install pinocchio to have the environment run correctly.

@giulioturrisi giulioturrisi added the help wanted Extra attention is needed label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants