Simple-Robotics / cosypose

Code for "CosyPose: Consistent multi-view multi-object 6D pose estimation", ECCV 2020.
MIT License
70 stars 15 forks source link

ImportError: liburdfdom_model.so.1.0: cannot open shared object file: No such file or directory #10

Closed swtyree closed 1 year ago

swtyree commented 1 year ago

I am encountering the following error when attempting to run one of the eval scripts from the readme. I have run sudo apt install liburdfdom-tools and conda env create -n cosypose_SR --file environment.yaml (though with ./deps/bullet3 commented out due to the error mentioned in #2.

$ python -m cosypose.scripts.run_cosypose_eval --config tless-siso
Setting OMP and MKL num threads to 1.
Traceback (most recent call last):
  File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/big_white/code/cosypose_SR/cosypose/scripts/run_cosypose_eval.py", line 20, in <module>
    from cosypose.lib3d import Transform
  File "/home/big_white/code/cosypose_SR/cosypose/lib3d/__init__.py", line 1, in <module>
    from .transform import Transform, parse_pose_args
  File "/home/big_white/code/cosypose_SR/cosypose/lib3d/transform.py", line 2, in <module>
    import pinocchio as pin
  File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/pinocchio/__init__.py", line 6, in <module>
    from .robot_wrapper import RobotWrapper
  File "/home/big_white/miniconda3/envs/cosypose_SR/lib/python3.7/site-packages/pinocchio/robot_wrapper.py", line 5, in <module>
    from . import libpinocchio_pywrap as pin
ImportError: liburdfdom_model.so.1.0: cannot open shared object file: No such file or directory
bibekyess commented 1 year ago

Hi @swtyree! I think 'sudo apt-get install liburdfdom-model' should help.

swtyree commented 1 year ago

Thanks, @bibekyess. I am running Ubuntu 22.04, and the package you suggested doesn't appear to be available. Version 3.0 seems to be available (sudo apt-get install liburdfdom-model3.0), but liburdfdom_model.so.3.0 isn't what Pinocchio is looking for. Do you have any other ideas?

swtyree commented 1 year ago

This search would seem to indicate that it's only available for Ubuntu 18 and 20: https://pkgs.org/search/?q=liburdfdom_model.so.1.0

brieder commented 1 year ago

I use 'conda install conda-forge::urdfdom=1.0.4'.

swtyree commented 1 year ago

I wonder which of these solutions seems more promising?

swtyree commented 1 year ago

I just saw this message from a few minutes ago. Let me try that first.

I use 'conda install conda-forge::urdfdom=1.0.4'.

swtyree commented 1 year ago

@brieder, your suggestion was very helpful! After addressing the urdfdom issue, I ran into an issue with an incompatibility between the specified pytorch/cudnn version and my system that runs CUDA 11.8. After fixing that, I am now able to run inference scripts, such as python -m cosypose.scripts.run_cosypose_eval --config tless-siso.

Here are the changes that I needed to make to environment.yaml:

I've pasted the entire environment.yaml file in this gist. Let me know if it would be helpful to have this as a pull request. I cannot confirm that these change work for all scripts, but I will reply here if I notice anything that doesn't work.

swtyree commented 1 year ago

I just submitted a PR with my fixes for this issue (#11).