15#include "auto_apms_behavior_tree_core/node.hpp"
16#include "auto_apms_interfaces/action/command_tree_executor.hpp"
18#define INPUT_KEY_EXECUTOR_NAME "executor"
23using CommandAction = auto_apms_interfaces::action::CommandTreeExecutor;
25template <u
int8_t command>
29 using RosActionNode::RosActionNode;
31 static BT::PortsList providedPorts()
34 return {BT::InputPort<std::string>(INPUT_KEY_EXECUTOR_NAME,
"Name of the executor to command.")};
37 bool setGoal(Goal & goal)
override final
39 goal.command = command;
44class ResumeExecutor :
public CommandExecutorTemplate<CommandAction::Goal::COMMAND_RESUME>
47 using CommandExecutorTemplate::CommandExecutorTemplate;
50class PauseExecutor :
public CommandExecutorTemplate<CommandAction::Goal::COMMAND_PAUSE>
53 using CommandExecutorTemplate::CommandExecutorTemplate;
56class HaltExecutor :
public CommandExecutorTemplate<CommandAction::Goal::COMMAND_HALT>
59 using CommandExecutorTemplate::CommandExecutorTemplate;
62class TerminateExecutor :
public CommandExecutorTemplate<CommandAction::Goal::COMMAND_TERMINATE>
65 using CommandExecutorTemplate::CommandExecutorTemplate;
Generic behavior tree node wrapper for a ROS 2 action client.
#define AUTO_APMS_BEHAVIOR_TREE_DECLARE_NODE(type)
Macro for registering a behavior tree node plugin.
Useful tooling for incorporating behavior trees for task development.