local_multi_robot_controller_node.h
Go to the documentation of this file.
1 #ifndef TUW_MULTI_ROBOT_CTRL_LOCAL_MULTI_ROBOT_CONTROLLER_NODE_H
2 #define TUW_MULTI_ROBOT_CTRL_LOCAL_MULTI_ROBOT_CONTROLLER_NODE_H
3 
4 // ROS
5 #include <ros/ros.h>
6 #include <geometry_msgs/Twist.h>
7 #include <nav_msgs/Odometry.h>
8 #include <nav_msgs/Path.h>
9 #include <std_msgs/String.h>
10 #include <tuw_multi_robot_msgs/Route.h>
11 #include <tuw_multi_robot_msgs/RobotInfo.h>
12 
14 #include <memory>
15 
16 namespace velocity_controller
17 {
19 {
20  //special class-member functions.
21 public:
29  std::unique_ptr<ros::Rate> rate_;
33  void publishRobotInfo();
34  // ROS Publishers
35 private:
36  std::vector<ros::Publisher> pubCmdVel_;
38  std::vector<ros::Subscriber> subOdom_;
39  std::vector<ros::Subscriber> subRoute_;
40  std::vector<ros::Subscriber> subCtrl_;
41  std::string topic_cmdVel_;
42  std::string topic_odom_;
43  std::string topic_route_;
44  std::string topic_ctrl_;
45  std::string topic_robot_info_;
46  std::string frame_map_;
47  double update_rate_;
48  float max_vel_v_;
49  float max_vel_w_;
50  float goal_r_;
51  float Kp_val_;
52  float Ki_val_;
53  float Kd_val_;
56  int nr_of_finished_ = {0};
57  std::vector<bool> active_robots = {false};
58  bool first_path_set_ = {false};
60  std::string robot_prefix_;
61  std::vector<std::string> robot_names_;
62  std::vector<float> robot_radius_;
63  std::vector<geometry_msgs::PoseWithCovariance> robot_pose_;
64  void subOdomCb(const ros::MessageEvent<nav_msgs::Odometry const> &_event, int _topic);
66  void subCtrlCb(const ros::MessageEvent<std_msgs::String const> &_event, int _topic);
67  std::vector<SegmentController> controller;
68  int findRobotId(std::string robot_name);
69 };
70 
71 } // namespace velocity_controller
72 
73 #endif // TUW_MULTI_ROBOT_CTRL_LOCAL_MULTI_ROBOT_CONTROLLER_NODE_H
LocalMultiRobotControllerNode(ros::NodeHandle &n)
Construct a new Multi Segment Controller Node object.
void subCtrlCb(const ros::MessageEvent< std_msgs::String const > &_event, int _topic)
void subRouteCb(const ros::MessageEvent< tuw_multi_robot_msgs::Route const > &_event, int _topic)
void subOdomCb(const ros::MessageEvent< nav_msgs::Odometry const > &_event, int _topic)
std::vector< geometry_msgs::PoseWithCovariance > robot_pose_
ros::NodeHandle n_param_
Node handler to the current node.


tuw_multi_robot_ctrl
Author(s): Benjamin Binder
autogenerated on Mon Jun 10 2019 15:42:29