Restart simulation with new arguments without restarting gazebo
Hi,
for testing I need to restart my simulation often. The problem I have at the moment is that when I want to run the simulation with new arguments (e.g. a new robot, a new task, ...), I have to restart the simulation completely (close gazebo, restart gazebo with new arguments). This is quite time consuming, so I'm looking for a way to restart the simulation directly without closing gazebo but with new arguments. The initial simulation is started via roslaunch (-> roslaunch simulation simulation.launch arg1:=... arg2:=... ... argn:=... gazebo:=true) ....so I am looking for a way to update arg1 till argn and restart the simulation without closing gazebo.
I know there is 'rosservice call /gazebo/resetworld' or 'rosservice call /gazebo/resetsimulation' but with those commands the initialized simulation just restarts with the same arguments.
I would appreciate any help. Any solution be it over a terminal command or programmatically would help me a lot.
Asked by CESE42 on 2022-06-13 04:01:54 UTC
Comments
Do you intend to keep the loaded .world file the same and only change the robots spawned in the sim? AFAIK changing the loaded world in a running simulation is not possible.
Asked by peci1 on 2022-07-05 16:48:36 UTC