gelsightinc / gsrobotics

GelSight SDK for robotic sensors
GNU General Public License v3.0
92 stars 25 forks source link

Unable to run 3d recon example #1

Closed hmcty closed 2 years ago

hmcty commented 2 years ago

I've followed the README, but I'm still unable to run the show3d.py example:

gs3drecon.py, line 13, in <module>
from gelsightcore import poisson_reconstruct
ImportError: cannot import name 'poisson_reconstruct' from 'gelsightcore' (unknown location)

After creating a virtual environment, I installed the package:

pip3 install . --upgrade

I've set both LD_LIBRARY_PATH and PYTHONPATH:

>>> echo $LD_LIBRARY_PATH
/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore

>>> echo $PYTHONPATH
/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore:/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsight

Using the inspect package to print the members, I get the following:

>>> print(getmembers(gelsightcore))
[('__doc__', None), ('__file__', None), ('__loader__', <_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>), ('__name__', 'gelsightcore'), ('__package__', 'gelsightcore'), ('__path__', _NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])), ('__spec__', ModuleSpec(name='gelsightcore', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>, submodule_search_locations=_NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])))]

Any ideas?

debrashure commented 2 years ago

It is possible that it may not work in python3.7. It has only been tested in python3.8. Can you use python3.8?

hmcty commented 2 years ago

3.8 worked. Maybe we make a note in the README?

radhen commented 2 years ago

Just did! Thank you. I'll close this issue now.

joycelimxy commented 2 years ago

I'm using Ubuntu18 but I'm unable to run the show3d.py example. Have already checkout the Ubuntu18 branch and using python3.8.

This is the error:

Traceback (most recent call last):
  File "examples/show3d.py", line 11, in <module>
    from gelsight import gs3drecon
  File "/home/<user>/lib/python3.8/site-packages/gelsight/gs3drecon.py", line 13, in <module>
    from gelsightcore import poisson_reconstruct
ImportError: libIlmImf-2_3.so.24: cannot open shared object file: No such file or directory

I have updated libopenexr to the latest version by running: sudo apt-get install libopenexr-dev

To check the versions of libopenexr, I ran: ls /usr/lib/x86_64-linux-gnu/ | grep libIlmImf and these are shown below:

libIlmImf-2_2.so.22
libIlmImf-2_2.so.22.0.0
libIlmImf.a
libIlmImf.so
libIlmImfUtil-2_2.so.22
libIlmImfUtil-2_2.so.22.0.0
libIlmImfUtil.a
libIlmImfUtil.so

Upon checking the Ubuntu packages (here), it seems that libIlmImfUtil-2_3.so.24 is only available in Ubuntu20? @debrashure do you have any idea why?

@hmccarty may I know if you're using Ubuntu 18?

debrashure commented 2 years ago

The problem is most likely coming from the python version.

For Ubuntu 18, the python version is 3.6.9 since that is the version that is distributed with Ubuntu 18. Sorry about the confusion. I will update the README.

Can you please try it with Python 3.6.9 and let me know if you still have this issue.

Thank you, Debbie

From: Joyce Lim Xin Yan @.> Sent: Tuesday, November 1, 2022 4:20 AM To: gelsightinc/gsrobotics @.> Cc: Debra Shure @.>; Mention @.> Subject: Re: [gelsightinc/gsrobotics] Unable to run 3d recon example (Issue #1)

I'm using Ubuntu18 but I'm unable to run the show3d.py example. Have already checkout the Ubuntu18 branch and using python3.8.

This is the error:

Traceback (most recent call last):

File "examples/show3d.py", line 11, in

from gelsight import gs3drecon

File "/home//lib/python3.8/site-packages/gelsight/gs3drecon.py", line 13, in

from gelsightcore import poisson_reconstruct

ImportError: libIlmImf-2_3.so.24: cannot open shared object file: No such file or directory

I have updated libopenexr to the latest version by running: sudo apt-get install libopenexr-dev

To check the versions of libopenexr, I ran: ls /usr/lib/x86_64-linux-gnu/ | grep libIlmImf and these are shown below:

libIlmImf-2_2.so.22

libIlmImf-2_2.so.22.0.0

libIlmImf.a

libIlmImf.so

libIlmImfUtil-2_2.so.22

libIlmImfUtil-2_2.so.22.0.0

libIlmImfUtil.a

libIlmImfUtil.so

Upon checking the Ubuntu packages (herehttps://packages.ubuntu.com/focal/amd64/libopenexr24/filelist), it seems that libIlmImfUtil-2_3.so.24 is only available in Ubuntu20? @debrashurehttps://github.com/debrashure do you have any idea why?

@hmccartyhttps://github.com/hmccarty may I know if you're using Ubuntu 18?

— Reply to this email directly, view it on GitHubhttps://github.com/gelsightinc/gsrobotics/issues/1#issuecomment-1298199866, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQG6FKCDHUK4DWX5ZEFTRMTWGDHD7ANCNFSM5YE3Z56A. You are receiving this because you were mentioned.Message ID: @.**@.>>

joycelimxy commented 2 years ago

hello Debbie, it works now, thank you so much! :smile:

echo19990722andy commented 2 years ago

I've followed the README, but I'm still unable to run the show3d.py example:

gs3drecon.py, line 13, in <module>
from gelsightcore import poisson_reconstruct
ImportError: cannot import name 'poisson_reconstruct' from 'gelsightcore' (unknown location)

After creating a virtual environment, I installed the package:

pip3 install . --upgrade

I've set both LD_LIBRARY_PATH and PYTHONPATH:

>>> echo $LD_LIBRARY_PATH
/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore

>>> echo $PYTHONPATH
/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore:/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsight

Using the inspect package to print the members, I get the following:

>>> print(getmembers(gelsightcore))
[('__doc__', None), ('__file__', None), ('__loader__', <_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>), ('__name__', 'gelsightcore'), ('__package__', 'gelsightcore'), ('__path__', _NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])), ('__spec__', ModuleSpec(name='gelsightcore', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>, submodule_search_locations=_NamespacePath(['/home/<user>/Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])))]

Any ideas?

Could you tell me the versions of the python-related tools in your Ubuntu20.04? I am using Ubuntu20.04 in VMware Station and my python version is 3.8 other tool's version: numpy == 1.23.4 (the requirement version is 1.17.4) open3d == 0.13.0 (as required) opencv_python == 3.4.16 (the requirement version is 3.4.17.61, however, I did not find this releaesd version on the Opencv website, the closet version I can find is 3.4.16) scipy == 1.93 (the requirement version is 1.8.0) setuptools == 45.2.0 torch==1.13.0+cu117(the requirement version is 1.8.1)

debrashure commented 1 year ago

It looks like you installed in python3.7. It should be install in python3.8.

I've set both LD_LIBRARY_PATH and PYTHONPATH:

echo $LD_LIBRARY_PATH

/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore

echo $PYTHONPATH

/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore:/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsight

From: echo19990722andy @.> Sent: Sunday, November 13, 2022 12:34 AM To: gelsightinc/gsrobotics @.> Cc: Debra Shure @.>; Mention @.> Subject: Re: [gelsightinc/gsrobotics] Unable to run 3d recon example (Issue #1)

I've followed the README, but I'm still unable to run the show3d.py example:

gs3drecon.py, line 13, in

from gelsightcore import poisson_reconstruct

ImportError: cannot import name 'poisson_reconstruct' from 'gelsightcore' (unknown location)

After creating a virtual environment, I installed the package:

pip3 install . --upgrade

I've set both LD_LIBRARY_PATH and PYTHONPATH:

echo $LD_LIBRARY_PATH

/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore

echo $PYTHONPATH

/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore:/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsight

Using the inspect package to print the members, I get the following:

print(getmembers(gelsightcore))

[('doc', None), ('file', None), ('loader', <_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>), ('name', 'gelsightcore'), ('package', 'gelsightcore'), ('path', _NamespacePath(['/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])), ('spec', ModuleSpec(name='gelsightcore', loader=<_frozen_importlib_external._NamespaceLoader object at 0x7fe702c5e950>, submodule_search_locations=_NamespacePath(['/home//Documents/gsrobotics/venv/lib/python3.7/site-packages/gelsightcore'])))]

Any ideas?

Could you tell me the versions of the python-related tools in your Ubuntu20.04? I am using Ubuntu20.04 in VMware Station and my python version is 3.8 other tool's version: numpy == 1.23.4 (the requirement version is 1.17.4) open3d == 0.13.0 (as required) opencv_python == 3.4.16 (the requirement version is 3.4.17.61, however, I did not find this releaesd version on the Opencv website, the closet version I can find is 3.4.16) scipy == 1.93 (the requirement version is 1.8.0) setuptools == 45.2.0 torch==1.13.0+cu117(the requirement version is 1.8.1)

— Reply to this email directly, view it on GitHubhttps://github.com/gelsightinc/gsrobotics/issues/1#issuecomment-1312643856, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQG6FKFS7PQGKKWORX2UQC3WIB4UVANCNFSM5YE3Z56A. You are receiving this because you were mentioned.Message ID: @.**@.>>