From df09b202078af6aa7b776b827f5dc7bb8d933aa3 Mon Sep 17 00:00:00 2001 From: Renan Salles Date: Fri, 21 Jul 2023 12:47:45 +0900 Subject: [PATCH] make it btv4 compatible --- CMakeLists.txt | 4 ++-- include/behaviortree_ros/bt_action_node.h | 7 +++---- include/behaviortree_ros/bt_service_node.h | 4 ++-- package.xml | 22 ++++++++-------------- test/test_bt.cpp | 8 ++++---- 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9805048..0b7eb67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5.1) # version on Ubuntu Trusty project(behaviortree_ros) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -9,7 +9,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(ROS_DEPENDENCIES roscpp std_msgs - behaviortree_cpp_v3 + behaviortree_cpp actionlib_msgs actionlib message_generation) diff --git a/include/behaviortree_ros/bt_action_node.h b/include/behaviortree_ros/bt_action_node.h index a8c21bb..abeee22 100644 --- a/include/behaviortree_ros/bt_action_node.h +++ b/include/behaviortree_ros/bt_action_node.h @@ -16,10 +16,10 @@ #ifndef BEHAVIOR_TREE_BT_ACTION_NODE_HPP_ #define BEHAVIOR_TREE_BT_ACTION_NODE_HPP_ -#include -#include -#include #include +#include +#include +#include namespace BT { @@ -100,7 +100,6 @@ class RosActionNode : public BT::ActionNodeBase { action_client_->cancelGoal(); } - setStatus(NodeStatus::IDLE); } protected: diff --git a/include/behaviortree_ros/bt_service_node.h b/include/behaviortree_ros/bt_service_node.h index a60eff6..e3120f2 100644 --- a/include/behaviortree_ros/bt_service_node.h +++ b/include/behaviortree_ros/bt_service_node.h @@ -16,8 +16,8 @@ #ifndef BEHAVIOR_TREE_BT_SERVICE_NODE_HPP_ #define BEHAVIOR_TREE_BT_SERVICE_NODE_HPP_ -#include -#include +#include +#include #include #include diff --git a/package.xml b/package.xml index e97b070..31aa6bf 100644 --- a/package.xml +++ b/package.xml @@ -1,4 +1,4 @@ - + behaviortree_ros 0.0.1 @@ -11,20 +11,14 @@ Davide Faconti - roscpp - std_msgs - behaviortree_cpp_v3 - actionlib - actionlib_msgs + roscpp + std_msgs + behaviortree_cpp + actionlib + actionlib_msgs - roscpp - std_msgs - behaviortree_cpp_v3 - actionlib - actionlib_msgs - - message_generation - message_generation + message_runtime + message_generation catkin diff --git a/test/test_bt.cpp b/test/test_bt.cpp index 7b5070d..a97f3cd 100644 --- a/test/test_bt.cpp +++ b/test/test_bt.cpp @@ -157,9 +157,9 @@ RosActionNode(handle, name, conf) {} //----------------------------------------------------- // Simple tree, used to execute once each action. - static const char* xml_text = R"( - - +static const char* xml_text = R"( + +