Ask Your Question
0

Creating multiple models in gazebo [closed]

asked 2017-07-17 11:08:26 -0500

kchledowski gravatar image

updated 2017-07-19 05:38:13 -0500

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)

edit retag flag offensive reopen merge delete

Closed for the following reason Gazebo Question: The Gazebo community prefers to answer questions at: http://answers.gazebosim.org by kchledowski
close date 2017-07-19 05:42:56.841783

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-17 11:17:26 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-17 11:18:31 -0500 )edit
1

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-17 11:28:50 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-17 11:29:50 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-07-17 20:12:27 -0500

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-07-17 11:06:27 -0500

Seen: 569 times

Last updated: Jul 17 '17