|
AutoAPMS
Streamlining behaviors in ROS 2
|
Template for ChangeState nodes. More...

Additional Inherited Members | |
Public Member Functions inherited from RosServiceNode< lifecycle_msgs::srv::ChangeState > | |
| RosServiceNode (const std::string &instance_name, const Config &config, Context context) | |
| Constructor. | |
| virtual BT::NodeStatus | onResponseReceived (const typename Response::SharedPtr &response) |
| Callback invoked after the service response was received. | |
| virtual BT::NodeStatus | onFailure (ServiceNodeErrorCode error) |
| Callback invoked when one of the errors in ServiceNodeErrorCode occur. | |
| bool | createClient (const std::string &service_name) |
| Create the client of the ROS 2 service. | |
| std::string | getServiceName () const |
| Get the name of the service this node connects with. | |
Static Public Member Functions inherited from RosServiceNode< lifecycle_msgs::srv::ChangeState > | |
| static BT::PortsList | providedBasicPorts (BT::PortsList addition) |
| ADerived nodes implementing the static method RosServiceNode::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. | |
Template for ChangeState nodes.
The targeted node's service name is constructed from the 'node' input port as '<node>/change_state'. When TRANSITION_ID < 0 (the generic case), the transition ID is read from the 'transition' input port at tick time, allowing full runtime configurability. For non-negative TRANSITION_ID values the transition is baked into the class at compile time and no 'transition' port is exposed — only 'node' is required.
Transition IDs are defined in lifecycle_msgs/msg/Transition: configure=1, cleanup=2, activate=3, deactivate=4, unconfigured_shutdown=5, inactive_shutdown=6, active_shutdown=7
| TRANSITION_ID | Compile-time transition ID. Use -1 (default) for the generic version. |
Definition at line 93 of file lifecycle_nodes.cpp.