diff --git a/nav2_behavior_tree/plugins/control/persistent_sequence.cpp b/nav2_behavior_tree/plugins/control/persistent_sequence.cpp index 1886deb3d5c..f38b78dc85d 100644 --- a/nav2_behavior_tree/plugins/control/persistent_sequence.cpp +++ b/nav2_behavior_tree/plugins/control/persistent_sequence.cpp @@ -29,7 +29,11 @@ BT::NodeStatus PersistentSequenceNode::tick() const int children_count = children_nodes_.size(); int current_child_idx; - getInput("current_child_idx", current_child_idx); + if (!getInput("current_child_idx", current_child_idx)) { + throw BT::RuntimeError( + "Missing required input [current_child_idx] in PersistentSequenceNode. " + "Set via