I am trying to run the RL based learning with the Gazebo as the environment, With the older classical version it seems that there were the services that could be used to reset the simulation and pause and unpause the physics engine. I am unable to spot those services in the harmonic ( version 8) which I have installed, the documentation out here also doesn’t have much information about it
https://gazebosim.org/docs/latest/getstarted/
Ideally I would like to have the ability to perform these operations
- Reset the simulation by some service call.
- Ability to add the model to the world at run time via some service.
Could someone suggest where to look for the resource that might help me to get started?
The WorldControl plugin can be used to pause or reset a simulation. Here’s a reference to the plugin: gz-gui/src/plugins/world_control/WorldControl.hh at gz-gui8 · gazebosim/gz-gui · GitHub
The UserCommands plugin can be used to spawn models at run time. gz-sim/src/systems/user_commands/UserCommands.hh at gz-sim8 · gazebosim/gz-sim · GitHub
Even without explicitly declaring these plugins in the SDF file they are usually included when you start gz sim. You should familiarize yourself with the gz command line tool run run gz -h
for help. You can use the command gz service -l
after you launch a simulation and look for the /world/<world_name>/control
service. This service allows you to reset and pause the simulation among other things. The /world/<world_name>/create
service allows you to add a models to the world at run time.
Thanks I am able to proceed.