Home | Tutorials | Wiki | Issues
Ask Your Question
0

error during building velodyne plugin

asked 2016-08-31 05:20:19 -0500

hari1234 gravatar image

updated 2016-08-31 07:57:29 -0500

I was following this tutorial, but as i try to build the plugin file velodyne_plugin.cc i get this error:

/home/rob/velodyne_plugin/velodyne_plugin.cc: In member function ‘virtual void gazebo::VelodynePlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/rob/velodyne_plugin/velodyne_plugin.cc:23:15: error: invalid use of incomplete type ‘class gazebo::physics::Model’
         _model->GetName() << "]\n";
               ^
In file included from /usr/include/gazebo-2.2/gazebo/common/Plugin.hh:41:0,
                 from /usr/include/gazebo-2.2/gazebo/common/common.hh:28,
                 from /usr/include/gazebo-2.2/gazebo/gazebo_core.hh:19,
                 from /usr/include/gazebo-2.2/gazebo/gazebo.hh:20,
                 from /home/rob/velodyne_plugin/velodyne_plugin.cc:4:
/usr/include/gazebo-2.2/gazebo/physics/PhysicsTypes.hh:36:11: error: forward declaration of ‘class gazebo::physics::Model’
     class Model;

How can i remove this?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-08-31 11:54:24 -0500

chapulina gravatar image

See this question. The problem can be solved by adding the following include to your cc file:

#include <gazebo/physics/Model.hh>
edit flag offensive delete link more

Comments

thank u, i searched the question list for the existing problem using the velodyne keywords, but didn't get so, i posted.

hari1234 gravatar imagehari1234 ( 2016-08-31 12:09:11 -0500 )edit

No problem, I only knew about it because I see this coming up over and over again. I'll fix the tutorial today.

chapulina gravatar imagechapulina ( 2016-08-31 12:38:30 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-08-31 05:20:19 -0500

Seen: 340 times

Last updated: Aug 31 '16