Giter VIP home page Giter VIP logo

Comments (11)

omichel avatar omichel commented on June 2, 2024 1

About the smoothing, I would recommend you to edit the resulting Webots PROTO in a text editor and inside the IndexedFaceSet nodes, set a creaseAngle value of about 3 or so. That will smooth the faces.

from urdf2webots.

Acwok avatar Acwok commented on June 2, 2024 1

I've double-checked the stl with blender (backface culling on) the faces seems fine.
Here is a simplified URDF using these stl. The proto generated from the URDF has a hole in the cylinder (see screenshot) while it hasn't when displayed with rviz.
mesh_normal_issue.tar.gz

image

from urdf2webots.

omichel avatar omichel commented on June 2, 2024 1

OK, I could investigate the problem and found that the triangle is actually simply missing (it's not a problem of wrong vertex order or normal). It could be that the urdf2webots converter has a little bug when converting STL meshes to IndexedFaceSet nodes and misses the last triangle or so. Could you try to export the same models from Blender in a different format, like DAE or OBJ instead of STL and see whether that fixes the problem?

from urdf2webots.

Acwok avatar Acwok commented on June 2, 2024 1

The converter works well with dae.

from urdf2webots.

omichel avatar omichel commented on June 2, 2024

It is not exactly that the normals are flipped, but rather that the triangle order is reversed (making the face appear on the wrong side). This is likely due to a wrong face in the source model. Blender by default displays both faces for triangles, so you may not be able to see the problem unless you disable double-sided face rendering in Blender.

from urdf2webots.

omichel avatar omichel commented on June 2, 2024

OK, so it's very likely a bug with STL import.

from urdf2webots.

DavidMansolino avatar DavidMansolino commented on June 2, 2024

There is definitely something wrong with this face in the original STL model, see how this face looks compared to the others once selected in Blender:
mesh

from urdf2webots.

DavidMansolino avatar DavidMansolino commented on June 2, 2024

Here is a fixed version of the mesh:
link_0.stl.zip

from urdf2webots.

Acwok avatar Acwok commented on June 2, 2024

See mesh_normal_issue.tar.gz archive that should reproduce the issue.
I've updated the paths to the stl in the urdf.
Then, I've converted from urdf to proto using: python -m urdf2webots.importer --input=/workspace/mesh_normal_issue/dlsaffe.urdf --output=/workspace/Dlsaffe.proto --disable-mesh-optimization.
Finally, when opened in Webots, I still see the same issue:

image


By the way, I see the same number of faces in both meshes when importing the old and new stl in Blender.

see how this face looks compared to the others once selected

I think it's just the way blender indicates the previous selected face. It can be reproduced on the stl you sent. Unselect all > select a face > select all

from urdf2webots.

DavidMansolino avatar DavidMansolino commented on June 2, 2024

I think it's just the way blender indicates the previous selected face. It can be reproduced on the stl you sent. Unselect all > select a face > select all

It seems you are right, I thought that it was indicating that something was wrong with this face (as it was matching with the problematic one), but you are right that it simply indicates the previously selected face.

from urdf2webots.

BenjaminHug8 avatar BenjaminHug8 commented on June 2, 2024

I am closing this issue as the mesh files are not anymore converted by the urdf2webots tool but rather by the Assimp library when Webots parse worlds and protos.

Feel free to reopen this issue or create a new one in case you have difficulties to import your mesh files.

from urdf2webots.

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.