Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

model plugin make error

Hi i'm using gazebo 9, ubuntu 18.04 and ros-melodic.

I have a custom quadruped robot model, and a custom model plug-in that I made for use here. Actually these are working fine in other computers, but not mine.

When I try to catkin_make, an error occured described below.

[ 98%] Building CXX object aidinvi/CMakeFiles/sub_aidinvi.dir/src/sub_aidinvi.cpp.o In file included from /usr/include/gazebo-9/gazebo/common/common.hh:36:0,
                 from /usr/include/gazebo-9/gazebo/gazebo_core.hh:19,
                 from /usr/include/gazebo-9/gazebo/gazebo.hh:20,
                 from /home/onesoulkang/catkin_ws/src/aidinvi/src/sub_aidinvi.cpp:2: /usr/include/gazebo-9/gazebo/common/Plugin.hh:420:10: error: expected unqualified-id before string constant
   extern "C" GZ_PLUGIN_VISIBLE gazebo::ModelPlugin *RegisterPlugin(); \
/usr/include/gazebo-9/gazebo/common/Plugin.hh:420:10: note: in definition of macro GZ_REGISTER_MODEL_PLUGIN’
   extern "C" GZ_PLUGIN_VISIBLE gazebo::ModelPlugin *RegisterPlugin(); \
aidinvi/CMakeFiles/sub_aidinvi.dir/build.make:62: recipe for target 'aidinvi/CMakeFiles/sub_aidinvi.dir/src/sub_aidinvi.cpp.o' failed 
make[2]: *** [aidinvi/CMakeFiles/sub_aidinvi.dir/src/sub_aidinvi.cpp.o] Error 1 CMakeFiles/Makefile2:3604: recipe for target 'aidinvi/CMakeFiles/sub_aidinvi.dir/all' failed 
make[1]: *** [aidinvi/CMakeFiles/sub_aidinvi.dir/all] Error 2 
Makefile:140: recipe for target 'all' failed 
make: *** [all] Error 2 Invoking "make -j4 -l4" failed

Does anyone have any suggestions for handling this problem?