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

Function SaySomethingSimple

sample_nodes/dummy_nodes.cpp:64–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64BT::NodeStatus SaySomethingSimple(BT::TreeNode& self)
65{
66 auto msg = self.getInput<std::string>("message");
67 if(!msg)
68 {
69 throw BT::RuntimeError("missing required input [message]: ", msg.error());
70 }
71
72 std::cout << "Robot says: " << msg.value() << std::endl;
73 return BT::NodeStatus::SUCCESS;
74}
75
76} // namespace DummyNodes

Callers

nothing calls this directly

Calls 2

RuntimeErrorClass · 0.85
valueMethod · 0.45

Tested by

no test coverage detected