diff --git a/ati_ft_sensor/CMakeLists.txt b/ati_ft_sensor/CMakeLists.txt index 53f15934..429580df 100644 --- a/ati_ft_sensor/CMakeLists.txt +++ b/ati_ft_sensor/CMakeLists.txt @@ -1,26 +1,48 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(ati_ft_sensor) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + roslib geometry_msgs cmake_modules robotis_math ) -find_package(Eigen REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CATKIN_DEVEL_PREFIX}/lib/pkgconfig") -find_package(PkgConfig) -pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -31,11 +53,13 @@ pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES ati_ft_sensor + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS roscpp roslib geometry_msgs cmake_modules robotis_math + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -44,18 +68,19 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} - ${yaml_cpp_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -add_library(ati_ft_sensor src/ati_force_torque_sensor_twe.cpp) -add_dependencies(ati_ft_sensor ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(ati_ft_sensor ${yaml_cpp_LIBRARIES} ${catkin_LIBRARIES}) +add_library(${PROJECT_NAME} src/ati_force_torque_sensor_twe.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS ati_ft_sensor +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/motion_module_tutorial/CMakeLists.txt b/motion_module_tutorial/CMakeLists.txt index 0365ecba..785251a2 100644 --- a/motion_module_tutorial/CMakeLists.txt +++ b/motion_module_tutorial/CMakeLists.txt @@ -1,19 +1,27 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(motion_module_tutorial) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + std_msgs robotis_framework_common ) +find_package(Boost REQUIRED COMPONENTS thread) + +################################################################################ +# Setup for python modules and scripts +################################################################################ + ################################################################################ # Declare ROS messages, services and actions ################################################################################ @@ -23,12 +31,13 @@ find_package(catkin REQUIRED COMPONENTS ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES motion_module_tutorial - CATKIN_DEPENDS roscpp robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS roscpp std_msgs robotis_framework_common + DEPENDS Boost ) ################################################################################ @@ -37,18 +46,17 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ) -add_library(motion_module_tutorial - src/${PROJECT_NAME}/motion_module_tutorial.cpp -) - -add_dependencies(motion_module_tutorial ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +add_library(${PROJECT_NAME} src/${PROJECT_NAME}/motion_module_tutorial.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS motion_module_tutorial +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/sensor_module_tutorial/CMakeLists.txt b/sensor_module_tutorial/CMakeLists.txt index 456eaa6c..08f5d778 100644 --- a/sensor_module_tutorial/CMakeLists.txt +++ b/sensor_module_tutorial/CMakeLists.txt @@ -1,19 +1,27 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(sensor_module_tutorial) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + std_msgs robotis_framework_common ) +find_package(Boost REQUIRED COMPONENTS thread) + +################################################################################ +# Setup for python modules and scripts +################################################################################ + ################################################################################ # Declare ROS messages, services and actions ################################################################################ @@ -23,12 +31,13 @@ find_package(catkin REQUIRED COMPONENTS ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES sensor_module_tutorial - CATKIN_DEPENDS roscpp robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS roscpp std_msgs robotis_framework_common + DEPENDS Boost ) ################################################################################ @@ -37,18 +46,17 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ) -add_library(sensor_module_tutorial - src/${PROJECT_NAME}/sensor_module_tutorial.cpp -) - -add_dependencies(sensor_module_tutorial ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +add_library(${PROJECT_NAME} src/${PROJECT_NAME}/sensor_module_tutorial.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS sensor_module_tutorial +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/thormang3_action_module/CMakeLists.txt b/thormang3_action_module/CMakeLists.txt index 15014d86..67e354ae 100644 --- a/thormang3_action_module/CMakeLists.txt +++ b/thormang3_action_module/CMakeLists.txt @@ -1,22 +1,30 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_action_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + roslib std_msgs robotis_controller_msgs - robotis_framework_common thormang3_action_module_msgs + robotis_framework_common ) +find_package(Boost REQUIRED COMPONENTS thread) + +################################################################################ +# Setup for python modules and scripts +################################################################################ + ################################################################################ # Declare ROS messages, services and actions ################################################################################ @@ -26,12 +34,13 @@ find_package(catkin REQUIRED COMPONENTS ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_action_module - CATKIN_DEPENDS roscpp robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS roscpp roslib std_msgs robotis_controller_msgs thormang3_action_module_msgs robotis_framework_common + DEPENDS Boost ) ################################################################################ @@ -40,18 +49,17 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ) -add_library(thormang3_action_module - src/action_module.cpp -) - -add_dependencies(thormang3_action_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +add_library(${PROJECT_NAME} src/action_module.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_action_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} @@ -61,9 +69,10 @@ install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} ) -install(DIRECTORY data/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +install(DIRECTORY data + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) + ################################################################################ # Test ################################################################################ diff --git a/thormang3_balance_control/CMakeLists.txt b/thormang3_balance_control/CMakeLists.txt index cd12dd92..b738333b 100644 --- a/thormang3_balance_control/CMakeLists.txt +++ b/thormang3_balance_control/CMakeLists.txt @@ -1,13 +1,14 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_balance_control) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp @@ -15,7 +16,11 @@ find_package(catkin REQUIRED COMPONENTS robotis_math ) -find_package(Eigen REQUIRED) +find_package(Eigen3 REQUIRED) + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -26,11 +31,13 @@ find_package(Eigen REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_balance_control + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS roscpp cmake_modules robotis_math + DEPENDS EIGEN3 ) ################################################################################ @@ -39,23 +46,17 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} ) -add_library(thormang3_balance_control - src/thormang3_balance_control.cpp -) - -add_dependencies(thormang3_balance_control ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -target_link_libraries(thormang3_balance_control - ${catkin_LIBRARIES} -) +add_library(${PROJECT_NAME} src/thormang3_balance_control.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_balance_control +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/thormang3_base_module/CMakeLists.txt b/thormang3_base_module/CMakeLists.txt index 8ea055c5..98c979f6 100644 --- a/thormang3_base_module/CMakeLists.txt +++ b/thormang3_base_module/CMakeLists.txt @@ -1,30 +1,52 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_base_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + roslib std_msgs geometry_msgs + robotis_controller_msgs cmake_modules - robotis_math robotis_framework_common - robotis_controller_msgs + robotis_math thormang3_kinematics_dynamics ) -find_package(Eigen REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) + +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CATKIN_DEVEL_PREFIX}/lib/pkgconfig") -find_package(PkgConfig) -pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -35,12 +57,22 @@ pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_base_module - CATKIN_DEPENDS roscpp std_msgs geometry_msgs robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS + roscpp + roslib + std_msgs + geometry_msgs + robotis_controller_msgs + cmake_modules + robotis_framework_common + robotis_math + thormang3_kinematics_dynamics + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -49,22 +81,19 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} - ${yaml_cpp_INCLUDE_DIRS} -) - -add_library(thormang3_base_module - src/base_module.cpp - src/base_module_state.cpp + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -add_dependencies(thormang3_base_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(thormang3_base_module ${yaml_cpp_LIBRARIES} ${catkin_LIBRARIES}) +add_library(${PROJECT_NAME} src/base_module.cpp src/base_module_state.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_base_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} @@ -74,8 +103,8 @@ install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} ) -install(DIRECTORY data/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +install(DIRECTORY data + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) ################################################################################ diff --git a/thormang3_base_module/package.xml b/thormang3_base_module/package.xml index ec8621a0..c8cd7fb0 100644 --- a/thormang3_base_module/package.xml +++ b/thormang3_base_module/package.xml @@ -19,8 +19,8 @@ geometry_msgs robotis_controller_msgs cmake_modules - robotis_math robotis_framework_common + robotis_math thormang3_kinematics_dynamics boost eigen diff --git a/thormang3_feet_ft_module/CMakeLists.txt b/thormang3_feet_ft_module/CMakeLists.txt index ec188654..404d5955 100644 --- a/thormang3_feet_ft_module/CMakeLists.txt +++ b/thormang3_feet_ft_module/CMakeLists.txt @@ -1,31 +1,52 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_feet_ft_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - cmake_modules - robotis_math robotis_controller_msgs + thormang3_feet_ft_module_msgs + cmake_modules robotis_framework_common + robotis_math thormang3_kinematics_dynamics - thormang3_feet_ft_module_msgs ati_ft_sensor ) -find_package(Eigen REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CATKIN_DEVEL_PREFIX}/lib/pkgconfig") -find_package(PkgConfig) -pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -36,12 +57,22 @@ pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_feet_ft_module - CATKIN_DEPENDS roscpp std_msgs robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS + roscpp + std_msgs + robotis_controller_msgs + thormang3_feet_ft_module_msgs + cmake_modules + robotis_framework_common + robotis_math + thormang3_kinematics_dynamics + ati_ft_sensor + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -50,18 +81,19 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} - ${yaml_cpp_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -add_library(thormang3_feet_ft_module src/feet_force_torque_sensor_module.cpp) -add_dependencies(thormang3_feet_ft_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(thormang3_feet_ft_module ${yaml_cpp_LIBRARIES} ${catkin_LIBRARIES}) +add_library(${PROJECT_NAME} src/feet_force_torque_sensor_module.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_feet_ft_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/thormang3_gripper_module/CMakeLists.txt b/thormang3_gripper_module/CMakeLists.txt index 0d0a5c80..1bedeec9 100644 --- a/thormang3_gripper_module/CMakeLists.txt +++ b/thormang3_gripper_module/CMakeLists.txt @@ -1,31 +1,51 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_gripper_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS - dynamixel_sdk - robotis_device - robotis_math - robotis_controller_msgs - robotis_framework_common roscpp + roslib std_msgs sensor_msgs + robotis_controller_msgs cmake_modules + robotis_framework_common + robotis_math ) -find_package(Eigen REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CATKIN_DEVEL_PREFIX}/lib/pkgconfig") -find_package(PkgConfig) -pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -36,13 +56,21 @@ pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_gripper_module -# CATKIN_DEPENDS robotis_device roscpp std_msgs -# DEPENDS system_lib + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS + roscpp + roslib + std_msgs + sensor_msgs + robotis_controller_msgs + cmake_modules + robotis_framework_common + robotis_math + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -51,19 +79,19 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} - ${yaml_cpp_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -## Declare a C++ library -add_library(thormang3_gripper_module src/gripper_module.cpp) -add_dependencies(thormang3_gripper_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(thormang3_gripper_module ${yaml_cpp_LIBRARIES} ${catkin_LIBRARIES}) +add_library(${PROJECT_NAME} src/gripper_module.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_gripper_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/thormang3_head_control_module/CMakeLists.txt b/thormang3_head_control_module/CMakeLists.txt index 0295cdff..68bc1514 100644 --- a/thormang3_head_control_module/CMakeLists.txt +++ b/thormang3_head_control_module/CMakeLists.txt @@ -1,25 +1,32 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_head_control_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - cmake_modules - robotis_math + sensor_msgs robotis_controller_msgs - robotis_framework_common thormang3_head_control_module_msgs + cmake_modules + robotis_framework_common + robotis_math ) -find_package(Eigen REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -30,12 +37,21 @@ find_package(Eigen REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_head_control_module - CATKIN_DEPENDS roscpp robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS + roscpp + std_msgs + sensor_msgs + robotis_controller_msgs + thormang3_head_control_module_msgs + cmake_modules + robotis_framework_common + robotis_math + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -44,23 +60,18 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} -) - -add_library(thormang3_head_control_module - src/head_control_module.cpp + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} ) -add_dependencies(thormang3_head_control_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -target_link_libraries(thormang3_head_control_module - ${catkin_LIBRARIES} -) +add_library(${PROJECT_NAME} src/head_control_module.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_head_control_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/thormang3_kinematics_dynamics/CMakeLists.txt b/thormang3_kinematics_dynamics/CMakeLists.txt index 08471ed5..8e819ee6 100644 --- a/thormang3_kinematics_dynamics/CMakeLists.txt +++ b/thormang3_kinematics_dynamics/CMakeLists.txt @@ -1,21 +1,26 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_kinematics_dynamics) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp - robotis_math cmake_modules + robotis_math ) -find_package(Eigen REQUIRED) +find_package(Eigen3 REQUIRED) + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -26,11 +31,13 @@ find_package(Eigen REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_kinematics_dynamics + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS roscpp cmake_modules robotis_math + DEPENDS EIGEN3 ) ################################################################################ @@ -39,24 +46,17 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} ) -add_library(thormang3_kinematics_dynamics - src/link_data.cpp - src/kinematics_dynamics.cpp -) - -add_dependencies(thormang3_kinematics_dynamics ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -target_link_libraries(thormang3_kinematics_dynamics - ${catkin_LIBRARIES} -) +add_library(${PROJECT_NAME} src/link_data.cpp src/kinematics_dynamics.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Eigen3_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_kinematics_dynamics +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/thormang3_manager/CMakeLists.txt b/thormang3_manager/CMakeLists.txt index 8d451f07..d08a132d 100644 --- a/thormang3_manager/CMakeLists.txt +++ b/thormang3_manager/CMakeLists.txt @@ -1,36 +1,30 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_manager) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp - dynamixel_sdk - robotis_framework_common - robotis_device robotis_controller - robotis_controller_msgs - robotis_math - cmake_modules - ati_ft_sensor - thormang3_kinematics_dynamics thormang3_feet_ft_module - thormang3_balance_control + thormang3_base_module thormang3_action_module thormang3_head_control_module thormang3_manipulation_module - thormang3_gripper_module thormang3_walking_module - thormang3_base_module + thormang3_gripper_module ) -find_package(Eigen REQUIRED) +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -41,42 +35,41 @@ find_package(Eigen REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration -################################################################################ -catkin_package() +# Declare catkin specific configuration to be passed to dependent projects +################################################################################ +catkin_package( + CATKIN_DEPENDS + roscpp + robotis_controller + thormang3_feet_ft_module + thormang3_base_module + thormang3_action_module + thormang3_head_control_module + thormang3_manipulation_module + thormang3_walking_module + thormang3_gripper_module +) ################################################################################ # Build ################################################################################ include_directories( - include - ${Eigen_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ) add_executable(thormang3_manager src/thormang3_manager.cpp) - add_dependencies(thormang3_manager ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -target_link_libraries(thormang3_manager - ${catkin_LIBRARIES} -) +target_link_libraries(thormang3_manager ${catkin_LIBRARIES}) ################################################################################ # Install ################################################################################ install(TARGETS thormang3_manager - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) -install(DIRECTORY config/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) - -install(DIRECTORY launch/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +install(DIRECTORY config launch + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) ################################################################################ diff --git a/thormang3_manipulation_module/CMakeLists.txt b/thormang3_manipulation_module/CMakeLists.txt index 1c605af1..4c56c4d0 100644 --- a/thormang3_manipulation_module/CMakeLists.txt +++ b/thormang3_manipulation_module/CMakeLists.txt @@ -1,31 +1,53 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_manipulation_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + roslib std_msgs geometry_msgs - cmake_modules - robotis_math robotis_controller_msgs + thormang3_manipulation_module_msgs + cmake_modules robotis_framework_common + robotis_math thormang3_kinematics_dynamics - thormang3_manipulation_module_msgs ) -find_package(Eigen REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CATKIN_DEVEL_PREFIX}/lib/pkgconfig") -find_package(PkgConfig) -pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -36,12 +58,23 @@ pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration -################################################################################ +# Declare catkin specific configuration to be passed to dependent projects +################################################################################# catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_manipulation_module - CATKIN_DEPENDS roscpp robotis_math robotis_framework_common + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS + roscpp + roslib + std_msgs + geometry_msgs + robotis_controller_msgs + thormang3_manipulation_module_msgs + cmake_modules + robotis_framework_common + robotis_math + thormang3_kinematics_dynamics + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -50,18 +83,19 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} - ${yaml_cpp_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -add_library(thormang3_manipulation_module src/manipulation_module.cpp) -add_dependencies(thormang3_manipulation_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -target_link_libraries(thormang3_manipulation_module ${yaml_cpp_LIBRARIES} ${catkin_LIBRARIES}) +add_library(${PROJECT_NAME} src/manipulation_module.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_manipulation_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} @@ -71,8 +105,8 @@ install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} ) -install(DIRECTORY config/ - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +install(DIRECTORY config + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) ################################################################################ diff --git a/thormang3_walking_module/CMakeLists.txt b/thormang3_walking_module/CMakeLists.txt index 360de65c..3fecb552 100644 --- a/thormang3_walking_module/CMakeLists.txt +++ b/thormang3_walking_module/CMakeLists.txt @@ -1,30 +1,56 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(thormang3_walking_module) -set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +## Compile as C++11, supported in ROS Kinetic and newer +add_compile_options(-std=c++11) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp + roslib std_msgs sensor_msgs + geometry_msgs + robotis_controller_msgs + thormang3_walking_module_msgs cmake_modules eigen_conversions - robotis_math robotis_framework_common - robotis_controller_msgs + robotis_math thormang3_kinematics_dynamics thormang3_balance_control - thormang3_walking_module_msgs ) -find_package(Eigen REQUIRED) -pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(Eigen3 REQUIRED) + +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") + +################################################################################ +# Setup for python modules and scripts +################################################################################ ################################################################################ # Declare ROS messages, services and actions @@ -35,12 +61,26 @@ pkg_check_modules(yaml_cpp yaml-cpp REQUIRED) ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - LIBRARIES thormang3_walking_module - CATKIN_DEPENDS roscpp robotis_math robotis_framework_common thormang3_balance_control thormang3_kinematics_dynamics + LIBRARIES ${PROJECT_NAME} + CATKIN_DEPENDS + roscpp + roslib + std_msgs + sensor_msgs + geometry_msgs + robotis_controller_msgs + thormang3_walking_module_msgs + cmake_modules + eigen_conversions + robotis_framework_common + robotis_math + thormang3_kinematics_dynamics + thormang3_balance_control + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -49,26 +89,19 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} - ${yaml_cpp_INCLUDE_DIRS} -) - -add_library(thormang3_walking_module - src/thormang3_online_walking.cpp - src/walking_module.cpp + ${Boost_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) -add_dependencies(thormang3_walking_module ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -target_link_libraries(thormang3_walking_module - ${catkin_LIBRARIES} - ${yaml_cpp_LIBRARIES} -) +add_library(${PROJECT_NAME} src/thormang3_online_walking.cpp src/walking_module.cpp) +add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES}) ################################################################################ # Install ################################################################################ -install(TARGETS thormang3_walking_module +install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} @@ -78,6 +111,10 @@ install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} ) +install(DIRECTORY config + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) + ################################################################################ # Test ################################################################################