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

ROS-aware wrapper for the basic BT::ActionNodeBase (generic asynchronous action). More...

#include <auto_apms_behavior_tree_core/node/base/ros_action_node_base.hpp>

Inheritance diagram for RosActionNodeBase:

Additional Inherited Members

- 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

ROS-aware wrapper for the basic BT::ActionNodeBase (generic asynchronous action).

This is the most generic of the ROS-aware action bases: it adds the RosNodeContext, a per-instance logger and node-manifest support to the plain BT::ActionNodeBase without imposing any particular execution structure. Unlike RosStatefulActionNode (which supplies the onStart()/onRunning()/onHalted() state machine), the derived node implements tick() and halt() directly and is therefore free to run its own state machine - useful when the built-in stateful flow doesn't fit, e.g. a node that publishes a command and then waits for an acknowledgement while managing the transition between those phases itself.

The dedicated communication bases RosServiceNode and RosActionNode build on this wrapper too.

Implement tick() and halt() as usual for a BT::ActionNodeBase. Use status()/setStatus()/resetStatus() to track the phase (IDLE on the first tick, RUNNING while awaiting completion).

Definition at line 41 of file ros_action_node_base.hpp.


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