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

Behavior tree node that commands the vehicle to reposition to a global WGS84 location. More...

Inheritance diagram for SendCmdDoReposition:

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 commands the vehicle to reposition to a global WGS84 location.

A specialization of SendVehicleCommand that fixes the command to VEHICLE_CMD_DO_REPOSITION (192) and exposes the target latitude/longitude/altitude (plus optional yaw and ground speed) through friendly input ports instead of the raw command parameters. PX4 switches into its Reposition flight mode and flies to the requested WGS84 position.

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 reposition to itself. If no executor is in charge, the command is sent with the default source component (0).

Note
This node only requests the reposition; it returns SUCCESS as soon as the command has been published and does not wait for the vehicle to arrive. Pair it with GetGlobalPosition in a retry loop to build a behavior that only returns once the target location has actually been reached.

Definition at line 45 of file send_cmd_do_reposition.cpp.


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