Gazebo | Ignition | Community
Ask Your Question

Symbol Lookup Error in Example Plugin

asked 2013-12-14 18:24:42 -0500

amptrofa gravatar image

updated 2013-12-15 17:43:33 -0500

I have compiled the tutorial plugin from

When I run Gazebo with the plugin, I get the following symbol lookup error:

gazebo: symbol lookup error: /<...>/build/ undefined symbol:

I am using the CMakeLists.txt from the tutorial linked above. I have removed all other Gazebo installations from my system. I have upgraded to the most recent version of Gazebo for my system: 1.9.2-1~precise.

The same error appears in this question, but I am not using ROS, as this user appears to be.

Any suggestions?

UPDATE: I upgraded to Gazebo 2.1.0-1~precise, and using the updated plugin from examples/plugins/system_gui_plugin, I no longer get the undefined symbol error (although the plugin doesn't work for other reasons)

However, in the presentation example plugin, after making a few changes to compile the plugin, I still get the following undefined symbol error:

Error [Plugin.hh:141] Failed to load plugin <...>/presentation/build/
<...>/presentation/build/ undefined symbol:

Commenting out the gui::Events::ConnectKeyPress line gets rid of the error. gazebo::gui::Events::keyPress is never accessed explicitly in this plugin.

Key presses are what I'm really after here. This looks to me like something wrong within Gazebo, as compiled, and not in the plugin itself. Am I right about that? Is there anything I can do about it?

P.S. If I have organized my updates to this post in a sub-optimal way, please let me know and I will try to reorganize it. I put things where I thought it made sense to.

Also, for reference, the necessary changes to get the plugin to compile:

  1. Change the Load() function declaration to public: void Load(int /*_argc*/, char ** /*_argv*/)
  2. Line 135 rendering::Scene* becomes rendering::ScenePtr
  3. Line 144 inputs to userCam->MoveToPosition must be reorganized into 2 arguments: a pose and duration.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-12-15 14:53:51 -0500

amptrofa gravatar image

updated 2013-12-15 17:19:10 -0500

I tried to compile and run the presentation example plugin and realized that the entire gazebo::gui namespace was giving undefined symbol errors.

Then I saw this pull request, which reportedly fixes the issue and was merged into Gazebo 2.0.

I will update this post shortly when I upgrade to Gazebo 2.0 2.1 and confirm that everything is working.

UPDATE: The wiki-sourced plugin linked in the original question is out-of-date for Gazebo 2.0+, but the one in examples/plugins/systemguiplugin compiles and doesn't generate any symbol errors. However, it does result in an error:

gazebo: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->()
const [with T = gazebo::rendering::UserCamera]: Assertion `px != 0' failed.

From what I can tell this is due to the fact that the SystemPlugin's Init() function is called before the scene is created, so this->userCam is NULL when


is executed. I have not found a way around this.

Much more important to me, the undefined symbol error in the presentation example plugin persists. The original question is essentially unchanged, so I'm updating the question with further details.

edit flag offensive delete link more


in order to receive the camera plugin try waiting until the scene is updated, maybe in an OnUpdate function check if the time is different from 0 : gui::get_active_camera() -&gt; GetScene() -&gt; GetSimTime() == common::Time::Zero and only continue afterwards, I also had this issue and this was my workaround

AndreiHaidu gravatar imageAndreiHaidu ( 2013-12-16 03:26:07 -0500 )edit

Question Tools


Asked: 2013-12-14 18:24:42 -0500

Seen: 985 times

Last updated: Dec 15 '13