forked from kuka-isir/cart_opt_ctrl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
97 lines (79 loc) · 2.65 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
cmake_minimum_required(VERSION 2.8.3)
project(cart_opt_ctrl)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
find_package(catkin REQUIRED COMPONENTS
rtt_ros
rtt_ros_kdl_tools
trac_ik_lib
kdl_conversions
eigen_conversions
cmake_modules
qpOASES
controller_interface
actionlib
roscpp
rospy
realtime_tools
control_msgs
trajectory_msgs
controller_manager
message_generation
geometry_msgs
tf
joint_trajectory_controller
rtt_roscomm
nav_msgs
)
find_package(Eigen REQUIRED)
find_package(orocos_kdl REQUIRED)
catkin_python_setup()
include_directories(
include
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
${orocos_kdl_INCLUDE_DIRS}
${USE_OROCOS_INCLUDE_DIRS}
)
add_service_files(
FILES
UpdateWaypoints.srv
GetCurrentPose.srv
)
generate_messages(
DEPENDENCIES
geometry_msgs
)
catkin_package(
CATKIN_DEPENDS message_runtime
)
# Orocos typekits
ros_generate_rtt_typekit(cart_opt_ctrl)
ros_generate_rtt_service_proxies(cart_opt_ctrl)
## ROS control and trajectory nodes
add_executable(kdl_trajectory_sender src/kdl_trajectory_sender.cpp)
target_link_libraries(kdl_trajectory_sender ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_library(cart_opt_controllers src/cart_opt_controller.cpp)
target_link_libraries(cart_opt_controllers ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(cart_opt_controllers ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
add_executable(send_simple_traj src/send_simple_traj.cpp)
add_dependencies(send_simple_traj ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(send_simple_traj ${catkin_LIBRARIES} ${Boost_LIBRARIES})
## Orocos control and trajectory components
orocos_component(${PROJECT_NAME} src/cart_opt_comp.cpp src/compute_traj_comp.cpp src/impulse_cart_comp.cpp)
set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY COMPILE_DEFINITIONS RTT_COMPONENT)
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${orocos_kdl_LIBRARIES}
${kdl_conversions_LIBRARIES}
${USE_OROCOS_LIBRARIES}
)
orocos_install_headers(DIRECTORY include/${PROJECT_NAME})
orocos_generate_package(INCLUDE_DIRS include)
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY scripts DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
catkin_install_python(PROGRAMS src/cart_opt_ctrl/back_n_forth.py src/cart_opt_ctrl/simple_traj_script.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})