Split ClassLoader plugin code from main libraries (#271)

to work around https://github.com/ros/class_loader/issues/131
This commit is contained in:
Michael Görner 2021-05-29 00:38:02 +02:00 committed by GitHub
parent ff4eb4edf1
commit 84d668b0d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 6 deletions

View File

@ -18,6 +18,7 @@ catkin_package(
LIBRARIES
${PROJECT_NAME}
${PROJECT_NAME}_stages
${PROJECT_NAME}_stage_plugins
INCLUDE_DIRS
include
CATKIN_DEPENDS

View File

@ -1,4 +1,4 @@
<library path="libmoveit_task_constructor_core_stages">
<library path="libmoveit_task_constructor_core_stage_plugins">
<class name="moveit_task_constructor/Current State"
type="moveit::task_constructor::stages::CurrentState"
base_class_type="moveit::task_constructor::Stage">

View File

@ -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})

View File

@ -96,7 +96,3 @@ void CurrentState::compute() {
} // namespace stages
} // namespace task_constructor
} // namespace moveit
/// register plugin
#include <pluginlib/class_list_macros.h>
PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage)

View File

@ -0,0 +1,7 @@
#include <moveit/task_constructor/stages/current_state.h>
#include <pluginlib/class_list_macros.h>
/// register plugins to use with ClassLoader
PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage)