|
AutoAPMS
Streamlining behaviors in ROS 2
|
Condition node that succeeds once the vehicle's arming state matches the expected one. More...

Additional Inherited Members | |
Public Member Functions inherited from RosSubscriberNode< px4_msgs::msg::VehicleStatus > | |
| RosSubscriberNode (const std::string &instance_name, const Config &config, Context context, const rclcpp::QoS &qos={10}) | |
| Constructor. | |
| virtual BT::NodeStatus | onMessageReceived (const px4_msgs::msg::VehicleStatus &msg) |
| Callback invoked when the node is ticked and a valid message has been received. | |
| bool | createSubscriber (const std::string &topic_name) |
| Create the ROS 2 subscriber. | |
| std::string | getTopicName () const |
| Get the name of the topic name this node subscribes to. | |
Static Public Member Functions inherited from RosSubscriberNode< px4_msgs::msg::VehicleStatus > | |
| static BT::PortsList | providedBasicPorts (BT::PortsList addition) |
| Derived nodes implementing the static method RosSubscriberNode::providedPorts may call this method to also include the default port for ROS 2 behavior tree nodes. | |
| static BT::PortsList | providedPorts () |
| If a behavior tree requires input/output data ports, the developer must define this method accordingly. | |
Protected Member Functions inherited from RosNodeBase | |
| void | applyPortAliasing (const BT::TreeNode *node) const |
| Support the node manifest 'port_alias' feature: copy the aliased port values onto the original ports the node implementation reads. | |
| template<typename InstanceT> | |
| std::shared_ptr< InstanceT > | getSharedEntity (const std::string &entity_name, const std::function< std::shared_ptr< InstanceT >()> &factory) |
Retrieve a process-wide shared ROS 2 entity, creating it via factory on first use. | |
Condition node that succeeds once the vehicle's arming state matches the expected one.
Subscribes to fmu/out/vehicle_status (message version suffix resolved at runtime) and compares the current arming_state against the arming_state input port (px4_msgs::msg::VehicleStatus::ARMING_STATE_*: 1 = DISARMED, 2 = ARMED). Returns SUCCESS if they match, otherwise FAILURE (also while no vehicle status has been received yet).
Wrap this node in a retry decorator to wait for an arm/disarm command - issued via SendVehicleCommand (VEHICLE_CMD_COMPONENT_ARM_DISARM) - to actually take effect on the vehicle (see the SetArm/SetDisarm behaviors).
Definition at line 38 of file check_arming_state.cpp.