17#define INPUT_KEY_MSG "message"
22class ThrowException :
public BT::SyncActionNode
25 using SyncActionNode::SyncActionNode;
27 static BT::PortsList providedPorts()
29 return { BT::InputPort<std::string>(
INPUT_KEY_MSG,
"Error message. Can be empty") };
32 BT::NodeStatus tick()
final
35 auto node_name = name() == registrationName() ? registrationName() : registrationName() +
": " + name();
36 if (!input.has_value())
38 throw exceptions::RosNodeError(node_name +
" - An error occured");
40 throw exceptions::RosNodeError(node_name +
" - " + input.value());
#define AUTO_APMS_BEHAVIOR_TREE_REGISTER_NODE(type)
Macro for registering a behavior tree node plugin.