Robotics StackExchange | Archived questions

Algorithmic world generation

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?

Asked by xperroni on 2015-05-18 04:27:28 UTC

Comments

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.

Asked by CatherineH on 2015-09-07 13:31:57 UTC

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

Asked by kkvamshee on 2018-12-08 21:55:03 UTC

Answers

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

Asked by chapulina on 2015-09-07 22:44:02 UTC

Comments

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

Asked by xperroni on 2015-10-22 21:20:42 UTC