The STL to Ogre Mesh converter is a command line tool in the ogre_tools package. It currently only works on binary STL files. Its usage (which will be printed out if you run with no arguments) is:

  • stl_to_mesh <stl files> <output directory>

or

  • stl_to_mesh <stl file> <output file>

Example usage:

  • rosrun ogre_tools stl_to_mesh *.STL ../pr2

This will generate output similar to:

Converting multiple meshes, into output directory ../pr2...
Converting base.STL to ../pr2/base.mesh...
5960 triangles
Converting body.STL to ../pr2/body.mesh...
3832 triangles
Converting caster.STL to ../pr2/caster.mesh...
13959 triangles
Converting el-pitch.STL to ../pr2/el-pitch.mesh...
15719 triangles
Converting fa-roll.STL to ../pr2/fa-roll.mesh...
10462 triangles
Converting head-pan.STL to ../pr2/head-pan.mesh...
12570 triangles
Converting head-tilt.STL to ../pr2/head-tilt.mesh...
860 triangles
Converting sh-pan.STL to ../pr2/sh-pan.mesh...
10526 triangles
Converting sh-pitch.STL to ../pr2/sh-pitch.mesh...
9716 triangles
Converting sh-roll.STL to ../pr2/sh-roll.mesh...
20500 triangles
Converting wheel.STL to ../pr2/wheel.mesh...
10300 triangles
Converting wr-pitch.STL to ../pr2/wr-pitch.mesh...
16160 triangles
Converting wr-roll.STL to ../pr2/wr-roll.mesh...
15256 triangles
  • rosrun ogre_tools stl_to_mesh caster.STL caster.mesh

This will generate output similar to:

Converting single mesh: caster.STL to caster.mesh
Converting caster.STL to caster.mesh...
13959 triangles

Wiki: ogre_tools/STL_To_Ogre_Mesh_Converter (last edited 2009-09-21 18:42:58 by JoshFaust)