Skip to content

IsGoalNearby

Checks if the robot is near the goal by computing the remaining path length from the robot's current position to the goal. Returns SUCCESS when the remaining path length is less than the proximity threshold, otherwise returns FAILURE.

Parameter

transform_tolerance

Defined and declared in Behavior-Tree Navigator.

Example

bt_navigator:
  ros__parameters:
    # other bt_navigator parameters
    transform_tolerance: 0.1

Input Ports

path

Type: nav_msgs::msg::Path Default: N/A

The planned path to evaluate.

proximity_threshold

Type: double Default: 1.0

The remaining path length (in meters) considered as "nearby". When the remaining distance along the path is less than this threshold, the condition returns SUCCESS.

max_robot_pose_search_dist

Type: double Default: -1.0

Maximum forward integrated distance along the path (starting from the last detected pose) to bound the search for the closest pose to the robot. When set to a negative value (default), the entire path is searched every time. Setting this to a positive value (e.g., 1.0-2.0 meters) can improve performance when this BT node is ticked frequently to address looping or crossed paths (when present).

global_frame

Type: string Default: N/A

The global reference frame. If not provided, uses the BT Navigator's global_frame parameter value (map by default).

robot_base_frame

Type: string Default: N/A

Robot base frame. If not provided, uses the BT Navigator's robot_base_frame parameter value (base_link by default).

Example

<IsGoalNearby path="{path}" proximity_threshold="1.0" />