Eclipse generates odd build errors on plugin tutorial

asked 2016-12-23 22:52:31 -0500

graffy gravatar image


I've been setting up Eclipse to use as my IDE for developing Gazebo plugins.

I've been working through the contact sensor tutorial and have had a problem (similar to what I've seen on other tutorials).

Specifically, the following lines in the implementation file (.cc) generate respective errors:




The type 'gazebo::PluginContact' must implement the inherited pure virtual method 'gazebo::SensorPlugin::Load'


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


Member declaration not found

code (in OnUpdate() function):

contacts = this->parentSensor->Contacts();


Method 'Contacts' could not be resolved


no matching function for call to 'gazebo::sensors::ContactSensor::ContactSensor(gazebo::msgs::Contacts)'

What's really confusing is that, despite these errors, it still builds the plugin. Running make form the command line does as well, with no errors reported.

The error with the plugin macro has to do with the Load() function, obviously. And a little playing around has me thinking it's the sdf::ElementPtr paramter that's the cause of the trouble with the missing function declaration.

But I'm really confused. I have no idea why Eclipse seems to think I have these major problems with my class definition, and yet it builds the file without issue.

I can try to ignore it, but if I really want to use Eclipse to do development, this will get to be a tedious problem, even if it doesn't prevent the project from building.

edit retag flag offensive close merge delete