How to use common::mesh for procedurally generating geometry
Howdy folks,
Could anyone point me in the right direction (examples would be nice) on how I would use Common::Mesh to create procedurally generated geometry in Gazebo?
For example, where are the primitive objects (box, sphere and cylinder) generated in the code, I figured that would be a good place to start?
I want to generate terrain and vegetation procedurally ( e.g. trees) from within a plug-in.
Any advise, suggestions, examples, ideas would be greatly appreciated.
Thanks,
Galto
A little bit more in particular: I have an array of vertices, normals and UV-coordinates: how to I "fill up" my common::Mesh object with it? Galto
Maybe looking at the `ColladaLoader` source code could give you an idea: https://bitbucket.org/osrf/gazebo/src/a3eb517b0fa58d230f87e5dadf5976b1d4f1d3c9/gazebo/common/ColladaLoader.cc?fileviewer=file-view-default#ColladaLoader.cc-1938
Yeah, or STLLoader too https://bitbucket.org/osrf/gazebo/src/a3eb517b0fa58d230f87e5dadf5976b1d4f1d3c9/gazebo/common/STLLoader.cc?at=default&fileviewer=file-view-default thanks! Galto
Another great example on how to turn vertex strips into meshes (which was actually suggested to me before by Carlos Agüero in another post of mine: http://answers.gazebosim.org/question/17454/programatically-generating-worlds-from-google-earth-kml-files/ ) is in the Terminus project, and more in particular this code: https://bitbucket.org/ekumen/terminus-simulation/src/14fc2524320a960c8569cf33afba2e19cb89ac5b/gazebo/rndf_gazebo_plugin/src/mesh_creator.cc?at=master&fileviewer=file-view-default