15#include "auto_apms_behavior_tree_core/node.hpp"
16#include "std_srvs/srv/trigger.hpp"
18#define OUTPUT_KEY_MESSAGE "message"
26 SetTrigger(
const std::string & instance_name,
const Config & config,
const Context & context)
31 static BT::PortsList providedPorts()
34 BT::OutputPort<std::string>(OUTPUT_KEY_MESSAGE,
"Service response: informational message."),
38 bool setRequest(Request::SharedPtr & )
override final {
return true; }
40 BT::NodeStatus onResponseReceived(
const Response::SharedPtr & response)
override final
42 setOutput(OUTPUT_KEY_MESSAGE, response->message);
43 return response->success ? BT::NodeStatus::SUCCESS : BT::NodeStatus::FAILURE;
Generic behavior tree node wrapper for a ROS 2 service client.
static BT::PortsList providedBasicPorts(BT::PortsList addition)
RosServiceNode(const std::string &instance_name, const Config &config, Context context)
#define AUTO_APMS_BEHAVIOR_TREE_REGISTER_NODE(type)
Macro for registering a behavior tree node plugin.
Powerful tooling for incorporating behavior trees for task development.