0
$\begingroup$

Rosanswers logo

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/gazebo_ros_pkgs/blob/hydro-devel/gazebo_plugins/include/gazebo_plugins/gazebo_ros_moveit_planning_scene.h#L50-L82

Edit: This is a cross-post of https://groups.google.com/forum/#!msg/moveit-users/C5r9Liqh6rU/qezMdDjoAgAJ, http://answers.gazebosim.org/question/18783/using-gazebo-plugin-with-h-file-type/, and https://stackoverflow.com/questions/49288356/using-gazebo-plugin-with-h-file-type.


Originally posted by stans on ROS Answers with karma: 3 on 2018-03-14

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by gvdhoorn with karma: 86574 on 2018-03-15

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-03-15:
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.

Comment by stans on 2018-03-15:
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.

Comment by gvdhoorn on 2018-03-15:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.