diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 7032b57dc..d16658c37 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -18,6 +18,7 @@ catkin_package( LIBRARIES ${PROJECT_NAME} ${PROJECT_NAME}_stages + ${PROJECT_NAME}_stage_plugins INCLUDE_DIRS include CATKIN_DEPENDS diff --git a/core/motion_planning_stages_plugin_description.xml b/core/motion_planning_stages_plugin_description.xml index 75af7442d..389c11ff0 100644 --- a/core/motion_planning_stages_plugin_description.xml +++ b/core/motion_planning_stages_plugin_description.xml @@ -1,4 +1,4 @@ - + diff --git a/core/src/stages/CMakeLists.txt b/core/src/stages/CMakeLists.txt index 857a4977c..2becaa638 100644 --- a/core/src/stages/CMakeLists.txt +++ b/core/src/stages/CMakeLists.txt @@ -41,6 +41,11 @@ add_library(${PROJECT_NAME}_stages ) target_link_libraries(${PROJECT_NAME}_stages ${PROJECT_NAME} ${catkin_LIBRARIES}) -install(TARGETS ${PROJECT_NAME}_stages +add_library(${PROJECT_NAME}_stage_plugins + plugins.cpp +) +target_link_libraries(${PROJECT_NAME}_stage_plugins ${PROJECT_NAME}_stages ${catkin_LIBRARIES}) + +install(TARGETS ${PROJECT_NAME}_stages ${PROJECT_NAME}_stage_plugins ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) diff --git a/core/src/stages/current_state.cpp b/core/src/stages/current_state.cpp index 51c5abc97..822dc5c34 100644 --- a/core/src/stages/current_state.cpp +++ b/core/src/stages/current_state.cpp @@ -96,7 +96,3 @@ void CurrentState::compute() { } // namespace stages } // namespace task_constructor } // namespace moveit - -/// register plugin -#include -PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage) diff --git a/core/src/stages/plugins.cpp b/core/src/stages/plugins.cpp new file mode 100644 index 000000000..9b9864f8f --- /dev/null +++ b/core/src/stages/plugins.cpp @@ -0,0 +1,7 @@ +#include + +#include + +/// register plugins to use with ClassLoader + +PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage)