Ask Your Question
0

Using Gazebo Plugin with .h File Type

asked 2018-03-14 17:12:13 -0600

stans gravatar image

updated 2018-03-15 14:42:49 -0600

I tried compiling a Gazebo plugin that is a header file (with .h file extension), it says:

CMake Error: CMake can not determine linker language for target: gazebo_ros_moveit_planning_scene
CMake Error: Cannot determine link language for target "gazebo_ros_moveit_planning_scene".

The following is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(gazebo REQUIRED)
include_directories(${GAZEBO_INCLUDE_DIRS})
link_directories(${GAZEBO_LIBRARY_DIRS})
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")

add_library(gazebo_ros_moveit_planning_scene SHARED gazebo_ros_moveit_planning_scene.h)
target_link_libraries(gazebo_ros_moveit_planning_scene ${GAZEBO_LIBRARIES})

Any suggestions for a fix? P.s. I'm trying to use this plugin: https://github.com/jhu-lcsr-forks/gaz...

Edit: This is a cross-post of https://groups.google.com/forum/#!msg... , http://answers.gazebosim.org/question... , and https://stackoverflow.com/questions/4... .

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-03-15 02:45:34 -0600

gvdhoorn gravatar image

updated 2018-03-15 02:54:30 -0600

You cannot compile a header file.

But you also don't need to: jhu-lcsr-forks/gazebo_ros_pkgs/gazebo_plugins/src/gazebo_ros_moveit_planning_scene.cpp.

Note that this plugin is only present in the hydro-devel branches, so might not be compatible with Indigo or later releases of Gazebo.


Edit: any reason you're using that fork specifically? If not, then that plugin is also hosted in the hydro-devel branch of upstream (ie: gazebo_ros_pkgs): ros-simulation/gazebo_ros_pkgs/hydro-devel/gazebo_plugins.

edit flag offensive delete link more

Comments

And this is a cross-post of How to use gazebo world file objects for planning with Moveit on moveit-users. If you must do this, then please mention that in your post.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-15 02:46:42 -0600 )edit

Thanks gvdhoorn! I apologize for the cross-post omission; I was not aware of the need to do so. I have made the necessary edit.

stans gravatar image stans  ( 2018-03-15 14:44:09 -0600 )edit

re: cross-posts: there are no rules about this, other than netiquette. Cross-posts lead to duplication and waste of effort and split discussions. It's just not a very nice thing to do in online communities.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-15 15:58:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-14 17:12:13 -0600

Seen: 228 times

Last updated: Mar 15 '18