36 #ifndef NAV2_CORE__CONTROLLER_HPP_
37 #define NAV2_CORE__CONTROLLER_HPP_
42 #include "nav2_costmap_2d/costmap_2d_ros.hpp"
43 #include "nav2_ros_common/lifecycle_node.hpp"
44 #include "nav2_ros_common/tf2_factories.hpp"
45 #include "pluginlib/class_loader.hpp"
46 #include "geometry_msgs/msg/pose_stamped.hpp"
47 #include "geometry_msgs/msg/twist_stamped.hpp"
48 #include "nav_msgs/msg/path.hpp"
49 #include "nav2_core/goal_checker.hpp"
62 using Ptr = std::shared_ptr<nav2_core::Controller>;
75 const nav2::LifecycleNode::WeakPtr &,
76 std::string name, nav2::TransformBuffer::SharedPtr,
77 std::shared_ptr<nav2_costmap_2d::Costmap2DROS>) = 0;
119 const geometry_msgs::msg::PoseStamped & pose,
120 const geometry_msgs::msg::Twist & velocity,
122 const nav_msgs::msg::Path & transformed_global_plan,
123 const geometry_msgs::msg::PoseStamped & global_goal) = 0;
142 virtual void setSpeedLimit(
const double & speed_limit,
const bool & percentage) = 0;
controller interface that acts as a virtual base class for all controller plugins
virtual void newPathReceived(const nav_msgs::msg::Path &raw_global_path)=0
local setPlan - Notifies the Controller that a new plan is received from the Planner Server
virtual void activate()=0
Method to active planner and any threads involved in execution.
virtual void deactivate()=0
Method to deactivate planner and any threads involved in execution.
virtual geometry_msgs::msg::TwistStamped computeVelocityCommands(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::Twist &velocity, nav2_core::GoalChecker *goal_checker, const nav_msgs::msg::Path &transformed_global_plan, const geometry_msgs::msg::PoseStamped &global_goal)=0
Controller computeVelocityCommands - calculates the best command given the current pose and velocity.
virtual void setSpeedLimit(const double &speed_limit, const bool &percentage)=0
Limits the maximum linear speed of the robot.
virtual void cleanup()=0
Method to cleanup resources.
virtual ~Controller()
Virtual destructor.
virtual void configure(const nav2::LifecycleNode::WeakPtr &, std::string name, nav2::TransformBuffer::SharedPtr, std::shared_ptr< nav2_costmap_2d::Costmap2DROS >)=0
virtual bool cancel()
Cancel the current control action.
virtual void reset()
Reset the state of the controller if necessary after task is exited.
Function-object for checking whether a goal has been reached.