Building gazebo plugins with eclipse
Hello,
I'm trying to set up a gazebo plugin project under Eclipse. I'm using a simple example to try to make it work, but for some reason, it won't link against the SDFormat libararies.
I've set up the plugin and added the header files that are installed in my /user/include path, and the IDE picks them up just fine.
But, when I compile, it errors on public: void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
The error is: 'ElementPtr’ in namespace ‘sdf’ does not name a type
I've provided paths to the SDFormat libraries (libsdformat.so, libsdformat.so.4, libsdformat.so.4.1.1), so it should see everything fine.
Compiling using the cmake / make process outlined in the tutorials works ok, bu tI really want to do this from an Eclipse environment.
Any tips?
The sample code:
#ifndef SONARLISTENER_H_
#define SONARLISTENER_H_
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <sdf/Element.hh>
namespace gazebo {
class SonarListener: public gazebo::ModelPlugin {
public:
SonarListener();
virtual ~SonarListener();
public: void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
};
}