1
$\begingroup$

I want to reset the models in the world, but nothing happens; here’s what I’ve tried.

  • Environment:
    • System: Ubuntu 22.04
    • Gazebo: Gazebo fortress
  1. Open gazebo fortress with minimal_scene.sdf
ign gazebo minimal_scene.sdf -v 4 
  1. Move the shapes using the translate mode
  2. use ign service to request a reset from service /world/minimal_scene/control
ign service -s /world/minimal_scene/control --reqtype ignition.msgs.WorldControl --reptype ignition.msgs.Boolean --timeout 5000 --req 'reset: {all: true}, pause: true' 
  • The log from the ign service:
data: true 
  • The log from ign gazebo:
[Dbg] [SimulationRunner.cc:262] Rewinding simulation back to time zero. 

However, the shape was not reset.

  • Other warnings of ign gazebo:
[Wrn] [Model.hh:69] [Wrn] [Model.hh:69] Skipping serialization / deserialization for models Skipping serialization / deserialization for models Skipping serialization / deserialization for models with //pose/@relative_to attribute. [Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v125WorldEwith //pose/@relative_to attribute. N3sdf3v125WorldESkipping serialization / deserialization for models with //pose/@relative_to attribute. `operator<<`. Component will not be serialized.`operator<<`. Component will not be serialized.Skipping serialization / deserialization for models with //pose/@relative_to attribute. [Wrn] [Model.hh:69] [Wrn] [Model.hh:69] Skipping serialization / deserialization for models with //pose/@relative_to attribute. [GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N3sdf3v125WorldE], which doesn't have `operator>>`. Component will not be deserialized. [Dbg] [SimulationRunner.cc:262] Rewinding simulation back to time zero. [Dbg] [SimulationRunner.cc:262] Rewinding simulation back to time zero. [GUI] [Wrn] [Model.hh:49] Unable to serialize sdf::Model [GUI] [Wrn] [Model.hh:49] Unable to serialize sdf::Model [GUI] [Wrn] [Model.hh:49] Unable to serialize sdf::Model [GUI] [Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v125WorldE], which doesn't have `operator<<`. Component will not be serialized. [GUI] [Wrn] [Model.hh:49] Unable to serialize sdf::Model [GUI] [Wrn] [Model.hh:49] Unable to serialize sdf::Model 
$\endgroup$

1 Answer 1

0
$\begingroup$

I guess the problem is that Gazebo Fortress doesn't support the reset of the world. As you can see from the output below if I call the service ign service -s /world/minimal_scene/control --reqtype ignition.msgs.WorldControl --reptype ignition.msgs.Boolean --timeout 5000 --req 'reset: {model_only: true}, pause: true' data: true to reset just the world (and not the time of the simulation), I get the following error:

[Wrn] [SimulationRunner.cc:1138] Model only reset is not supported. 

Consequently, I guess, it doesn't support the reset with the all option, since all options try to reset both the time (successfully) and the world (unsuccessfully).

I also opened an issue on GitHub that might be relevant. Unfortunately, it was closed since there is no plan to back-port the model_only option to Fortress.

$\endgroup$
1
  • $\begingroup$ Thanks for your reply! I am currently using remove and create to reset my model. I'll try a different version or another simulator like Issac Sim in the future. $\endgroup$ Commented Mar 18 at 12:32

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.