Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.