Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
Public Member Functions | Static Public Member Functions | List of all members
nav2_behavior_tree::IsBatteryLowCondition Class Reference

A BT::ConditionNode that listens to a battery topic and returns SUCCESS when battery is low and FAILURE otherwise. More...

#include <nav2_behavior_tree/include/nav2_behavior_tree/plugins/condition/is_battery_low_condition.hpp>

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

Public Member Functions

 IsBatteryLowCondition (const std::string &condition_name, const BT::NodeConfiguration &conf)
 A constructor for nav2_behavior_tree::IsBatteryLowCondition. More...
 
BT::NodeStatus tick () override
 The main override required by a BT action. More...
 
void initialize ()
 Function to read parameters and initialize class variables.
 
void createROSInterfaces ()
 Function to create ROS interfaces.
 

Static Public Member Functions

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

Detailed Description

A BT::ConditionNode that listens to a battery topic and returns SUCCESS when battery is low and FAILURE otherwise.

Note
This is an Asynchronous (long-running) node which may return a RUNNING state while executing. It will re-initialize when halted.

Definition at line 36 of file is_battery_low_condition.hpp.

Constructor & Destructor Documentation

◆ IsBatteryLowCondition()

nav2_behavior_tree::IsBatteryLowCondition::IsBatteryLowCondition ( const std::string &  condition_name,
const BT::NodeConfiguration &  conf 
)

A constructor for nav2_behavior_tree::IsBatteryLowCondition.

Parameters
condition_nameName for the XML tag for this node
confBT node configuration

Definition at line 23 of file is_battery_low_condition.cpp.

References initialize().

Here is the call graph for this function:

Member Function Documentation

◆ providedPorts()

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

Creates list of BT ports.

Returns
BT::PortsList Containing node-specific ports

Definition at line 70 of file is_battery_low_condition.hpp.

◆ tick()

BT::NodeStatus nav2_behavior_tree::IsBatteryLowCondition::tick ( )
override

The main override required by a BT action.

Returns
BT::NodeStatus Status of tick execution

Definition at line 70 of file is_battery_low_condition.cpp.

References initialize().

Here is the call graph for this function:

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