From 74dd39fd6932f11abae1a02cbcd68579638b0f47 Mon Sep 17 00:00:00 2001
From: bpwilcox <bpwilcox@eng.ucsd.edu>
Date: Fri, 4 Oct 2019 15:05:32 -0700
Subject: [PATCH] allow params for wait_action

---
 .../include/nav2_behavior_tree/wait_action.hpp        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/wait_action.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/wait_action.hpp
index 79b1c65f..ca4072db 100644
--- a/nav2_behavior_tree/include/nav2_behavior_tree/wait_action.hpp
+++ b/nav2_behavior_tree/include/nav2_behavior_tree/wait_action.hpp
@@ -28,8 +28,8 @@ namespace nav2_behavior_tree
 class WaitAction : public BtActionNode<nav2_msgs::action::Wait>
 {
 public:
-  explicit WaitAction(const std::string & action_name)
-  : BtActionNode<nav2_msgs::action::Wait>(action_name)
+  explicit WaitAction(const std::string & action_name, const BT::NodeParameters & params)
+  : BtActionNode<nav2_msgs::action::Wait>(action_name, params)
   {
   }
 
@@ -45,6 +45,13 @@ public:
 
     goal_.time.sec = duration;
   }
+
+  // Any BT node that accepts parameters must provide a requiredNodeParameters method
+  static const BT::NodeParameters & requiredNodeParameters()
+  {
+    static BT::NodeParameters params = {{"wait_duration", "1"}};
+    return params;
+  }
 };
 
 }  // namespace nav2_behavior_tree
-- 
GitLab