MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / tick

Method tick

tests/gtest_blackboard.cpp:684–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682 {}
683
684 BT::NodeStatus tick() override
685 {
686 const auto in_pos = getInput<Point>("pos_in");
687 if(!in_pos.has_value())
688 return BT::NodeStatus::FAILURE;
689 Point _pos = in_pos.value();
690 _pos.x += getInput<double>("x").value_or(0.0);
691 _pos.y += getInput<double>("y").value_or(0.0);
692 setOutput("pos_out", _pos);
693 return BT::NodeStatus::SUCCESS;
694 }
695
696 static BT::PortsList providedPorts()
697 {

Callers

nothing calls this directly

Calls 2

has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected