From 12ba014964da1df8ca119ad4adc8578709181a45 Mon Sep 17 00:00:00 2001 From: Timothy Wiley Date: Wed, 12 Jul 2017 12:00:24 +1000 Subject: [PATCH] Convert explorer back to service based approach (not action server) --- crosbot_explore/CMakeLists.txt | 11 ++---- crosbot_explore/action/Explore.action | 35 ------------------- .../actionParameters.hpp | 0 .../basicClient.hpp | 1 - .../basicClientCommands.hpp | 0 .../include/crosbot_explore/explorer.hpp | 2 +- .../actionParameters.cpp | 2 +- .../basicClient.cpp | 6 ++-- .../src/nodes/basicActionClient_node.cpp | 2 +- 9 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 crosbot_explore/action/Explore.action rename crosbot_explore/include/crosbot_explore/{actionServer => basicClient}/actionParameters.hpp (100%) rename crosbot_explore/include/crosbot_explore/{actionServer => basicClient}/basicClient.hpp (97%) rename crosbot_explore/include/crosbot_explore/{actionServer => basicClient}/basicClientCommands.hpp (100%) rename crosbot_explore/src/{actionServer => basicClient}/actionParameters.cpp (86%) rename crosbot_explore/src/{actionServer => basicClient}/basicClient.cpp (98%) diff --git a/crosbot_explore/CMakeLists.txt b/crosbot_explore/CMakeLists.txt index a90a582..499abd9 100644 --- a/crosbot_explore/CMakeLists.txt +++ b/crosbot_explore/CMakeLists.txt @@ -44,13 +44,6 @@ add_service_files( SetExplorerMode.srv ) -## Add actionlib files -add_action_files( - DIRECTORY action - FILES - Explore.action -) - ## Generate added messages and services with any dependencies listed here generate_messages( DEPENDENCIES @@ -102,8 +95,8 @@ include_directories(include ## Declare a cpp library add_library(crosbot_explore - src/actionServer/actionParameters.cpp - src/actionServer/basicClient.cpp + src/basicClient/actionParameters.cpp + src/basicClient/basicClient.cpp src/astar.cpp src/explorer.cpp src/explorerROS.cpp diff --git a/crosbot_explore/action/Explore.action b/crosbot_explore/action/Explore.action deleted file mode 100644 index e54b1b7..0000000 --- a/crosbot_explore/action/Explore.action +++ /dev/null @@ -1,35 +0,0 @@ -# Action id -int32 id - -# Action "goal" is the exploration mode -int32 mode # 0 stop - # 1 resume - # 2 left wall - # 3 right wall - # 4 waypoint - -# Path to follow for waypoint mode -nav_msgs/Path path - -# Should navigation target the orientation of the final goal/path -bool targetOrientation - ---- - -# Corresponding Action id -int32 id - -# Has the mode of operation been immediately achieved. -bool success - - ---- - -# Corresponding Action id -int32 id - -# Keep updated on continuing state of exploration -# Search strategy uses mode numbers -string status -bool operating -int32 searchStrategy diff --git a/crosbot_explore/include/crosbot_explore/actionServer/actionParameters.hpp b/crosbot_explore/include/crosbot_explore/basicClient/actionParameters.hpp similarity index 100% rename from crosbot_explore/include/crosbot_explore/actionServer/actionParameters.hpp rename to crosbot_explore/include/crosbot_explore/basicClient/actionParameters.hpp diff --git a/crosbot_explore/include/crosbot_explore/actionServer/basicClient.hpp b/crosbot_explore/include/crosbot_explore/basicClient/basicClient.hpp similarity index 97% rename from crosbot_explore/include/crosbot_explore/actionServer/basicClient.hpp rename to crosbot_explore/include/crosbot_explore/basicClient/basicClient.hpp index 1d5286c..aef915b 100644 --- a/crosbot_explore/include/crosbot_explore/actionServer/basicClient.hpp +++ b/crosbot_explore/include/crosbot_explore/basicClient/basicClient.hpp @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/crosbot_explore/include/crosbot_explore/actionServer/basicClientCommands.hpp b/crosbot_explore/include/crosbot_explore/basicClient/basicClientCommands.hpp similarity index 100% rename from crosbot_explore/include/crosbot_explore/actionServer/basicClientCommands.hpp rename to crosbot_explore/include/crosbot_explore/basicClient/basicClientCommands.hpp diff --git a/crosbot_explore/include/crosbot_explore/explorer.hpp b/crosbot_explore/include/crosbot_explore/explorer.hpp index 47d4814..679c85c 100644 --- a/crosbot_explore/include/crosbot_explore/explorer.hpp +++ b/crosbot_explore/include/crosbot_explore/explorer.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include diff --git a/crosbot_explore/src/actionServer/actionParameters.cpp b/crosbot_explore/src/basicClient/actionParameters.cpp similarity index 86% rename from crosbot_explore/src/actionServer/actionParameters.cpp rename to crosbot_explore/src/basicClient/actionParameters.cpp index 9641839..04f1c8b 100644 --- a/crosbot_explore/src/actionServer/actionParameters.cpp +++ b/crosbot_explore/src/basicClient/actionParameters.cpp @@ -5,7 +5,7 @@ * Author: rescue */ -#include +#include namespace crosbot_explore { diff --git a/crosbot_explore/src/actionServer/basicClient.cpp b/crosbot_explore/src/basicClient/basicClient.cpp similarity index 98% rename from crosbot_explore/src/actionServer/basicClient.cpp rename to crosbot_explore/src/basicClient/basicClient.cpp index e0ed74b..3a5985c 100644 --- a/crosbot_explore/src/actionServer/basicClient.cpp +++ b/crosbot_explore/src/basicClient/basicClient.cpp @@ -8,9 +8,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/crosbot_explore/src/nodes/basicActionClient_node.cpp b/crosbot_explore/src/nodes/basicActionClient_node.cpp index 652bcd6..c2832a5 100644 --- a/crosbot_explore/src/nodes/basicActionClient_node.cpp +++ b/crosbot_explore/src/nodes/basicActionClient_node.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include -- GitLab