-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathros-noetic-moveit-ros-planning-interface.patch
181 lines (166 loc) · 9.02 KB
/
ros-noetic-moveit-ros-planning-interface.patch
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73f1aa3ea4..67528cf75c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,9 @@ find_package(catkin REQUIRED COMPONENTS
)
moveit_build_options()
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(EIGENPY REQUIRED eigenpy)
+
find_package(PythonInterp REQUIRED)
find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED)
@@ -77,8 +80,11 @@ include_directories(SYSTEM
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
+ ${EIGENPY_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS})
+link_directories(${EIGENPY_LIBRARY_DIRS})
+
add_subdirectory(py_bindings_tools)
add_subdirectory(common_planning_interface_objects)
add_subdirectory(planning_scene_interface)
diff --git a/move_group_interface/include/moveit/move_group_interface/move_group_interface.h b/move_group_interface/include/moveit/move_group_interface/move_group_interface.h
index 17de157197..fdae58ab37 100644
--- a/move_group_interface/include/moveit/move_group_interface/move_group_interface.h
+++ b/move_group_interface/include/moveit/move_group_interface/move_group_interface.h
@@ -56,6 +56,20 @@
#include <utility>
#include <tf2_ros/buffer.h>
+#include <ros/macros.h>
+
+// Import/export for windows dll's and visibility for gcc shared libraries.
+
+#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries
+ #ifdef moveit_move_group_interface_EXPORTS // we are building a shared lib/dll
+ #define MOVEIT_MOVE_GROUP_INTERFACE_DECL ROS_HELPER_EXPORT
+ #else // we are using shared lib/dll
+ #define MOVEIT_MOVE_GROUP_INTERFACE_DECL ROS_HELPER_IMPORT
+ #endif
+#else // ros is being built around static libraries
+ #define MOVEIT_MOVE_GROUP_INTERFACE_DECL
+#endif
+
namespace moveit
{
/** \brief Simple interface to MoveIt components */
@@ -70,7 +84,7 @@ MOVEIT_CLASS_FORWARD(MoveGroupInterface); // Defines MoveGroupInterfacePtr, Con
\brief Client class to conveniently use the ROS interfaces provided by the move_group node.
This class includes many default settings to make things easy to use. */
-class MoveGroupInterface
+class MOVEIT_MOVE_GROUP_INTERFACE_DECL MoveGroupInterface
{
public:
/** \brief Default ROS parameter name from where to read the robot's URDF. Set to 'robot_description' */
diff --git a/move_group_interface/CMakeLists.txt b/move_group_interface/CMakeLists.txt
index d822174bf0..c95290d11c 100644
--- a/move_group_interface/CMakeLists.txt
+++ b/move_group_interface/CMakeLists.txt
@@ -6,13 +6,20 @@ target_link_libraries(${MOVEIT_LIB_NAME} moveit_common_planning_interface_object
add_dependencies(${MOVEIT_LIB_NAME} ${catkin_EXPORTED_TARGETS})
add_library(${MOVEIT_LIB_NAME}_python src/wrap_python_move_group.cpp)
-target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} eigenpy::eigenpy ${PYTHON_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES} moveit_py_bindings_tools)
+target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} eigenpy::eigenpy ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${EIGENPY_LIBRARIES} moveit_py_bindings_tools)
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME}_python ${PYTHON_LIBRARIES})
+else()
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif()
add_dependencies(${MOVEIT_LIB_NAME}_python ${catkin_EXPORTED_TARGETS})
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES OUTPUT_NAME _moveit_move_group_interface PREFIX "")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}")
if(WIN32)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .pyd)
+else()
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .so)
endif(WIN32)
install(TARGETS ${MOVEIT_LIB_NAME}
diff --git a/py_bindings_tools/CMakeLists.txt b/py_bindings_tools/CMakeLists.txt
index 1f82d7e4dc..2f9112fb85 100644
--- a/py_bindings_tools/CMakeLists.txt
+++ b/py_bindings_tools/CMakeLists.txt
@@ -1,8 +1,16 @@
set(MOVEIT_LIB_NAME moveit_py_bindings_tools)
+find_package(PythonInterp REQUIRED)
+find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED)
+
add_library(${MOVEIT_LIB_NAME} src/roscpp_initializer.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
-target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
+target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME} ${PYTHON_LIBRARIES})
+else()
+ set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif(NOT APPLE)
install(TARGETS ${MOVEIT_LIB_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
@@ -10,13 +16,20 @@ install(TARGETS ${MOVEIT_LIB_NAME}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION})
add_library(${MOVEIT_LIB_NAME}_python src/wrap_python_roscpp_initializer.cpp)
-target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} ${PYTHON_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
+target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME}_python ${PYTHON_LIBRARIES})
+endif(NOT APPLE)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES OUTPUT_NAME _moveit_roscpp_initializer PREFIX "")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}")
if(WIN32)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .pyd)
endif(WIN32)
+if(APPLE)
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .so)
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif(APPLE)
install(TARGETS ${MOVEIT_LIB_NAME}_python
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION})
diff --git a/planning_scene_interface/CMakeLists.txt b/planning_scene_interface/CMakeLists.txt
index 6a3b1a3f9b..d8c3055352 100644
--- a/planning_scene_interface/CMakeLists.txt
+++ b/planning_scene_interface/CMakeLists.txt
@@ -6,11 +6,18 @@ target_link_libraries(${MOVEIT_LIB_NAME} moveit_common_planning_interface_object
add_library(${MOVEIT_LIB_NAME}_python src/wrap_python_planning_scene_interface.cpp)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
-target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} ${PYTHON_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES} moveit_py_bindings_tools)
+target_link_libraries(${MOVEIT_LIB_NAME}_python ${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${Boost_LIBRARIES} moveit_py_bindings_tools)
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME}_python ${PYTHON_LIBRARIES})
+else()
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif()
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES OUTPUT_NAME _moveit_planning_scene_interface PREFIX "")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}")
if(WIN32)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .pyd)
+else()
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .so)
endif(WIN32)
install(TARGETS ${MOVEIT_LIB_NAME}
diff --git a/robot_interface/CMakeLists.txt b/robot_interface/CMakeLists.txt
index 3944155fbf..2fcc7521dd 100644
--- a/robot_interface/CMakeLists.txt
+++ b/robot_interface/CMakeLists.txt
@@ -1,13 +1,21 @@
set(MOVEIT_LIB_NAME moveit_robot_interface)
add_library(${MOVEIT_LIB_NAME}_python src/wrap_python_robot_interface.cpp)
-target_link_libraries(${MOVEIT_LIB_NAME}_python ${PYTHON_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}
+target_link_libraries(${MOVEIT_LIB_NAME}_python ${catkin_LIBRARIES} ${Boost_LIBRARIES}
moveit_common_planning_interface_objects moveit_py_bindings_tools)
+if(NOT APPLE)
+ target_link_libraries(${MOVEIT_LIB_NAME}_python ${PYTHON_LIBRARIES})
+else()
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif(NOT APPLE)
+
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES OUTPUT_NAME _moveit_robot_interface PREFIX "")
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}")
if(WIN32)
set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .pyd)
+else()
+ set_target_properties(${MOVEIT_LIB_NAME}_python PROPERTIES SUFFIX .so)
endif(WIN32)
install(TARGETS ${MOVEIT_LIB_NAME}_python