Skip to content

Commit

Permalink
feat: bump behaviortree_cpp to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Kemal Bektas committed Feb 16, 2023
1 parent 04908b8 commit 7afbe86
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions dependencies.repos
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ repositories:
type: git
url: https://github.com/BehaviorTree/Groot.git
version: master
behavior_tree_cpp:
type: git
url: https://github.com/BehaviorTree/BehaviorTree.CPP.git
version: master
4 changes: 2 additions & 2 deletions tb3_autonomy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(nav2_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(behaviortree_cpp_v3 REQUIRED)
find_package(behaviortree_cpp REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(OpenCV REQUIRED)
find_package(image_transport REQUIRED)
Expand Down Expand Up @@ -50,7 +50,7 @@ set(AUTONOMY_SOURCES
set(TARGET_DEPENDS
ament_index_cpp rclcpp rclcpp_action
nav2_msgs sensor_msgs cv_bridge image_transport
behaviortree_cpp_v3 tf2 tf2_ros tf2_geometry_msgs yaml-cpp
behaviortree_cpp tf2 tf2_ros tf2_geometry_msgs yaml-cpp
)
include_directories(include)
add_executable(autonomy_node_cpp src/autonomy_node.cpp ${AUTONOMY_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion tb3_autonomy/include/navigation_behaviors.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_action/rclcpp_action.hpp"
#include "nav2_msgs/action/navigate_to_pose.hpp"
#include "behaviortree_cpp_v3/behavior_tree.h"
#include "behaviortree_cpp/behavior_tree.h"

// Sets number of locations from list.
class SetLocations : public BT::SyncActionNode
Expand Down
2 changes: 1 addition & 1 deletion tb3_autonomy/include/vision_behaviors.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "rclcpp/rclcpp.hpp"
#include "image_transport/image_transport.hpp"
#include "sensor_msgs/msg/image.hpp"
#include "behaviortree_cpp_v3/behavior_tree.h"
#include "behaviortree_cpp/behavior_tree.h"

// HSV Thresholding parameters
// The convention is {H_MIN, H_MAX, S_MIN, S_MAX, V_MIN, V_MAX}
Expand Down
2 changes: 1 addition & 1 deletion tb3_autonomy/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<depend>rclcpp</depend>
<depend>rclcpp_action</depend>
<depend>ament_index_cpp</depend>
<depend>behaviortree_cpp_v3</depend>
<depend>behaviortree_cpp</depend>
<depend>nav2_msgs</depend>
<depend>sensor_msgs</depend>
<depend>tb3_worlds</depend>
Expand Down
6 changes: 3 additions & 3 deletions tb3_autonomy/src/autonomy_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "rclcpp/rclcpp.hpp"
#include "ament_index_cpp/get_package_share_directory.hpp"
#include "behaviortree_cpp_v3/bt_factory.h"
#include "behaviortree_cpp_v3/loggers/bt_zmq_publisher.h"
#include "behaviortree_cpp/bt_factory.h"
#include "behaviortree_cpp/loggers/bt_zmq_publisher.h"
#include "yaml-cpp/yaml.h"

#include "navigation_behaviors.h"
Expand Down Expand Up @@ -111,7 +111,7 @@ class AutonomyNode : public rclcpp::Node {

void update_behavior_tree() {
// Tick the behavior tree.
BT::NodeStatus tree_status = tree_.tickRoot();
BT::NodeStatus tree_status = tree_.tickOnce();
if (tree_status == BT::NodeStatus::RUNNING) {
return;
}
Expand Down

0 comments on commit 7afbe86

Please sign in to comment.