From c7caa69bfa03aa0c179815b676ba9d4e6c8aabc9 Mon Sep 17 00:00:00 2001 From: Pimpest <82343504+pimpest@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:40:14 +0100 Subject: [PATCH] Added print to print out new calculated width --- toid_bt/behavior_trees/behavior1.xml | 78 +++++++++++++++++-- .../behavior_trees/calibration_routines.xml | 39 ++++++++-- .../toid_bt/plugins/end_calib_action.hpp | 4 +- 3 files changed, 106 insertions(+), 15 deletions(-) diff --git a/toid_bt/behavior_trees/behavior1.xml b/toid_bt/behavior_trees/behavior1.xml index b6becc0..f4ed8bd 100644 --- a/toid_bt/behavior_trees/behavior1.xml +++ b/toid_bt/behavior_trees/behavior1.xml @@ -1,17 +1,81 @@ + + + + + + + + + - - - + + + + + + + + + Action server name + + + + + + + Action server name + + + + + Action server name + + + Service name + + diff --git a/toid_bt/behavior_trees/calibration_routines.xml b/toid_bt/behavior_trees/calibration_routines.xml index 35c10c9..e19211a 100644 --- a/toid_bt/behavior_trees/calibration_routines.xml +++ b/toid_bt/behavior_trees/calibration_routines.xml @@ -2,17 +2,22 @@ - + - - @@ -76,6 +81,8 @@ action_name=""/> + + @@ -84,17 +91,21 @@ - + + Service name + @@ -123,6 +134,20 @@ Action server name + + + + + + Action server name + diff --git a/toid_bt/include/toid_bt/plugins/end_calib_action.hpp b/toid_bt/include/toid_bt/plugins/end_calib_action.hpp index bfb4fb2..2512afc 100644 --- a/toid_bt/include/toid_bt/plugins/end_calib_action.hpp +++ b/toid_bt/include/toid_bt/plugins/end_calib_action.hpp @@ -33,7 +33,7 @@ public: bool setRequest(typename Request::SharedPtr & request) override { auto width = getInput("width").value(); - auto count = getInput("count").value(); + double count = getInput("count").value(); geometry_msgs::msg::PoseStamped pose; get_pose(pose); @@ -42,6 +42,8 @@ public: double new_width = width * (1 + (theta / (2 * M_PI * count))); request->data = new_width; + RCLCPP_INFO(logger(), "width is %lf", new_width); + setOutput("new_width", new_width); return true; }