1
$\begingroup$

What is the clear difference between /reset_simulation and /reset_world. I initially was using /reset_simulation to reset the state of my environment periodically (in the context of RL).

This worked well until I added the functionality of deleting and spawning a new goal model when. From my observation the physical location of the model seems to "glitch". I understand that it has something to do with my condition to when I respawn (/delete_entity , /spawn_entity) the model. But it is clear that I am misunderstanding the process of /reset_simulation.

Often the model is just is not present in the gazebo world when it should be. I guess this could be /reset_simulation resetting the state of gazebo to when the model was not spawned.

I then looked into /reset_world which I believe is the better use case. But it doesn't work well with the slam_toolbox which is a crucial component of my package. The slam_toolbox complains about out of data TF frames (or something to that effect).

So to summarise I'm looking for clarification on the two services. The /reset ... service that I'm looking for is more to reset the robots to their original position in the world.

Currently using ROS2 Humble

$\endgroup$

1 Answer 1

1
$\begingroup$

This seems to be a duplicate of difference between reset_simulation and reset_world, which has (apparently) been migrated here, but I can not locate it1.

The answer to that question states:

These services correspond to the options under Edit in the GUI:

  • /gazebo/reset_world <-> Edit > Reset Model Poses
  • /gazebo/reset_simulation <-> Edit > Reset World

From the linked Beginner: GUI - User interface, under the section The Menu, there is a little more information:

Menu options

In text form:

  • Reset Model Poses (Reset models to original poses; do not reset time)
  • Reset world (Reset everything in world; reset time)

So, the resetting of the time seems to be the major difference.


1 See meta question, Has answers.gazebosim.org also been migrated to here?

$\endgroup$
1
  • 1
    $\begingroup$ What confused me about /reset_simulation was that If I spawned a model in and then despawned it, subsequent calls to /reset_simulation, would undo the changes either causing the model to despawn when I want to spawned or spawn it when I want it despawned. /reset_world is the correct use case I found but it breaks most ROS2 packages, so I opted for /set_entity_state. Thanks for your answer $\endgroup$
    – nohacks
    Mar 23 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.