Skip to content

Commit

Permalink
addressed Eigen3 dependency on constrained_ik package
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgnicho committed Mar 22, 2017
1 parent ca465d9 commit 42b6278
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 41 deletions.
48 changes: 22 additions & 26 deletions constrained_ik/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,33 @@ find_package(catkin REQUIRED COMPONENTS
## System dependencies are found with CMake's conventions
find_package(orocos_kdl REQUIRED)
find_package(Boost REQUIRED)
find_package(Eigen REQUIRED)

# We don't build anything here, but in order to export the right
# build flags in catkin_package(), we still have to find Eigen3 here. Note
# that this is somewhat complicated because of our need to support Ubuntu
# all the way back to saucy. First we look for the Eigen3 cmake module
# provided by the libeigen3-dev on newer Ubuntu. If that fails, then we
# fall-back to the version provided by cmake_modules, which is a stand-in.
find_package(Eigen3 QUIET)
if(NOT EIGEN3_FOUND)
# saucy does not have Eigen3, but have Eigen instead
find_package(cmake_modules REQUIRED)
find_package(Eigen REQUIRED)
set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
endif()

# Note that eigen 3.2 (on Ubuntu Wily) only provides EIGEN3_INCLUDE_DIR,
# not EIGEN3_INCLUDE_DIRS, so we have to set the latter from the former.
if(NOT EIGEN3_INCLUDE_DIRS)
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()

#add dynamic reconfigure api
generate_dynamic_reconfigure_options(
cfg/CLIKDynamic.cfg
cfg/CLIKPlannerDynamic.cfg
)

#######################################
## Declare ROS messages and services ##
#######################################

## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
# DEPENDENCIES
# std_msgs # Or other packages containing msgs
# )

###################################
## catkin specific configuration ##
Expand All @@ -68,7 +64,7 @@ generate_dynamic_reconfigure_options(
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS}
INCLUDE_DIRS include ${catkin_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}
LIBRARIES constrained_ik constrained_ik_constraints moveit_clik_planner_plugin constrained_ik_plugin
CATKIN_DEPENDS roscpp urdf eigen_conversions tf_conversions urdf moveit_ros_planning moveit_core dynamic_reconfigure kdl_parser cmake_modules industrial_collision_detection
DEPENDS boost eigen orocos_kdl
Expand All @@ -80,7 +76,7 @@ catkin_package(

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS})
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS})

## Declare a cpp library
add_library(constrained_ik
Expand Down
19 changes: 4 additions & 15 deletions stomp_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,7 @@ find_package(catkin REQUIRED COMPONENTS
cmake_modules
)


find_package(Eigen3 QUIET)
if(NOT EIGEN3_FOUND)
# saucy does not have Eigen3, but have Eigen instead
find_package(cmake_modules REQUIRED)
find_package(Eigen REQUIRED)
set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
endif()

if(NOT EIGEN3_INCLUDE_DIRS)
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()
find_package(Eigen REQUIRED)

add_definitions("-std=c++11")

Expand All @@ -28,10 +17,10 @@ add_definitions("-std=c++11")
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS include
INCLUDE_DIRS include ${EIGEN_INCLUDE_DIRS}
LIBRARIES stomp_core
CATKIN_DEPENDS roscpp cmake_modules
DEPENDS EIGEN3
DEPENDS eigen
)

###########
Expand All @@ -41,7 +30,7 @@ include_directories(
include
examples
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${EIGEN_INCLUDE_DIRS}
)

## Declare a C++ library
Expand Down

0 comments on commit 42b6278

Please sign in to comment.