Git Product home page Git Product logo

Comments (8)

zy871125746 avatar zy871125746 commented on September 18, 2024 1

Thank for your answer, I am using master branch of dex-net and trimesh==2.30.11.

By debugging, I found the error is caused by 460th line of visualizer3d.py in visualization modules (from https://github.com/BerkeleyAutomation/visualization.git).
image

Trimesh calls meshpy.triangle moudle to create visualization,but in meshpy (from https://github.com/BerkeleyAutomation/meshpy.git) do not contain triangle moudle. I installed dex-net by run install.sh script, which install meshpy and visualizaiton automaticlly. Should I uninstall meshpy and install it with "pip install meshpy"?

from dex-net.

jeffmahler avatar jeffmahler commented on September 18, 2024 1

I think you have found an incompatibility between trimesh and meshpy that will be nontrivial to fix. Trimesh wants a publicly available meshpy package on PyPI but this has a name conflict with the BerkeleyAutomation version. We will fix in the next release as we are deprecating BerkeleyAutomation/meshpy. Until then, you may have to avoid using this function.

from dex-net.

jeffmahler avatar jeffmahler commented on September 18, 2024

I couldn't find any import for a module named triangle. Are you using the master branch of dex-net? Also, what version of trimesh do you have installed?

from dex-net.

zy871125746 avatar zy871125746 commented on September 18, 2024

Yes, I agree with you and I expect to see next version. Thanks for your helping.

from dex-net.

as-wanfang avatar as-wanfang commented on September 18, 2024

@zy871125746 @jeffmahler , I found a way to work around it temporarily. After installing the meshpy package on PyPI, move the installed folder (/meshpy and /MeshPy-2018.1.dist-info) under your installation path (mine is /usr/local/lib/python2.7/dist-packages/) to your trimesh folder (/usr/local/lib/python2.7/dist-packages/trimesh). Next, move triangle.py under /mesh to ../ and change "import meshpy.triangle as triangle" to "import triangle as triangle". So that trimesh can found triangle module directly.

from dex-net.

simlei avatar simlei commented on September 18, 2024

@as-wanfang @zy871125746 @jeffmahler an easier solution would be to just add the PyPI package triangle as a temporary dependency to dex-net, as the "real" meshpy is currently only imported once in the codebase of trimesh, and only if the PyPI package triangle is not found.

It is not obvious from the error message, but a few lines of code above the meshpy import in the trimesh library, the triangle module is tried to be imported and the method returns before meshpy is touched on success.

For me, this solved the issue elegantly.

from dex-net.

jeffmahler avatar jeffmahler commented on September 18, 2024

@simlei Great find. This is the correct solution. Added to requirements.txt in 02a199a

from dex-net.

science-code avatar science-code commented on September 18, 2024

Even though requirements.txt mentioned triangle, the error still persisted when running python apps/dexnet_cli.py and then steps 0-1-3:

INFO:dexnet.api:Displaying stable poses for
Stable pose pose_0 with p=0.116
Display object failed: cannot import name triangle

Solved simply with:
python2 -m pip install --user triangle

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.