gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.19k stars 481 forks source link

Spawning multiple models #2207

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Anonymous.


It's not possible right now to force spawn a bunch of models without waiting through the factory timeout in World.cc.

I want to generate a random world, reset the simulation, and run my agent but there isn't a blocking insert call.

The best I can do is call InsertModelString, but after 100-200 calls to this function, eventually it stops working.

I think making LoadModel() public and adding a GetRoot() function to World would solve this problem.

osrf-migration commented 7 years ago

Original comment by rpottorff (Bitbucket: rpottorff).


not sure why it posted as anonymous, but I submitted this bug.

In addition, InsertModel{SDF,String} will only insert the first model in a file and it should probably insert all models if they exist.

osrf-migration commented 7 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


osrf-migration commented 5 years ago

Original comment by MarcZofka (Bitbucket: GzMRZ).


Hi,

i am facing the same problem: If a plugin, e.g. WorldPlugin, shall administrate and coordinate the instantiation of a bunch of models (which are not defined within the sdf, but by the plugin itself, for co-simulation reasons, e.g.), it is not possible to instantiate them in an appropriate way (so that we know the models exist) before the simulation loop is started. Are there any workarounds or plans to provide such a feature?

Best regards!