From 17683b12c9ab39d558ad4b6b7e0964603f4bc1db Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 30 Nov 2017 20:30:18 +0100 Subject: [PATCH] more exported stage plugins: CurrentState --- core/CMakeLists.txt | 3 +++ core/motion_planning_stages_plugin_description.xml | 9 +++++++++ core/package.xml | 4 ++++ core/src/stages/current_state.cpp | 8 ++++++-- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 core/motion_planning_stages_plugin_description.xml diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 09b544a4..3d33d66b 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -40,3 +40,6 @@ add_subdirectory(demo) add_subdirectory(test) install(DIRECTORY include/ DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}) +install(FILES + motion_planning_stages_plugin_description.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/core/motion_planning_stages_plugin_description.xml b/core/motion_planning_stages_plugin_description.xml new file mode 100644 index 00000000..75af7442 --- /dev/null +++ b/core/motion_planning_stages_plugin_description.xml @@ -0,0 +1,9 @@ + + + + Use the current state of the robot (when starting planning) as a target. + + + diff --git a/core/package.xml b/core/package.xml index 97fa1db4..e13a3dac 100644 --- a/core/package.xml +++ b/core/package.xml @@ -28,4 +28,8 @@ visualization_msgs rosunit + + + + diff --git a/core/src/stages/current_state.cpp b/core/src/stages/current_state.cpp index fd5c26d1..84198594 100644 --- a/core/src/stages/current_state.cpp +++ b/core/src/stages/current_state.cpp @@ -39,8 +39,8 @@ namespace moveit { namespace task_constructor { namespace stages { -CurrentState::CurrentState(std::string name) -: Generator(name) +CurrentState::CurrentState(std::string name = "current state") + : Generator(name) { ran_= false; } @@ -64,3 +64,7 @@ bool CurrentState::compute(){ } } } } + +/// register plugin +#include +PLUGINLIB_EXPORT_CLASS(moveit::task_constructor::stages::CurrentState, moveit::task_constructor::Stage)