error loading camera plugin plugin.hh:180

asked 2019-10-08 09:45:41 -0500

PeterHer gravatar image

updated 2019-10-08 10:24:03 -0500

kumpakri gravatar image

Together with all my other plugins I added this one:

#include <gazebo/plugins/CameraPlugin.hh>
using namespace std;

namespace gazebo
  class RobotCameraPlugin : public CameraPlugin

    public: RobotCameraPlugin(): CameraPlugin()

    public: virtual ~RobotCameraPlugin()

    public: void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf)

    private: void Init()


  // Register this plugin with the simulator

No matter what I do, I always get this error:

 [Err] [Plugin.hh:180] Failed to load plugin cannot open shared object file: No such file or directory

The file exists in the /home/peter/catkin_ws/devel folder.

I tried to isolate the problem by using only the bare code as shown above and a basic world file:

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="default">



  <plugin name="rifsimulator_camera" filename=""/>


but the problem still exists. I already created a new catkin_ws folder, but without any effect. Any idea what's happening?

Thanks, Peter

edit retag flag offensive close merge delete


What are you trying to do anyway? The sensor plugins must be applied to a link or joint. Is this path where your plugin is located included in your GAZEBO_PLUGIN_PATH system variable?

kumpakri gravatar imagekumpakri ( 2019-10-08 10:39:29 -0500 )edit

what to try this example:

All my other plugins are working correctly.

PeterHer gravatar imagePeterHer ( 2019-10-08 10:51:23 -0500 )edit

I just did: export GAZEBO_PLUGIN_PATH=/home/peter/catkin_ws/devel/lib Now every plugin fails, but all the plugins are located in /home/peter/catkin_ws/devel/lib

PeterHer gravatar imagePeterHer ( 2019-10-08 10:57:06 -0500 )edit

latest error: [Err] [Plugin.hh:180] Failed to load plugin /home/peter/catkin_ws/devel/lib/ /home/peter/catkin_ws/devel/lib/ undefined symbol: _ZTIN6gazebo12CameraPluginE

PeterHer gravatar imagePeterHer ( 2019-10-08 11:00:34 -0500 )edit

problem solved. killed all processes, recompiled all ros packages. Strange!

PeterHer gravatar imagePeterHer ( 2019-10-08 11:21:25 -0500 )edit