Robotics StackExchange | Archived questions

Creating multiple models in gazebo

Hi,

I would like to be able to obtain many models of a room/hallway with different set ups (colors, positioning of tables, chairs, furniture, etc.) with the smallest workload.

My current idea is to model one room in gazebo, save the .xml and then write a Python script that modifies the parameters in the .xml. I was searching for a better idea on the web, but could not find one, possibly due to my shallow understanding of ROS and gazebo.

Does anyone have an idea on how may I improve my approach?

(I have problems with adding multiple tags)

Asked by kchledowski on 2017-07-17 11:06:27 UTC

Comments

I think what you describe is actually a quite acceptable approach. At the very least it will most likely be the one with the least overhead, and be the most predictable.

Asked by gvdhoorn on 2017-07-17 11:17:26 UTC

re: multiple tags: it slightly confusing, but tags should be separated by spaces. You can retag your question by using the retag button/link. Be patient with the UI, it's slightly unintuitive. Press enter once you're done changing the tags.

Asked by gvdhoorn on 2017-07-17 11:18:31 UTC

Alternatively you could perhaps look into writing a world plugin that generates / constructs simulations based on some form of input. See PeterMitrano/gzmaze as an example.

Asked by gvdhoorn on 2017-07-17 11:28:50 UTC

Finally: as this is really more of a Gazebo-specific question, could I ask you to close this one and repost your question over at answers.gazebosim.org? That is the dedicated support forum for Gazebo, while ROS Answers is really just for ROS.

Thanks.

Asked by gvdhoorn on 2017-07-17 11:29:50 UTC

Answers

Instead of writing a script to post-process your xml, how about generating the xml from a template?

There are numerous ways of doing this, if you're using ROS and URDF, xacro is an option. Another option is to use embeded ruby like on this SDF model. I'm sure you can also do it with python.

Asked by chapulina on 2017-07-17 20:12:27 UTC

Comments