Nav2 Navigation Stack - humble  humble
ROS 2 Navigation Stack
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nav2_behavior_tree::PipelineSequence Class Reference

Type of sequence node that re-ticks previous children when a child returns running. More...

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

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

Public Member Functions

 PipelineSequence (const std::string &name)
 A constructor for nav2_behavior_tree::PipelineSequence. More...
 
 PipelineSequence (const std::string &name, const BT::NodeConfiguration &config)
 A constructor for nav2_behavior_tree::PipelineSequence. More...
 
void halt () override
 The other (optional) override required by a BT action to reset node state.
 

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...
 

Protected Attributes

std::size_t last_child_ticked_ = 0
 

Detailed Description

Type of sequence node that re-ticks previous children when a child returns running.

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

PipelineSequence | Restart | Tick All Previous Again

Tick All Previous Again means every node up till this one will be reticked. Even if a previous node returns Running, the next node 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. PipelineSequence would have returned FAILURE and halted all children, ending the sequence.

Usage in XML: <PipelineSequence>

Definition at line 55 of file pipeline_sequence.hpp.

Constructor & Destructor Documentation

◆ PipelineSequence() [1/2]

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

A constructor for nav2_behavior_tree::PipelineSequence.

Parameters
nameName for the XML tag for this node

Definition at line 24 of file pipeline_sequence.cpp.

◆ PipelineSequence() [2/2]

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

A constructor for nav2_behavior_tree::PipelineSequence.

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

Definition at line 29 of file pipeline_sequence.cpp.

Member Function Documentation

◆ providedPorts()

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

Creates list of BT ports.

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

Definition at line 80 of file pipeline_sequence.hpp.

◆ tick()

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

The main override required by a BT action.

Returns
BT::NodeStatus Status of tick execution

Definition at line 36 of file pipeline_sequence.cpp.


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