Loading Multiple World Files one after the other

asked 2017-04-04 04:41:51 -0600

imranz30 gravatar image

Hi, Is there a way to load world files from a ros node or script one after the other. I want to create 100 worlds and load them one after the other in the simulation. The task is to move a robot in the world and collect data, then load another world and move the robot in it and collect data and so on for 100 worlds. If there is a way to do it please let me know.


edit retag flag offensive close merge delete


Hi try to explain it more clear because what u r describing for me does not make any sense. Are you asking about an algorithm or implementation?

mohsen1989m gravatar image mohsen1989m  ( 2017-04-04 05:32:19 -0600 )edit

I need to run a simulation for 24000 steps in Gazebo and at the end of it I want a new world to load automatically and run the simulation for another 24000 steps. This I want to do for 100 worlds at least. During the simulations I will gather data for analysis.

imranz30 gravatar image imranz30  ( 2017-04-04 05:50:00 -0600 )edit

If there is an implementation or such a script available or some tips as to how to do it will be great for my experiments

imranz30 gravatar image imranz30  ( 2017-04-04 05:52:05 -0600 )edit

Hm, I do not think so, I also experienced some stuff in Gazebo like unloading of robots crashes it and so on... so I would recommend to create your own script to start and close gazebo every time when you change the world, just to reset it. Problem: Gazebo also crashes on startup sometimes :/

cyborg-x1 gravatar image cyborg-x1  ( 2017-04-04 06:21:40 -0600 )edit

Any suggestions? I have the same problem.

ArmanAsq gravatar image ArmanAsq  ( 2022-08-08 08:53:41 -0600 )edit