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

Mesh and Meshviewer cannot be used #51

Open
ghost opened this issue Oct 14, 2020 · 9 comments
Open

Mesh and Meshviewer cannot be used #51

ghost opened this issue Oct 14, 2020 · 9 comments

Comments

@ghost
Copy link

ghost commented Oct 14, 2020

I had compiled and install Boost and the psbody-mesh package following the README.md using Makefile in the repository. And run the test successfully by the command $ make tests as well as $ make documentation.

But when I use the command $ meshviewer view sphere.obj, it occurs an error, ValueError: Could not load file.

Tarceback reports that the error occurs in File "psbody/mesh/serialization/serialization.py", line 98, in load_from_obj_cpp from .loadobj import loadobj.

Then I found there is not loadobj file in the whole directory, as well as aabb_normals, spatialsearch, plyutils. It indicates the Cmakelist.txt in ./mesh is no use.

Do you know how to deal with the problem?

@ghost
Copy link
Author

ghost commented Oct 19, 2020

Finally, I found that the file CMakeLists.txt in mesh/mesh hadn't used in BOOST_INCLUDE_DIRS=/path/to/boost/include make all. It caused these files whose names were aabb_normals, spatialsearch, plyutils, loadobj hadn't generated. As a result, we cannot import them, becuase they don't exist at all.

In the end, I cmake the file CMakeLists.txt in mesh/mesh, and get these missing files. Then I successfully fix this bug.

@khushgrover
Copy link

I got the same error, could you please share exactly what worked?

@ghost
Copy link
Author

ghost commented Oct 28, 2020

I got the same error, could you please share exactly what worked?

cd mesh/mesh/cmake/
cmake ..
make

then you can see aabb_normals.so, spatialsearch.so, plyutils.so and loadobj.so files in the folder mesh/mesh/cmake.
follow your bug, put these files into correct folders.

@ryancll
Copy link

ryancll commented Oct 28, 2020

Hi @faneggs , thank you for sharing!
What should I do after copying *.so to the correct folder?

from .loadobj import loadobj In "psbody/mesh/serialization/serialization.py", line 98
I think the loadobj should a be py file, but now we only have a .so file.

Could you please share more details? Thx

@khushgrover
Copy link

Using this command

$ meshviewer view sphere.obj

it occurs an error, ValueError: Could not load file.
I got it working by specifying the actual path for the object.

$ meshviewer view data/unittest/sphere.obj

@ghost
Copy link
Author

ghost commented Nov 9, 2020

Hi @faneggs , thank you for sharing!
What should I do after copying *.so to the correct folder?

from .loadobj import loadobj In "psbody/mesh/serialization/serialization.py", line 98
I think the loadobj should a be py file, but now we only have a .so file.

Could you please share more details? Thx

the .so file is a dynamic link library that can be imported by any language.

@ghost
Copy link
Author

ghost commented Nov 13, 2020

if you are using python3, then you might see an error following after cmake ..:

CMake Error at cmake/thirdparty.cmake:35 (message):
  [numpy] the following error occured: File "<string>", line 1

      import numpy; print numpy.get_include()
                              ^

  SyntaxError: invalid syntax

   - Consider setting PYTHON_ROOT in the environment
Call Stack (most recent call first):
  CMakeLists.txt:17 (include)


-- Configuring incomplete, errors occurred!

Open and edit the file ./mesh/cmake/thirdparty.cmake
Replace import numpy; print numpy.get_include() with import numpy; print(numpy.get_include()) in this file

cmake .. agian

@trinanjan12
Copy link

@faneggs @khushgrover
I followed these steps

  1. git clone https://github.com/MPI-IS/mesh.git

  2. cd mesh

  3. make all BOOST_INCLUDE_DIRS=/usr/include/boost/

  4. make tests and make documentation

  5. after this cd mesh/cmake and cmake .. and make at the end
    this shows building the missing files like loadobj.so

  6. meshviewer view sphere.obj still shows the error

    v, vt, vn, f, ft, fn, mtl_path, landm, segm = loadobj(filename)
    ValueError: Could not load file

I didn't understand the part when you said copy the files to the exact location. as in copy where. the missing files(loadobj.so etc) are generated in the dir mesh/mesh/cmake . Do I need to move them somewhere?

meshviewer view data/unittest/sphere.obj this works though!!

@ghost
Copy link
Author

ghost commented Nov 25, 2020

@faneggs @khushgrover
I followed these steps

  1. git clone https://github.com/MPI-IS/mesh.git
  2. cd mesh
  3. make all BOOST_INCLUDE_DIRS=/usr/include/boost/
  4. make tests and make documentation
  5. after this cd mesh/cmake and cmake .. and make at the end
    this shows building the missing files like loadobj.so
  6. meshviewer view sphere.obj still shows the error
    v, vt, vn, f, ft, fn, mtl_path, landm, segm = loadobj(filename)
    ValueError: Could not load file

I didn't understand the part when you said copy the files to the exact location. as in copy where. the missing files(loadobj.so etc) are generated in the dir mesh/mesh/cmake . Do I need to move them somewhere?

meshviewer view data/unittest/sphere.obj this works though!!

./mesh/geometry/spatialsearch.so
./mesh/serialization/plyutils.so
./mesh/spatialsearch.so
./mesh/serialization/loadobj.so

sourabhdesai added a commit to sourabhdesai/mesh that referenced this issue Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants