skeleton_tracker CMake Error

asked 2015-11-06 15:13:22 -0600

adelleodel gravatar image

updated 2015-11-06 15:23:24 -0600

Hi there, i don't know what's wrong with my system. i'm using ROS Indigo, Ubuntu 14.04LTS and want to connect Kinect Xbox360 to dynamixel. i try roslaunch skeleton_marker skeleton.launch and succesfully launch. so after that i want to connect it with my system so i make my CMakeList like this:

cmake_minimum_required(VERSION 2.8.3)
project(mocap)
find_package(catkin REQUIRED COMPONENTS
  dynamixel_controllers
  dynamixel_driver
  dynamixel_msgs
  geometry_msgs
  joint_state_publisher
  visualization_msgs
  message_generation
  nav_msgs
  openni_tracker
  roscpp
  rospy
  rviz
  std_msgs
  tf
  urdf
)

find_package(orocos_kdl REQUIRED)
find_package(PkgConfig)
pkg_check_modules(OpenNI REQUIRED libopenni)

# Find Glut
find_package(GLUT REQUIRED)

# Find OpenGL
find_package(OpenGL REQUIRED) 

link_directories(
  ${catkin_LIBRARY_DIRS}
  ${orocos_kdl_LIBRARY_DIRS}
  ${OpenNI_LIBRARIES}
  ${GLUT_LIBRARIES}
  ${OPENGL_INCLUDE_DIR}
)

find_library(orocos_kdl_LIBRARY NAMES ${orocos_kdl_LIBRARIES} PATHS
${orocos_kdl_LIBRARY_DIRS} NO_DEFAULT_PATH)
set(orocos_kdl_LIBRARIES ${orocos_kdl_LIBRARY})

find_library(LIBFREENECT_LIBRARY
  NAMES freenect
  PATHS ${LIBFREENECT_LIBRARY_DIRS}
)

catkin_package(
DEPENDS orocos_kdl
)

include_directories(${catkin_INCLUDE_DIRS}
                ${OpenNI_INCLUDE_DIRS}
                ${GLUT_INCLUDE_DIRS}
                ${orocos_kdl_INCLUDE_DIRS}
                ${OPENGL_INCLUDE_DIR}
)

add_executable(skeleton_tracker src/skeleton_tracker.cpp src/KinectController.cpp src/KinectDisplay.cpp)

target_link_libraries(skeleton_tracker
  ${catkin_LIBRARIES}
  ${OpenNI_LIBRARIES}
  ${GLUT_LIBRARIES}
  ${OPENGL_LIBRARIES}  
  ${orocos_kdl_LIBRARIES})

and i got this kind of error :

 CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
orocos_kdl_LIBRARY
    linked by target "skeleton_tracker" in directory /home/adelleodel/rosadel/src/mocap

-- Configuring incomplete, errors occurred!
See also "/home/adelleodel/rosadel/build/CMakeFiles/CMakeOutput.log".
See also "/home/adelleodel/rosadel/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

so, what's wrong with my CMakeList? and there's skeleton.tracker.cpp in my directory /home/adelleodel/rosadel/src/mocap

this is CMakeList.txt in the skeleton_markers package :

cmake_minimum_required(VERSION 2.8.3)
project(skeleton_markers)

find_package(catkin REQUIRED COMPONENTS
    roscpp
    rospy
    tf
    geometry_msgs
        std_msgs
        visualization_msgs
    message_generation)

# Find Orocos KDL
find_package(orocos_kdl REQUIRED)

# Find OpenNI
find_package(PkgConfig)
pkg_check_modules(OpenNI REQUIRED libopenni)

# Find Glut
find_package(GLUT REQUIRED)

# Find OpenGL
find_package(OpenGL REQUIRED) 

link_directories(
  ${catkin_LIBRARY_DIRS}
  ${orocos_kdl_LIBRARY_DIRS}
  ${OpenNI_LIBRARIES}
  ${GLUT_LIBRARIES}
  ${OPENGL_INCLUDE_DIR}
)

include_directories(${catkin_INCLUDE_DIRS}
                    ${OpenNI_INCLUDE_DIRS}
                    ${GLUT_INCLUDE_DIRS}
                    ${orocos_kdl_INCLUDE_DIRS}
                    ${OPENGL_INCLUDE_DIR}
)    

add_message_files (
  FILES
  Skeleton.msg
)

generate_messages(
    DEPENDENCIES geometry_msgs std_msgs
)

catkin_package(
    DEPENDS 
    CATKIN_DEPENDS 
    rospy
roscpp
message_runtime
openni_camera
openni_tracker
tf
visualization_msgs
std_msgs
geometry_msgs
)

add_executable(skeleton_tracker
  src/skeleton_tracker.cpp
  src/KinectController.cpp
  src/KinectDisplay.cpp)

target_link_libraries(skeleton_tracker
  ${catkin_LIBRARIES}
  ${OpenNI_LIBRARIES}
  ${GLUT_LIBRARIES}
  ${OPENGL_LIBRARIES}  
  ${orocos_kdl_LIBRARIES})

#install(TARGETS skeleton_tracker RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

message("DEBUG variable catkin_INCLUDE_DIRS: ${catkin_INCLUDE_DIRS}")
message("DEBUG variable OpenNI_INCLUDE_DIRS: ${OpenNI_INCLUDE_DIRS}")
message("DEBUG variable GLUT_INCLUDE_DIRS: ${GLUT_INCLUDE_DIRS}")
message("DEBUG variable orocos_kdl_INCLUDE_DIRS: ${orocos_kdl_INCLUDE_DIRS}")
edit retag flag offensive close merge delete