Failing to get default scene - When and how does the default scene gets created?

asked 2020-02-02 10:50:42 -0600

nlamprian gravatar image

I'm working on a World plugin, and I'm having trouble with its initialization. The plugin is pretty much empty so far, and for testing, I'm using a world that includes some random model and my plugin (no relation between the two).

Let's consider the following:

  • In the Load method of my plugin, I connect to the create-scene event. The callback is never called
  • If I try to get the default scene, during initialization or at any later point (eg world begin events), I get an error that there are no scenes
  • If I instead try to create a scene, gazebo crashes
  • If I add a camera sensor to the model I include in the world, everything is initialized as expected. The create-scene event is triggered, and I'm able to get the scene

The question now is what happens when the camera sensor is added in the mix, that it doesn't happen otherwise. What do I need to do to have the default scene created? Looking inside the CameraSensor class, I'm not getting any hints.

edit retag flag offensive close merge delete