Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting Gui in System plugin and order of loading plugins

I want to try to set the Gui while running the simulator like this:

namespace gazebo { class SystemGUI : public SystemPlugin {

private: rendering::UserCameraPtr userCam;
private: std::vector<event::ConnectionPtr> connections;

public: SystemGUI() : SystemPlugin() { }

public: virtual ~SystemGUI()

public: void Load(int /*_argc*/, char ** /*_argv*/)
        std::bind(&SystemGUI::Update, this)));

private: void Init()

private: void Update()

  if (!this->userCam)
    this->userCam = gui::get_active_camera();

    if (this->userCam != NULL)

      const ignition::math::Angle &yaw = 0;     

  rendering::ScenePtr scene = rendering::get_scene();

  if (!scene || !scene->Initialized())

  if (scene->GetVisual("ground_plane"))
    std::cout << "Has ground plane visual\n";



but unfortunately the Yaw is not set to 0. Any idea how I can set the Gui while my simulation is running? I run Gazebo like this: gzclient -g

The main goal is to run the whole simulator like: roslaunch simulator_world simulator.launch My world file ends with:

<plugin name="simulator_system" filename=""/> <plugin name="simulator_world" filename=""/>

But this way the System plugin will exit prematurely Thanks in advance