15 #ifndef NAV2_BEHAVIOR_TREE__PLUGINS__CONDITION__IS_WITHIN_PATH_TRACKING_BOUNDS_CONDITION_HPP_
16 #define NAV2_BEHAVIOR_TREE__PLUGINS__CONDITION__IS_WITHIN_PATH_TRACKING_BOUNDS_CONDITION_HPP_
21 #include "behaviortree_cpp/condition_node.h"
22 #include "nav2_ros_common/lifecycle_node.hpp"
23 #include "nav2_msgs/msg/tracking_feedback.hpp"
24 #include "rclcpp/clock.hpp"
25 #include "rclcpp/logger.hpp"
27 namespace nav2_behavior_tree
48 const std::string & condition_name,
49 const BT::NodeConfiguration & conf);
62 BT::NodeStatus
tick()
override;
71 BT::InputPort<double>(
"max_error_left", 0.5,
72 "Maximum allowed position tracking error left side"),
73 BT::InputPort<double>(
"max_error_right", 0.5,
74 "Maximum allowed position tracking error on the right side"),
75 BT::InputPort<double>(
"max_error_heading", 3.14,
76 "Maximum allowed heading tracking error in radians"),
77 BT::InputPort<nav2_msgs::msg::TrackingFeedback>(
"tracking_feedback",
78 "Current tracking feedback message")
83 rclcpp::Clock::SharedPtr clock_;
84 rclcpp::Logger logger_{rclcpp::get_logger(
"IsWithinPathTrackingBoundsCondition")};
86 double max_error_left_;
87 double max_error_right_;
88 double max_error_heading_;
89 nav2_msgs::msg::TrackingFeedback tracking_feedback_;
A BT::ConditionNode that returns SUCCESS when the current path tracking error is within specified bou...
static BT::PortsList providedPorts()
Creates list of BT ports.
BT::NodeStatus tick() override
The main override required by a BT action.
void initialize()
Function to read parameters and initialize class variables.