Robotics StackExchange | Archived questions

kdl_parser problems with moveit catkin

"CMake Error at my_robot/CMakeLists.txt:31 (target_link_libraries):
  Target "kdl_parser" of type EXECUTABLE may not be linked into another
  target.  One may link only to STATIC or SHARED libraries, or to executables
  with the ENABLE_EXPORTS property set.


-- Configuring incomplete, errors occurred!
See also "/home/jeff/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jeff/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed"

like this,please help me!

my CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(my_robot)


find_package(catkin REQUIRED COMPONENTS
             moveit_core
             moveit_ros_planning
             moveit_ros_planning_interface
             pluginlib
             cmake_modules#for eigen in indigo
             geometric_shapes
)

find_package(cmake_modules REQUIRED)#just for indigo
find_package(Eigen REQUIRED)#It makes some changes in indigo

catkin_package(
    CATKIN_DEPENDS
    moveit_core
    moveit_ros_planning_interface
    kdl_parser
)

#include_directories(SYSTEM ${Boost_INCLUDE_DIR} ${EIGEN_INCLUDE_DIRS})
include_directories(${catkin_INCLUDE_DIRS} ${Eigen_INCLUDE_DIRS})

install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

add_executable(moveit_node src/moveit_node.cpp)
target_link_libraries(moveit_node ${catkin_LIBRARIES})
#link_directories(${catkin_SHARED_DIRS})

and my package.xml:

<package>

  <name>my_robot</name>
  <version>0.2.0</version>
  <description>
     An automatically generated package with all the configuration and launch files for using the arm_base with the MoveIt Motion Planning Framework
  </description>
  <author email="assistant@moveit.ros.org">MoveIt Setup Assistant</author>
  <maintainer email="assistant@moveit.ros.org">MoveIt Setup Assistant</maintainer>

  <license>BSD</license>

  <url type="website">http://moveit.ros.org/</url>
  <url type="bugtracker">https://github.com/ros-planning/moveit_setup_assistant/issues</url>
  <url type="repository">https://github.com/ros-planning/moveit_setup_assistant</url>

  <run_depend>moveit_ros_move_group</run_depend>
  <run_depend>moveit_planners_ompl</run_depend>
  <run_depend>moveit_ros_visualization</run_depend>
  <run_depend>joint_state_publisher</run_depend>
  <run_depend>robot_state_publisher</run_depend>
  <run_depend>xacro</run_depend>

  <build_depend>my_robot_description</build_depend>
  <run_depend>my_robot_description</run_depend>
  <!--<run_depend>cmake_modules</run_depend>-->
  <buildtool_depend>catkin</buildtool_depend>

  <build_depend>kdl_parser</build_depend>
  <build_depend>pluginlib</build_depend>
  <build_depend>moveit_core</build_depend>
  <build_depend>moveit_ros_planning_interface</build_depend>
  <build_depend>moveit_ros_perception</build_depend>
  <build_depend>cmake_modules</build_depend>
  <build_depend>geometric_shapes</build_depend>

  <run_depend>kdl_parser</run_depend>
  <run_depend>pluginlib</run_depend>
  <run_depend>moveit_core</run_depend>
  <run_depend>moveit_fake_controller_manager</run_depend>
  <run_depend>moveit_ros_planning_interface</run_depend>
  <run_depend>moveit_ros_perception</run_depend>


</package>

please help me ! Appreciate it

Asked by WuJeff on 2016-05-01 03:50:25 UTC

Comments

Please format console copy/pastes, (c++) code and xml (manifests) as Preformatted Text. Select the text and click the button with 101010 on it or use ctrl+k. Thanks.

Asked by gvdhoorn on 2016-05-01 04:47:38 UTC

ok,that's it

Asked by WuJeff on 2016-05-02 05:00:50 UTC

I have solved it

Asked by WuJeff on 2016-05-02 08:56:01 UTC

Ok. Good to hear. Please post your solution as an answer and accept your own answer. That way future readers will also know how to solve it.

Asked by gvdhoorn on 2016-05-02 09:13:58 UTC

Answers