Class GoalReachedCondition

Inheritance Relationships

Base Type

  • public BT::ConditionNode

Class Documentation

class GoalReachedCondition : public BT::ConditionNode

A BT::ConditionNode that returns SUCCESS when a specified goal is reached and FAILURE otherwise.

Public Functions

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

A constructor for nav2_behavior_tree::GoalReachedCondition.

Parameters:
  • condition_name – Name for the XML tag for this node

  • conf – BT node configuration

GoalReachedCondition() = delete
~GoalReachedCondition() override

A destructor for nav2_behavior_tree::GoalReachedCondition.

BT::NodeStatus tick() override

The main override required by a BT action.

Returns:

BT::NodeStatus Status of tick execution

void initialize()

Function to read parameters and initialize class variables.

bool isGoalReached()

Checks if the current robot pose lies within a given distance from the goal.

Returns:

bool true when goal is reached, false otherwise

Public Static Functions

static inline BT::PortsList providedPorts()

Creates list of BT ports.

Returns:

BT::PortsList Containing node-specific ports

Protected Functions

inline void cleanup()

Cleanup function.