Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Public Member Functions | Protected Attributes | List of all members
nav2_core::NavigatorMuxer Class Reference

A class to control the state of the BT navigator by allowing only a single plugin to be processed at a time. More...

#include <nav2_core/include/nav2_core/behavior_tree_navigator.hpp>

Collaboration diagram for nav2_core::NavigatorMuxer:
Collaboration graph
[legend]

Public Member Functions

 NavigatorMuxer ()
 A Navigator Muxer constructor.
 
bool isNavigating ()
 Get the navigator muxer state. More...
 
void startNavigating (nav2_core::NavigatorBase *navigator)
 Start navigating with a given navigator. More...
 
void stopNavigating (nav2_core::NavigatorBase *navigator)
 Stop navigating with a given navigator. More...
 
void preemptCurrentNavigator ()
 
bool isCurrentNavigator (nav2_core::NavigatorBase *navigator)
 Check if the given navigator is the currently active navigator. More...
 

Protected Attributes

nav2_core::NavigatorBasecurrent_navigator_ {nullptr}
 
std::mutex mutex_
 

Detailed Description

A class to control the state of the BT navigator by allowing only a single plugin to be processed at a time.

Definition at line 98 of file behavior_tree_navigator.hpp.

Member Function Documentation

◆ isCurrentNavigator()

bool nav2_core::NavigatorMuxer::isCurrentNavigator ( nav2_core::NavigatorBase navigator)
inline

Check if the given navigator is the currently active navigator.

Parameters
navigatorNavigator to check
Returns
bool If the navigator is the current active one

Definition at line 163 of file behavior_tree_navigator.hpp.

Referenced by nav2_core::BehaviorTreeNavigator< ActionT >::onGoalReceived().

Here is the caller graph for this function:

◆ isNavigating()

bool nav2_core::NavigatorMuxer::isNavigating ( )
inline

Get the navigator muxer state.

Returns
bool If a navigator is in progress

Definition at line 111 of file behavior_tree_navigator.hpp.

Referenced by nav2_core::BehaviorTreeNavigator< ActionT >::onGoalReceived().

Here is the caller graph for this function:

◆ startNavigating()

void nav2_core::NavigatorMuxer::startNavigating ( nav2_core::NavigatorBase navigator)
inline

Start navigating with a given navigator.

Parameters
stringName of the navigator to start

Definition at line 121 of file behavior_tree_navigator.hpp.

Referenced by nav2_core::BehaviorTreeNavigator< ActionT >::onGoalReceived().

Here is the caller graph for this function:

◆ stopNavigating()

void nav2_core::NavigatorMuxer::stopNavigating ( nav2_core::NavigatorBase navigator)
inline

Stop navigating with a given navigator.

Parameters
stringName of the navigator ending task

Definition at line 138 of file behavior_tree_navigator.hpp.

Referenced by nav2_core::BehaviorTreeNavigator< ActionT >::onCompletion().

Here is the caller graph for this function:

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