Can't compile custom plugin
Hi! I'm doing the Gazebo tutorial on making your own plugin. I'm currently on the Control plugin part, but when I try running make (after cmake ..
) I get the following error:
~/Developer/Gazebo/velodyne_plugin/build$ make
Scanning dependencies of target velodyne_plugin
[ 50%] Building CXX object CMakeFiles/velodyne_plugin.dir/velodyne_plugin.cc.o
/home/martint/Developer/Gazebo/velodyne_plugin/velodyne_plugin.cc: In member function ‘virtual void gazebo::VelodynePlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/martint/Developer/Gazebo/velodyne_plugin/velodyne_plugin.cc:23:8: error: invalid use of incomplete type ‘class gazebo::physics::Model’
_model->GetName() << "]\n";
^
In file included from /usr/include/gazebo-7/gazebo/common/Plugin.hh:49:0,
from /usr/include/gazebo-7/gazebo/common/common.hh:34,
from /usr/include/gazebo-7/gazebo/gazebo_core.hh:19,
from /usr/include/gazebo-7/gazebo/gazebo.hh:20,
from /home/martint/Developer/Gazebo/velodyne_plugin/velodyne_plugin.cc:4:
/usr/include/gazebo-7/gazebo/physics/PhysicsTypes.hh:37:11: note: forward declaration of ‘class gazebo::physics::Model’
class Model;
^
My code and folder structure is exactly as in the tutorial, and I've installed Gazebo using apt install gazebo7
. My OS is Ubuntu 16.04. Gazebo runs fine otherwise, and I've been able to follow several tutorials without errors. Thankful for any help :)