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/rclcpp.hpp"
26 namespace nav2_behavior_tree
47 const std::string & condition_name,
48 const BT::NodeConfiguration & conf);
61 BT::NodeStatus
tick()
override;
70 BT::InputPort<double>(
"max_error_left", 0.5,
71 "Maximum allowed position tracking error left side"),
72 BT::InputPort<double>(
"max_error_right", 0.5,
73 "Maximum allowed position tracking error on the right side"),
74 BT::InputPort<double>(
"max_error_heading", 3.14,
75 "Maximum allowed heading tracking error in radians"),
76 BT::InputPort<nav2_msgs::msg::TrackingFeedback>(
"tracking_feedback",
77 "Current tracking feedback message")
82 rclcpp::Clock::SharedPtr clock_;
83 rclcpp::Logger logger_{rclcpp::get_logger(
"IsWithinPathTrackingBoundsCondition")};
85 double max_error_left_;
86 double max_error_right_;
87 double max_error_heading_;
88 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.