Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have created the following plugin:

namespace gazebo
{
  class SystemGUI : public SystemPlugin
  {
    private: rendering::UserCameraPtr userCam;
    public: void Load(int /*_argc*/, char ** /*_argv*/)
    {
    }

    private: void Init()
    {
      // Get a pointer to the active user camera
      this->userCam = gui::get_active_camera();
    }

  };
  GZ_REGISTER_SYSTEM_PLUGIN(SystemGUI)
}

But unfortunately, after compiling it, I get at run time the following problem:

/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/bin/gzserver: symbol lookup error: ...../ros_workspace/lightPlugin/lib/liblightPlugin.so: undefined symbol: _ZN6gazebo3gui17get_active_cameraEv

Any idea?

The manifest.xml is like this:

<package>
      <description brief="lightPlugin">

         lightPlugin

      </description>
      <author>maurizio</author>
      <license>BSD</license>
      <review status="unreviewed" notes=""/>
      <url>http://ros.org/wiki/lightPlugin</url>
      <depend package="gazebo"/>
     <export>
        <gazebo plugin_path="${prefix}/lib" gazebo_media_path="${prefix}" />
      </export>


    </package>

I have created the following plugin:

#include "gui/Gui.hh"
#include "rendering/rendering.hh"
#include "gazebo.hh"

    namespace gazebo
 {
   class SystemGUI : public SystemPlugin
   {
     private: rendering::UserCameraPtr userCam;
     public: void Load(int /*_argc*/, char ** /*_argv*/)
     {
     }

     private: void Init()
     {
       // Get a pointer to the active user camera
       this->userCam = gui::get_active_camera();
     }

   };
   GZ_REGISTER_SYSTEM_PLUGIN(SystemGUI)
 }

But unfortunately, after compiling it, I get at run time the following problem:

/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/bin/gzserver: symbol lookup error: ...../ros_workspace/lightPlugin/lib/liblightPlugin.so: undefined symbol: _ZN6gazebo3gui17get_active_cameraEv

Any idea?

The manifest.xml is like this:

<package>
      <description brief="lightPlugin">

         lightPlugin

      </description>
      <author>maurizio</author>
      <license>BSD</license>
      <review status="unreviewed" notes=""/>
      <url>http://ros.org/wiki/lightPlugin</url>
      <depend package="gazebo"/>
     <export>
        <gazebo plugin_path="${prefix}/lib" gazebo_media_path="${prefix}" />
      </export>


    </package>