Git Product home page Git Product logo

Comments (8)

jeffmahler avatar jeffmahler commented on July 17, 2024 1

Sorry for the delay! Does this file exist: /path/to/your/meshpy/meshpy/meshrender.so?

If not, then meshrender failed to build on your system. Please run

sh install_meshrender.sh

in the folder /path/to/your/meshpy and post any errors.

from dex-net.

DailyJK avatar DailyJK commented on July 17, 2024

What's more, I was confronted with the error, assimp library not found

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:trimesh:graph-tool unavailable, some operations will be much slower
WARNING:trimesh:No FCL -- collision checking will not work
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 "/home/jk/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 215, in run
    self.run_tests()
  File "/home/jk/.local/lib/python2.7/site-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 "/home/jk/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 43, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "/home/jk/Projects/dex-net/test/learning_test.py", line 17, in <module>
    from dexnet.learning import RandomBinaryObjective, RandomContinuousObjective, UniformAllocationMean, ThompsonSampling, GaussianUniformAllocationMean, MaxIterTerminationCondition
  File "/home/jk/Projects/dex-net/src/dexnet/__init__.py", line 3, in <module>
    from api import DexNet
  File "/home/jk/Projects/dex-net/src/dexnet/api.py", line 19, in <module>
    import trimesh
  File "/home/jk/.local/lib/python2.7/site-packages/trimesh/__init__.py", line 20, in <module>
    from .io.load import load_mesh, load_path, load, available_formats
  File "/home/jk/.local/lib/python2.7/site-packages/trimesh/io/load.py", line 14, in <module>
    from .assimp import _assimp_loaders
  File "/home/jk/.local/lib/python2.7/site-packages/trimesh/io/assimp.py", line 130, in <module>
    import pyassimp
  File "/home/jk/.local/lib/python2.7/site-packages/pyassimp/__init__.py", line 1, in <module>
    from .core import *
  File "/home/jk/.local/lib/python2.7/site-packages/pyassimp/core.py", line 34, in <module>
    class AssimpLib(object):
  File "/home/jk/.local/lib/python2.7/site-packages/pyassimp/core.py", line 38, in AssimpLib
    load, load_mem, export, release, dll = helper.search_library()
  File "/home/jk/.local/lib/python2.7/site-packages/pyassimp/helper.py", line 233, in search_library
    raise AssimpError("assimp library not found")
pyassimp.errors.AssimpError: assimp library not found

It seems to be in relation with architecture. I tried it on another computer, it worked. But I couldn't solve the error on my computer

from dex-net.

jeffmahler avatar jeffmahler commented on July 17, 2024

With respect to the imports, the first thing is to double check that imports aren't broken:

cd /path/to/your/dex-net
python
>>>> import test.learning_test

You may also attempt to run the tests individually by directly running

cd /path/to/your/dex-net
python test/database_test.py
python test/grasping_test.py
python test/learning_test.py

It seems that your output is from a successful attempt to run the test, so in regards to assimp, some forums suggest that the assimp error may be due to a 32-bit architecture. What is the OS version and architecture of your machine?

Also please double-check that you have the assimp libraries installed by running:

sudo apt-get install assimp-utils libassimp-dev

from dex-net.

DailyJK avatar DailyJK commented on July 17, 2024

Thanks for your solution. It worked after

sudo apt-get install libassimp-dev

And I test the installed project with the command line

python
>>>> import test.learning_test

python test/grasping_test.py
python test/learning_test.py

These all pass through the test. However, the test

python test/database_test.py

It presented the error

test_illegal_create (__main__.Hdf5DatabaseTest) ... ok
test_new_database_and_graspable (__main__.Hdf5DatabaseTest) ... Input mesh  /home/jk/Projects/dex-net/data/test/models/bar_clamp.obj
output mesh  /home/jk/Projects/dex-net/.dexnet/bar_clamp_proc.obj
Loading Plugins:
Current Plugins Dir is: /usr/lib/meshlab/plugins 
Error in XMLFile: filter_measure.xml - line: -1, column: -1 - 
Error in XMLFile: filter_mutualinfo.xml - line: -1, column: -1 - 
Total 227 filtering actions
Total 13 io plugins
Opening a file with extention obj
Mesh bar_clamp.obj loaded has 1428 vn 476 fn
No Script to apply.
Mesh /home/jk/Projects/dex-net/data/test/models/bar_clamp.obj saved as /home/jk/Projects/dex-net/.dexnet/bar_clamp_proc.obj (1428 vn 476 fn)
INFO:root:MeshlabServer Command: meshlabserver -i "data/test/models/bar_clamp.obj" -o ".dexnet/bar_clamp_proc.obj"
Reading data.
Warning: 9 lines were ignored since they did not contain faces or vertices.
Read in 1428 vertices and 476 faces.
Resolution: 0.000716689 with real dimension 0.064502
Center of grid 0 0 0
Bound box size: (-0.0358344 -0.0358344 -0.0358344) to (0.021729 0.02 0.032251) with dimensions 100 100 100.
Computing signed distance field.
Writing results to: .dexnet/bar_clamp_proc.sdf
Processing complete.
INFO:root:SDF Command: SDFGen ".dexnet/bar_clamp_proc.obj" 100 5
INFO:root:Returning datum bar_clamp
ERROR

======================================================================
ERROR: test_new_database_and_graspable (__main__.Hdf5DatabaseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/database_test.py", line 147, in test_new_database_and_graspable
    stable_pose)
  File "/home/jk/Projects/dex-net/deps/meshpy/meshpy/mesh_renderer.py", line 716, in wrapped_images_viewsphere
    return self.wrapped_images(mesh, vs_disc.object_to_camera_poses(), render_mode, stable_pose=stable_pose, mat_props=mat_props, light_props=light_props)
  File "/home/jk/Projects/dex-net/deps/meshpy/meshpy/mesh_renderer.py", line 587, in wrapped_images
    debug=debug)
  File "/home/jk/Projects/dex-net/deps/meshpy/meshpy/mesh_renderer.py", line 489, in images
    c, d = meshrender.render_mesh([P],
NameError: global name 'meshrender' is not defined

----------------------------------------------------------------------
Ran 2 tests in 11.559s

FAILED (errors=1)

I have install all the 3rd party. I don't know why.

from dex-net.

jeffmahler avatar jeffmahler commented on July 17, 2024

Closing due to inactivity. After review I believe the issue was due to a failed meshrender build.

from dex-net.

Achllle avatar Achllle commented on July 17, 2024

The output of running the install script is cp: cannot create regular file '../meshpy/meshrender.so': Permission denied.
Running the copy command outside of the script copies the file, but doesn't resolve the error, even after setting permissions to the user.
@jeffmahler

Traceback (most recent call last):
  File "tools/generate_gqcnn_dataset.py", line 595, in <module>
    config)
  File "tools/generate_gqcnn_dataset.py", line 395, in generate_gqcnn_dataset
    render_samples = urv.rvs(size=image_samples_per_stable_pose)
  File "/my_ws/dexnetenv2/local/lib/python2.7/site-packages/autolab_core/random_variables.py", line 81, in rvs
    return self.sample(size=size)
  File "/my_ws/dexnetenv2/local/lib/python2.7/site-packages/meshpy/random_variables.py", line 498, in sample
    render_mode, stable_pose=self.stable_pose)
  File "/my_ws/dexnetenv2/local/lib/python2.7/site-packages/meshpy/mesh_renderer.py", line 587, in wrapped_images
    debug=debug)
  File "/my_ws/dexnetenv2/local/lib/python2.7/site-packages/meshpy/mesh_renderer.py", line 489, in images
    c, d = meshrender.render_mesh([P],
AttributeError: 'module' object has no attribute 'render_mesh'
Floating point exception (core dumped)

python -c 'import meshrender; dir(meshrender)' yields

['AmbientLight', 'CameraSample', 'DirectionalLight', 'InstancedSceneObject', 'Light', 'MaterialProperties', 'PointLight', 'RenderSample', 'Scene', 'SceneObject', 'SceneViewer', 'UniformPlanarWorksurfaceImageRandomVariable', 'UniformPlanarWorksurfaceRandomVariable', 'ViewsphereDiscretizer', 'VirtualCamera', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', 'camera', 'constants', 'light', 'material', 'random_variables', 'render', 'scene', 'scene_object', 'shaders', 'trackball', 'version', 'viewer']

meshpy is the newest version from the BerkeleyAutomation repo

Digging in a bit deeper, meshpy/mesh_renderer.py contains the import

try:
    import meshrender
except:
    pass

which if brought outside the try-except block results in an importerror: ImportError: libboost_numpy.so: cannot open shared object file: No such file or directory with a reference to numpy Boost but Boost now comes included with Python...

from dex-net.

kaixin-bai avatar kaixin-bai commented on July 17, 2024

AttributeError: 'module' object has no attribute 'render_mesh'
Do you have the problem solved?

from dex-net.

dj4park avatar dj4park commented on July 17, 2024

ImportError: No module named meshrender eventhough /path/to/your/meshpy/meshpy/meshrender.so exists and sh install_meshrender.sh install script runs successfully with the following output.

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7") 
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libGL.so  
-- Found GLUT: /usr/lib/aarch64-linux-gnu/libglut.so  
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build
/usr/bin/cmake -H/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy -B/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/CMakeFiles /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build'
make -f meshpy/CMakeFiles/meshrender.dir/build.make meshpy/CMakeFiles/meshrender.dir/depend
make[2]: Entering directory '/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build'
cd /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/meshpy /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/meshpy /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/meshpy/CMakeFiles/meshrender.dir/DependInfo.cmake --color=
Scanning dependencies of target meshrender
make[2]: Leaving directory '/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build'
make -f meshpy/CMakeFiles/meshrender.dir/build.make meshpy/CMakeFiles/meshrender.dir/build
make[2]: Entering directory '/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build'
[ 50%] Building CXX object meshpy/CMakeFiles/meshrender.dir/meshrender.cpp.o
cd /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/meshpy && /usr/bin/c++   -Dmeshrender_EXPORTS -I/usr/include/python2.7  -fPIC   -o CMakeFiles/meshrender.dir/meshrender.cpp.o -c /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/meshpy/meshrender.cpp
[100%] Linking CXX shared module meshrender.so
cd /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/meshpy && /usr/bin/cmake -E cmake_link_script CMakeFiles/meshrender.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC   -shared  -o meshrender.so CMakeFiles/meshrender.dir/meshrender.cpp.o -lboost_python -lpython2.7 -lboost_numpy -lglut -lXmu -lXi -lOSMesa 
make[2]: Leaving directory '/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build'
[100%] Built target meshrender
make[1]: Leaving directory '/home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build'
/usr/bin/cmake -E cmake_progress_start /home/nvidia/sis_lab_all/15-APC2016_Case_Study/case_study/arc2016_TX2/dexnet_ws/src/meshpy/build/CMakeFiles 0

How can this issue be solved?

from dex-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.