File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
nav2_behavior_tree/include/nav2_behavior_tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,10 @@ class BtActionNode : public BT::ActionNodeBase
194
194
// reset the flag to send the goal or not, allowing the user the option to set it in on_tick
195
195
should_send_goal_ = true ;
196
196
197
+ // Clear the input and output messages to make sure we have no leftover from previous calls
198
+ goal_ = typename ActionT::Goal ();
199
+ result_ = typename rclcpp_action::ClientGoalHandle<ActionT>::WrappedResult ();
200
+
197
201
// user defined callback, may modify "should_send_goal_".
198
202
on_tick ();
199
203
Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ class BtServiceNode : public BT::ActionNodeBase
138
138
// allowing the user the option to set it in on_tick
139
139
should_send_request_ = true ;
140
140
141
+ // Clear the input request to make sure we have no leftover from previous calls
142
+ request_ = std::make_shared<typename ServiceT::Request>();
143
+
141
144
// user defined callback, may modify "should_send_request_".
142
145
on_tick ();
143
146
You can’t perform that action at this time.
0 commit comments