Comments (11)
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.
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
from urdf2webots.
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.
The converter works well with dae.
from urdf2webots.
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.
OK, so it's very likely a bug with STL import.
from urdf2webots.
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:
from urdf2webots.
Here is a fixed version of the mesh:
link_0.stl.zip
from urdf2webots.
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:
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.
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.
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)
- Webots does neither use color nor textures from wavefront (.obj) files HOT 13
- NameError: global name 'PackageNotFoundError' is not defined HOT 10
- Base link is missing physics element that breaks Gyro node use HOT 8
- Question: when will the mesh scaling fix be included in the release? HOT 1
- Empty textures folder problem with URDF to PROTO conversion HOT 2
- Converter prunes URDF branches of sensors HOT 3
- Question: Update rate of sensor HOT 4
- Geometry.reference database does not consider scaling option HOT 2
- Mesh of base is not rendered HOT 6
- SliderJoint initial position is not reflected in Webots simulation
- Expected field name or '}', found ']' when adding proto to environment
- How do I set the contactMaterial? HOT 1
- How to generate a passive joint? HOT 2
- URDFSpawner <device reference=βlinkβ> does not work when the link is defined in the urdf and not in an existing PROTO HOT 4
- URDFSpawner does not set the robot Physics & BoundingObject when the base link does not have a collision tag
- Missing parsing of ROS mesh filename 'file://' prefix HOT 1
- URDFSpawner does not preserve link names, messing the TF tree when using the ros2_webots_driver with robot_state_publisher HOT 1
- Colors not being applied when pre-defined in URDF
- Has the development of this sensor part been completed HOT 1
- After the conversion of the mobile robotic arm, the part of the robotic arm is lost. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urdf2webots.