Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo Tutorial: Build error

asked 2016-04-13 09:09:43 -0600

talha gravatar image

updated 2016-04-13 13:09:50 -0600

I am going through the following tutorial link . Have been struggling with a build error at step 5. Below is the output of the compiler.

[100%] Building CXX object CMakeFiles/velodyne_plugin.dir/velodyne_plugin.cc.o                                                                                                                                     
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc: In member function ‘virtual void gazebo::VelodynePlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:                                       
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:30:11: error: ‘class gazebo::VelodynePlugin’ has no member named ‘model’                                                                           
     this->model = _model;                                                                                                                                                                                         
           ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:34:11: error: ‘class gazebo::VelodynePlugin’ has no member named ‘joint’
     this->joint = _model->GetJoints()[0];
           ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:37:11: error: ‘class gazebo::VelodynePlugin’ has no member named ‘pid’
     this->pid = common::PID(0.1, 0, 0);
           ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:40:11: error: ‘class gazebo::VelodynePlugin’ has no member named ‘model’
     this->model->GetJointController()->SetVelocityPID(
           ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:41:13: error: ‘class gazebo::VelodynePlugin’ has no member named ‘joint’
       this->joint->GetScopedName(), this->pid);
             ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:41:43: error: ‘class gazebo::VelodynePlugin’ has no member named ‘pid’
       this->joint->GetScopedName(), this->pid);
                                           ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:45:11: error: ‘class gazebo::VelodynePlugin’ has no member named ‘model’
     this->model->GetJointController()->SetVelocityTarget(
           ^
/home/talha/techveda/gaz_tut/velodyne_plugin/velodyne_plugin.cc:46:13: error: ‘class gazebo::VelodynePlugin’ has no member named ‘joint’
       this->joint->GetScopedName(), 10.0);
             ^
make[2]: *** [CMakeFiles/velodyne_plugin.dir/velodyne_plugin.cc.o] Error 1
make[1]: *** [CMakeFiles/velodyne_plugin.dir/all] Error 2
make: *** [all] Error 2

I am using the default CMake build script provided in the tutorial. Also i am running ubuntu 14.04 + gazebo 6.6.0 + GCC 4.8.4. I am not sure what i am doing wrong here, i have looked through gazebo plugins source code and pretty much every default plugin interface uses the same method. Also i do not have any other versions of gazebo installed on my machine for causing any version conflicts. I have sourced the setup files. Being a noob i'm a little out of depth here. Any help would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

Maybe the tutorial is skipping some steps. Have you tried compiling the code under "Create an API" -> 4.?

chapulina gravatar imagechapulina ( 2016-04-13 13:17:54 -0600 )edit

Yes thank you. How stupid of me. The latter part of the tutorial includes the data members of the class. Although it is a bit misleading since it does instruct you to build the plugin without properly declaring all the required data members. Thank you for pointing me in the right direction.

talha gravatar imagetalha ( 2016-04-13 15:15:59 -0600 )edit

Glad it works now, I ticketed an issue and added an answer.

chapulina gravatar imagechapulina ( 2016-04-13 15:22:32 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-04-13 15:21:55 -0600

It looks like the tutorial is incomplete, I ticketed an issue on gazebo_tutorials.

For now, skip to the code in "Create an API" -> 4.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-04-13 09:08:23 -0600

Seen: 1,673 times

Last updated: Apr 13 '16