Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc9df60

Browse files
add ability to reset node's status
1 parent f5a1b0d commit fc9df60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/behaviortree_cpp_v3/tree_node.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ class TreeNode
171171
virtual std::string status_description() const {
172172
return (toStr(status_) + ":NO DESC AVAILABLE\n");
173173
}
174+
175+
void resetStatus(){
176+
setStatus(NodeStatus::IDLE);
177+
}
178+
174179
protected:
175180
/// Method to be implemented by the user
176181
virtual BT::NodeStatus tick() = 0;

0 commit comments

Comments
 (0)