BerkeleyAutomation / dex-net

Repository for reading the Dex-Net 2.0 HDF5 database of 3D objects, parallel-jaw grasps, and robust grasp metrics
https://berkeleyautomation.github.io/dex-net/code.html
Other
302 stars 96 forks source link

Test fails after successful installation #3

Closed hsd-dev closed 7 years ago

hsd-dev commented 7 years ago

After successfully installing dexnet, running the command python setup.py test gave the following output:

running test
running egg_info
writing requirements to src/dex_net.egg-info/requires.txt
writing src/dex_net.egg-info/PKG-INFO
writing top-level names to src/dex_net.egg-info/top_level.txt
writing dependency_links to src/dex_net.egg-info/dependency_links.txt
reading manifest file 'src/dex_net.egg-info/SOURCES.txt'
writing manifest file 'src/dex_net.egg-info/SOURCES.txt'
running build_ext
WARNING:root:Failed to import geometry msgs in rigid_transformations.py.
WARNING:root:Failed to import ros dependencies in rigid_transforms.py
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
WARNING: AUTOLab Perception Module not installed as Catkin Package. ROS msg conversions will not be available for Perception wrappers
WARNING: AUTOLab Perception module not installed as Catkin Package. ROS msg conversions will not be available for Perception wrappers.
WARNING:root:Unable to import pylibfreenect2. Python-only Kinect driver may not work properly.
WARNING:root:Unable to import openni2 driver. Python-only Primesense driver may not work properly
WARNING:root:Failed to import ROS in primesense_sensor.py. ROS functionality not available
WARNING:root:primesense_sensor.py not installed as catkin package. ROS functionality not available.
WARNING:trimesh:graph-tool unavailable, some operations will be much slower
WARNING:trimesh:shapely.geometry.Polygon not available!
Unable to import meshrender shared library! Rendering will not work. Likely due to missing Boost.Numpy
Boost.Numpy can be installed following the instructions in https://github.com/ndarray/Boost.NumPy
Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    test_suite='test'
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 215, in run
    self.run_tests()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 238, in run_tests
    **exit_kwarg
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/test.py", line 43, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'grasping_test'

Eventhough Boost.NumPy was installed successfully, it says rendering won't work likely due to missing Boost.NumPy Am I missing something?

jl1914 commented 7 years ago

Dex-Net Installation Instructions might be helpful.

Boost.NumPy does not configure library path correctly even though everything looks successful. Add the installation paths for Boost.NumPy (default /usr/local/lib and /usr/local/lib64 but check the “make install” output) to new lines in /etc/ld.so.conf.d/: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64 Add the installation paths to the ldconfig {open your favorite editor} {add the installation paths on new lines at end of file} {save file} Reload the ldconfig sudo ldconfig

hsd-dev commented 7 years ago

You were right. It was not able to locate the boost_numpy library. After the solution you suggested I get:

$ldconfig -p | grep numpy
    libboost_numpy.so (libc6,x86-64) => /usr/local/lib64/libboost_numpy.so

This still gives me the error:

Unable to import meshrender shared library! Rendering will not work. Likely due to missing Boost.Numpy
Boost.Numpy can be installed following the instructions in https://github.com/ndarray/Boost.NumPy

But I upgraded pip and then upgraded the packages installed by pip, and now the tests work!