"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:
my_robot 0.2.0
An automatically generated package with all the configuration and launch files for using the arm_base with the MoveIt Motion Planning Framework MoveIt Setup Assistant MoveIt Setup Assistant BSD http://moveit.ros.org/ https://github.com/ros-planning/moveit_setup_assistant/issues https://github.com/ros-planning/moveit_setup_assistant moveit_ros_move_group moveit_planners_ompl moveit_ros_visualization joint_state_publisher robot_state_publisher xacro my_robot_description my_robot_description catkin kdl_parser pluginlib moveit_core moveit_ros_planning_interface moveit_ros_perception cmake_modules geometric_shapes kdl_parser pluginlib moveit_core moveit_fake_controller_manager moveit_ros_planning_interface moveit_ros_perception
please help me ! Appreciate it
↧