Gazebo | Ignition | Community
Ask Your Question

Algorithmic world generation

asked 2015-05-18 04:27:28 -0600

I am looking into Gazebo as a way to build simulated environments to test visual navigation algorithms. It would be particularly useful if I could generate new worlds algorithmically, so I could quickly create additional variants just by changing a set of parameters.

I see there are API's to generate SDF files programmatically, and I think I could use maze generation algorithms and other methods to automatically work out wall layouts, light sources, obstacles etc. But my question is, has something like this been done already? I'd hate to spend six months working on this to eventually find someone else already has a more advanced implementation.

Even if nothing of the sort already exists, are there any tools beyond Gazebo itself, the SDF API and ROS that I should be aware of?

edit retag flag offensive close merge delete



I'd also like to have an answer to this. The best answer I can find is to use xacro to generate a static 'robot' model. However, it's not idea. Ideally, I think there needs to be a version of xacro with more features, and that can handle parsing sdf's.

CatherineH gravatar imageCatherineH ( 2015-09-07 13:31:57 -0600 )edit

did you find any solution to this problem other than the answer below..? If, yes , please share your approach :)

kkvamshee gravatar imagekkvamshee ( 2018-12-08 20:55:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-07 22:44:02 -0600

chapulina gravatar image

You could use embedded ruby to generate parametrized worlds.

  • Here's an example of an SDF model with embedded ruby.

  • Here's an example of an SDF world with embedded ruby.

To regenerate the SDF from the erb template in the command line:

erb model.rsdf > model.sdf
edit flag offensive delete link more


Thank you, this is an interesting tool, but when I talked of a "world generator" I was thinking of something more high-level.

xperroni gravatar imagexperroni ( 2015-10-22 21:20:42 -0600 )edit

Question Tools

1 follower


Asked: 2015-05-18 04:27:28 -0600

Seen: 5,296 times

Last updated: Sep 07 '15