forked from youbot/youbot_driver_ros_interface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
76 lines (55 loc) · 2.3 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
cmake_minimum_required(VERSION 2.8.3)
project(youbot_driver_ros_interface)
find_package(catkin REQUIRED COMPONENTS youbot_driver roscpp rosconsole actionlib tf control_msgs brics_actuator pr2_msgs diagnostic_msgs geometry_msgs nav_msgs pr2_msgs std_msgs std_srvs trajectory_msgs)
find_package(Boost REQUIRED COMPONENTS thread date_time filesystem system)
catkin_package(
CATKIN_DEPENDS youbot_driver rosconsole roscpp pr2_msgs brics_actuator tf control_msgs diagnostic_msgs geometry_msgs nav_msgs pr2_msgs std_msgs std_srvs trajectory_msgs
)
## preprocessor definitions
ADD_DEFINITIONS(-DYOUBOT_CONFIGURATIONS_DIR=${youbot_driver_CONFIG_DIR})
## Set Compiler flags
INCLUDE_DIRECTORIES(
include
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
)
add_executable(youbot_driver_ros_interface
src/youbot_oodl.cpp
src/YouBotOODLWrapper.cpp
src/YouBotConfiguration.cpp
src/joint_state_observer_oodl.cpp
)
target_link_libraries(youbot_driver_ros_interface ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(youbot_driver_ros_interface ${catkin_EXPORTED_TARGETS})
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
## run sudo command to enable direct network access
## disabled here by default because it is set by Debian postinst command
OPTION(USE_SETCAP "Set permissions to access ethernet interface without sudo" OFF)
SET(SUDO_COMMAND gksudo)
IF($ENV{USE_NORMAL_SUDO})
SET(SUDO_COMMAND sudo)
ENDIF($ENV{USE_NORMAL_SUDO})
IF(USE_SETCAP)
add_custom_command(TARGET youbot_driver_ros_interface POST_BUILD
COMMAND ${SUDO_COMMAND} setcap cap_net_raw+ep $<TARGET_FILE:youbot_driver_ros_interface>
)
endif(USE_SETCAP)
#test programs
add_executable(youbot_arm_test
src/examples/youbot_arm_test.cpp
)
target_link_libraries(youbot_arm_test ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${youbot_driver_LIBRARIES})
add_executable(youbot_2nd_arm_test
src/examples/youbot_2nd_arm_test.cpp
)
target_link_libraries(youbot_2nd_arm_test ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${youbot_driver_LIBRARIES})
install(TARGETS youbot_driver_ros_interface youbot_arm_test
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# enable python teleop script
catkin_python_setup()
install(PROGRAMS src/examples/youbot_keyboard_teleop.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)