15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__CONDITION__IS_GOAL_NEARBY_CONDITION_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__CONDITION__IS_GOAL_NEARBY_CONDITION_HPP_
23 #include "behaviortree_cpp/condition_node.h"
24 #include "geometry_msgs/msg/pose_stamped.hpp"
25 #include "nav2_behavior_tree/bt_utils.hpp"
26 #include "nav2_ros_common/lifecycle_node.hpp"
27 #include "nav_msgs/msg/path.hpp"
28 #include "rclcpp/rclcpp.hpp"
29 #include "nav2_ros_common/tf2_factories.hpp"
31 namespace nav2_behavior_tree
63 BT::NodeStatus
tick()
override;
72 BT::InputPort<nav_msgs::msg::Path>(
"path",
"Planned path"),
73 BT::InputPort<double>(
74 "proximity_threshold", 1.0,
75 "Proximity length (m) of the remaining path considered as a nearby"),
76 BT::InputPort<double>(
77 "max_robot_pose_search_dist", -1.0,
78 "Maximum forward integrated distance along the path "
79 "(starting from the last detected pose) to bound the search for the closest pose "
80 "to the robot. When set to negative value (default), whole path is searched every time"),
81 BT::InputPort<std::string>(
"global_frame",
"Global frame"),
82 BT::InputPort<std::string>(
"robot_base_frame",
"Robot base frame"),
87 nav2::LifecycleNode::SharedPtr node_;
88 nav2::TransformBuffer::SharedPtr tf_buffer_;
89 nav_msgs::msg::Path path_;
90 std::vector<geometry_msgs::msg::PoseStamped>::iterator closest_pose_detection_begin_;
91 double transform_tolerance_;
92 std::string global_frame_;
93 std::string robot_base_frame_;
A BT::ConditionNode that returns SUCCESS when remaining length of the current planned path is less th...
static BT::PortsList providedPorts()
Creates list of BT ports.
BT::NodeStatus tick() override
The main override required by a BT action.