AutoAPMS
Streamlining behaviors in ROS 2
Loading...
Searching...
No Matches
SendCmdSetNavState Class Reference

Behavior tree node that switches the active PX4 flight mode while respecting mode-executor ownership. More...

Inheritance diagram for SendCmdSetNavState:

Additional Inherited Members

- Protected Member Functions inherited from SendVehicleCommand
uint16_t resolveSourceComponent ()
 Transitively resolve the in-charge mode executor's source component from the global blackboard.
 
- 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.
 

Detailed Description

Behavior tree node that switches the active PX4 flight mode while respecting mode-executor ownership.

A specialization of SendVehicleCommand that fixes the command to VEHICLE_CMD_SET_NAV_STATE and exposes the target navigation state through a single, friendly nav_state input port instead of the raw command parameters.

As with any SendVehicleCommand, the command's source_component is resolved from the global blackboard so that an in-charge auto_apms_px4::BehaviorModeExecutor can attribute the mode change to itself. If no executor is in charge, the command is sent with the default source component (0).

Note
This node only requests the mode change; it returns SUCCESS as soon as the command has been published and does not wait for the vehicle to actually enter the requested mode. Pair it with CheckNavState to wait for the transition to complete.

Definition at line 39 of file send_cmd_set_nav_state.cpp.


The documentation for this class was generated from the following file: