local_controller_node.h
Go to the documentation of this file.
1 //
2 // Created by axelbr on 21.08.19.
3 //
4 
5 #ifndef SRC_LOCAL_CONTROLLER_NODE_H
6 #define SRC_LOCAL_CONTROLLER_NODE_H
7 
8 #include <ros/ros.h>
9 #include <geometry_msgs/Twist.h>
10 #include <geometry_msgs/PoseWithCovarianceStamped.h>
11 #include <tuw_nav_msgs/ControllerState.h>
12 #include <nav_msgs/Path.h>
13 #include <std_msgs/String.h>
14 #include <memory>
16 #include <tuw_local_controller_msgs/ExecutePathAction.h>
17 #include "controller.h"
18 
19 namespace velocity_controller {
20 
22  float max_v = 0.8;
23  float max_w = 1.0;
24  float goal_radius = 0.2;
25  float Kp = 5.0;
26  float Ki = 0.0;
27  float Kd = 1.0;
28  };
29 
31  //special class-member functions.
32  public:
39 
40  ros::NodeHandle n_;
41  ros::NodeHandle n_param_;
42  std::unique_ptr<ros::Rate> rate_;
43 
44  private:
49  ros::Time last_update_;
51 
52  void onPoseReceived(const geometry_msgs::PoseWithCovarianceStampedConstPtr& pose);
53 
54  void onCommandReceived(const std_msgs::String command);
55 
56  void onGoalReceived(const tuw_local_controller_msgs::ExecutePathGoalConstPtr& goal);
57 
58  void publishControllerState(const nav_msgs::Path &path);
59 
60  void setupController(const nav_msgs::Path &path, const ControllerConfig& config);
61  };
62 
63 } // namespace velocity_controller
64 
65 #endif //SRC_LOCAL_CONTROLLER_NODE_H
actionlib::SimpleActionServer< tuw_local_controller_msgs::ExecutePathAction > action_server


tuw_multi_robot_ctrl
Author(s): Benjamin Binder
autogenerated on Mon Feb 28 2022 23:57:38