Go to the documentation of this file.
13 #ifndef ACTION_SETBLACKBOARD_NODE_H
14 #define ACTION_SETBLACKBOARD_NODE_H
47 return {
InputPort(
"value",
"Value to be written int othe output_key"),
49 "value should be written") };
55 std::string output_key;
56 if(!
getInput(
"output_key", output_key))
66 const auto input_key = std::string(stripped_key);
67 std::shared_ptr<Blackboard::Entry> src_entry =
69 std::shared_ptr<Blackboard::Entry> dst_entry =
74 throw RuntimeError(
"Can't find the port referred by [value]");
81 dst_entry->value = src_entry->value;
Result getInput(const std::string &key, T &destination) const
const NodeConfig & config() const
std::string_view StringView
SetBlackboardNode(const std::string &name, const NodeConfig &config)
std::pair< std::string, PortInfo > InputPort(StringView name, StringView description={})
PortsRemapping input_ports
The SetBlackboard is action used to store a string into an entry of the Blackboard specified in "outp...
std::pair< std::string, PortInfo > BidirectionalPort(StringView name, StringView description={})
Blackboard::Ptr blackboard
std::unordered_map< std::string, PortInfo > PortsList
static PortsList providedPorts()
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
void setRegistrationID(StringView ID)
const std::string & name() const
Name of the instance, not the type.
static bool isBlackboardPointer(StringView str, StringView *stripped_pointer=nullptr)
Check a string and return true if it matches the pattern: {...}.
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...