15#include "auto_apms_interfaces/action/mission.hpp"
17#include "auto_apms_behavior_tree_core/node.hpp"
19#define INPUT_KEY_DO_RESTART "do_restart"
24class MissionAction :
public auto_apms_behavior_tree::core::RosActionNode<auto_apms_interfaces::action::Mission>
27 using RosActionNode::RosActionNode;
29 static BT::PortsList providedPorts()
32 {BT::InputPort<bool>(INPUT_KEY_DO_RESTART,
false,
"Wether to restart (true) or resume (false) the mission.")});
35 bool setGoal(Goal & goal)
37 if (
const BT::Expected<bool> expected = getInput<bool>(INPUT_KEY_DO_RESTART)) {
38 goal.do_restart = expected.value();
40 RCLCPP_ERROR(logger_,
"%s", expected.error().c_str());
static BT::PortsList providedBasicPorts(BT::PortsList addition)
#define AUTO_APMS_BEHAVIOR_TREE_DECLARE_NODE(type)
Macro for registering a behavior tree node plugin.
Implementation of PX4 mode peers offered by px4_ros2_cpp enabling integration with AutoAPMS.