STL vs DAE
Is there any advantages or disadvantages of using one over the other in a urdf file?
i.e. Collision computation time? rendering? etc...
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Is there any advantages or disadvantages of using one over the other in a urdf file?
i.e. Collision computation time? rendering? etc...
The STL file format comes from the CAM and rapid prototyping world, and thus encodes geometry information only, as triangle meshes. STL includes no material specification whatsoever.
The Collada format, on the other hand was intended for exchanging digital assets, and can encode not only 3D geometry, but also physics, kinematics, animations/morphing, shaders, manages level-of-detail, and more. For the specific case of modeling single rigid bodies, Collada is a good choice if you want to specify not only the geometry, but custom material properties such as texture maps (instead of a single solid color), normal maps (for adding more detail without adding more polygons), specularity maps (to specify reflectivity properties [1]), and so on.
So, if what you have for a visualization geometry is a single-colored triangle mesh, you could go for binary STL, as the equivalent (non-binary) Collada file size might be larger (by ~50% in my tests). If you can generate one or more of the above mentioned maps (texture, normal, specular), I'd recommend to go with Collada. For a collision geometry I use binary STLs because of the reduced file size.
Computation time should not be affected by the file format (except for the negligible asset import step, which is done only once), but by the file contents (eg. number of polygons). That goes for both rendering and collision detection.
[1] The current Gazebo/rviz lighting models do not seem to have specularity effects enabled.
AFAIK dae allows colors, STL not.
Asked: 2012-07-26 17:48:41 -0600
Seen: 8,603 times
Last updated: Jul 27 '12