[ros-users] orocos_kdl failure on OSX

Kevin Walchko kevin.walchko at gmail.com
Sat Sep 3 17:22:05 UTC 2011


Hi,

[setup]

ROS Electric
OSX Lion with Macports

[Problem]

Eigen3.cmake couldn't find eigen3

[Solution]

Instead of using the included cmake files in orocos_kdl/config/Eigen3.cmake I changed CMakeLists.txt to use pkg-config which macports automatically sets up for OSX. Don't know if Linux does this too.

CMakeLists.txt:
include($ENV{ROS_ROOT}/core/rosbuild/FindPkgConfig.cmake)
pkg_check_modules(EIGEN3 REQUIRED eigen3)
include_directories(${EIGEN3_INCLUDE_DIRS})
#INCLUDE(${PROJ_SOURCE_DIR}/config/FindEigen3.cmake)
#INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})


Not sure why the pkg-config wasn't used in the first place, it seems to work nice.

The included Eigen3.cmake appears to be too limited in where it looks, at least for OSX. Could add /opt/local/include/eigen3 but didn't try.

config/Eigen3.cmake:
FIND_PATH(EIGEN3_INCLUDE_DIR Eigen/Core /usr/include /usr/include/eigen3)

Thanks.

Kevin




More information about the ros-users mailing list