I needed some exporter for worldfiles for Gazebo and I didn't find any
anywhere. So I created one myself. It's a python plugin into Blender that
exports the meshes in a Blender scene into the XML format needed by Gazebo.
I included the .py file as an attachment (hope it's no problem to send
attachments into mailing lists) for others to enjoy.
Export into existing worldfiles that contain two lines: "<!-- BLENDER EXPORT
BEGIN -->" and "<!-- BLENDER EXPORT END -->". The content between these
lines is deleted and the exported data is pasted here. It should work, but
to make sure, please BACKUP YOUR ORIGINAL WORLDFILE.
The plugin exports the meshes by their name, so every mesh that has "Cube"
in its name is exported as a cube. The same applies for cylinders. The size
of the exported meshes is determined by the relative size of the object, so
if you change the mesh geometry in edit mode, this relative size stays
intact and the exported mesh remains the same in Gazebo. I therefore
recommend NOT ENTERING THE EDIT MODE AT ALL. Just add the objects using the
spacebar context menu and size them using [S], translate with [G] and
rotate with [R].