Skip to content

Commit 84d668b

Browse files
authored
Split ClassLoader plugin code from main libraries (#271)
to work around ros/class_loader#131
1 parent ff4eb4e commit 84d668b

5 files changed

Lines changed: 15 additions & 6 deletions

File tree

core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ catkin_package(
1818
LIBRARIES
1919
${PROJECT_NAME}
2020
${PROJECT_NAME}_stages
21+
${PROJECT_NAME}_stage_plugins
2122
INCLUDE_DIRS
2223
include
2324
CATKIN_DEPENDS

core/motion_planning_stages_plugin_description.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<library path="libmoveit_task_constructor_core_stages">
1+
<library path="libmoveit_task_constructor_core_stage_plugins">
22
<class name="moveit_task_constructor/Current State"
33
type="moveit::task_constructor::stages::CurrentState"
44
base_class_type="moveit::task_constructor::Stage">

core/src/stages/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ add_library(${PROJECT_NAME}_stages
4141
)
4242
target_link_libraries(${PROJECT_NAME}_stages ${PROJECT_NAME} ${catkin_LIBRARIES})
4343

44-
install(TARGETS ${PROJECT_NAME}_stages
44+
add_library(${PROJECT_NAME}_stage_plugins
45+
plugins.cpp
46+
)
47+
target_link_libraries(${PROJECT_NAME}_stage_plugins ${PROJECT_NAME}_stages ${catkin_LIBRARIES})
48+
49+
install(TARGETS ${PROJECT_NAME}_stages ${PROJECT_NAME}_stage_plugins
4550
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
4651
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})

core/src/stages/current_state.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,3 @@ void CurrentState::compute() {
9696
} // namespace stages
9797
} // namespace task_constructor
9898
} // namespace moveit
99-
100-
/// register plugin
101-
#include <pluginlib/class_list_macros.h>
102-
PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage)

core/src/stages/plugins.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <moveit/task_constructor/stages/current_state.h>
2+
3+
#include <pluginlib/class_list_macros.h>
4+
5+
/// register plugins to use with ClassLoader
6+
7+
PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage)

0 commit comments

Comments
 (0)