error loading camera plugin plugin.hh:180
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
GZ_REGISTER_SENSOR_PLUGIN(RobotCameraPlugin)
}
No matter what I do, I always get this error:
[Err] [Plugin.hh:180] Failed to load plugin librifsimulator_camera.so: librifsimulator_camera.so: 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">
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<plugin name="rifsimulator_camera" filename="librifsimulator_camera.so"/>
</world>
</sdf>
but the problem still exists. I already created a new catkin_ws folder, but without any effect. Any idea what's happening?
Thanks, Peter
Asked by PeterHer on 2019-10-08 09:45:41 UTC
Comments
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?
Asked by kumpakri on 2019-10-08 10:39:29 UTC
what to try this example: https://github.com/SMARTlab-Purdue/ros-tutorial-gazebo-simulation/wiki/Sec.-4:-Creating-a-light-sensor-plugin
All my other plugins are working correctly.
Asked by PeterHer on 2019-10-08 10:51:23 UTC
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
Asked by PeterHer on 2019-10-08 10:57:06 UTC
latest error: [Err] [Plugin.hh:180] Failed to load plugin /home/peter/catkin_ws/devel/lib/librifsimulator_camera.so: /home/peter/catkin_ws/devel/lib/librifsimulator_camera.so: undefined symbol: _ZTIN6gazebo12CameraPluginE
Asked by PeterHer on 2019-10-08 11:00:34 UTC
problem solved. killed all processes, recompiled all ros packages. Strange!
Asked by PeterHer on 2019-10-08 11:21:25 UTC