Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
nav2_behavior_tree::NonblockingSequence Class Reference

Type of sequence node that keeps tickinng through all the children until all children return SUCCESS. More...

#include <nav2_behavior_tree/include/nav2_behavior_tree/plugins/control/nonblocking_sequence.hpp>

Inheritance diagram for nav2_behavior_tree::NonblockingSequence:
Inheritance graph
[legend]
Collaboration diagram for nav2_behavior_tree::NonblockingSequence:
Collaboration graph
[legend]

Public Member Functions

 NonblockingSequence (const std::string &name)
 A constructor for nav2_behavior_tree::NonblockingSequence. More...
 
 NonblockingSequence (const std::string &name, const BT::NodeConfiguration &config)
 A constructor for nav2_behavior_tree::NonblockingSequence. More...
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 Creates list of BT ports. More...
 

Protected Member Functions

BT::NodeStatus tick () override
 The main override required by a BT action. More...
 

Detailed Description

Type of sequence node that keeps tickinng through all the children until all children return SUCCESS.

Type of Control Node | Child Returns Failure | Child Returns Running

NonblockingSequence | Restart | Continue tickng next child

Continue ticking next child means every node after the running node will be ticked. Even if a previous node returns Running or Success, the subsequent nodes will be reticked.

As an example, let's say this node has 3 children: A, B and C. At the start, they are all IDLE.

| A | B | C |

| IDLE | IDLE | IDLE | | RUNNING | IDLE | IDLE | - at first A gets ticked. Assume it returns RUNNING

If any children at any time had returned FAILURE. NonblockingSequence would have returned FAILURE and halted all children, ending the sequence.

Usage in XML: <NonblockingSequence>

Definition at line 60 of file nonblocking_sequence.hpp.

Constructor & Destructor Documentation

◆ NonblockingSequence() [1/2]

nav2_behavior_tree::NonblockingSequence::NonblockingSequence ( const std::string &  name)
explicit

A constructor for nav2_behavior_tree::NonblockingSequence.

Parameters
nameName for the XML tag for this node

Definition at line 24 of file nonblocking_sequence.cpp.

◆ NonblockingSequence() [2/2]

nav2_behavior_tree::NonblockingSequence::NonblockingSequence ( const std::string &  name,
const BT::NodeConfiguration &  config 
)

A constructor for nav2_behavior_tree::NonblockingSequence.

Parameters
nameName for the XML tag for this node
configBT node configuration

Definition at line 29 of file nonblocking_sequence.cpp.

Member Function Documentation

◆ providedPorts()

static BT::PortsList nav2_behavior_tree::NonblockingSequence::providedPorts ( )
inlinestatic

Creates list of BT ports.

Returns
BT::PortsList Containing basic ports along with node-specific ports

Definition at line 80 of file nonblocking_sequence.hpp.

◆ tick()

BT::NodeStatus nav2_behavior_tree::NonblockingSequence::tick ( )
overrideprotected

The main override required by a BT action.

Returns
BT::NodeStatus Status of tick execution

Definition at line 36 of file nonblocking_sequence.cpp.


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