MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / OnTerminate

Method OnTerminate

roborts_decision/behavior_tree/behavior_node.h:715–734  ·  view source on GitHub ↗

* @brief Recover or reset something After getting the result * @param state Input behavior state */

Source from the content-addressed store, hash-verified

713 * @param state Input behavior state
714 */
715 virtual void OnTerminate(BehaviorState state){
716 switch (state){
717 case BehaviorState::IDLE:
718 ROS_INFO("%s %s IDLE!", name_.c_str(), __FUNCTION__);
719 break;
720 case BehaviorState::SUCCESS:
721 ROS_INFO("%s %s SUCCESS!", name_.c_str(), __FUNCTION__);
722 break;
723 case BehaviorState::FAILURE:
724 ROS_INFO("%s %s FAILURE!", name_.c_str(), __FUNCTION__);
725 break;
726 default:
727 ROS_INFO("%s %s ERROR!", name_.c_str(), __FUNCTION__);
728 return;
729 }
730 //TODO: no matter what state, the node would reset all running children to terminate.
731 for (unsigned int index = 0; index!=children_node_ptr_.size(); index++) {
732 children_node_ptr_.at(index)->Reset();
733 }
734 }
735
736 //! a list of result checker flags for each child node
737 std::vector<bool> children_node_done_;

Callers

nothing calls this directly

Calls 1

ResetMethod · 0.45

Tested by

no test coverage detected