auto_dock.h
Go to the documentation of this file.
1 /*************************************************************************
2  > File Name: auto_dock.h
3  > Author:Rocwang
4  > Mail: yowlings@gmail.com; Github:https://github.com/yowlings
5  > Created Time: 2018年06月04日 星期一 14时41分20秒
6  ************************************************************************/
7 
8 #ifndef _AUTO_DOCK_H
9 #define _AUTO_DOCK_H
10 #include "ros/ros.h"
11 #include <map>
12 #include <vector>
13 #include <math.h>
14 #include "sensor_msgs/LaserScan.h"
15 #include "xbot_navi/AutodockState.h"
16 #include "std_msgs/Bool.h"
17 #include "geometry_msgs/TwistStamped.h"
18 
19 #include "boost/thread.hpp"
20 using namespace std;
21 namespace xbot {
22 
23 class AutoDock {
24 public:
25  AutoDock();
26  ~AutoDock();
27 
28 
29  void init();
30  void laser_scanCB(const sensor_msgs::LaserScan);
31  void launch_autodockCB(const std_msgs::Bool);
32  void pub_autodock_state();
33  void cal_docker_pose();
34  void search_docker();
35  void heading_docker();
36  bool is_vertical();
37  void go_direct();
38  void go_middlepose();
39 
40 
41 
42 private:
43  float theta[3];
44  float distance[3];
45  int p[3];
46  float theta_diff;
55  xbot_navi::AutodockState autodock_state_msg;
56  geometry_msgs::Twist cmd_vel_msg;
57 
58 
59  boost::thread* state_pub_thread;
60  boost::thread* search_dock_thread;
61  boost::thread* heading_docker_thread;
62 
63 };
64 
65 }
66 
67 #endif
float vertical_theta_thresh
Definition: auto_dock.h:47
xbot_navi::AutodockState autodock_state_msg
Definition: auto_dock.h:55
ros::Subscriber launch_autodock_sub
Definition: auto_dock.h:52
geometry_msgs::Twist cmd_vel_msg
Definition: auto_dock.h:56
float theta_diff
Definition: auto_dock.h:46
bool get_middlepose
Definition: auto_dock.h:49
double distance(double x0, double y0, double x1, double y1)
bool found_docker
Definition: auto_dock.h:48
bool reached_docker
Definition: auto_dock.h:50
boost::thread * heading_docker_thread
Definition: auto_dock.h:61
Definition: auto_dock.h:21
boost::thread * search_dock_thread
Definition: auto_dock.h:60
boost::thread * state_pub_thread
Definition: auto_dock.h:59
ros::Publisher xbot_cmd_vel_pub
Definition: auto_dock.h:53
ros::Subscriber laser_scan_sub
Definition: auto_dock.h:51
ros::Publisher autodock_state_pub
Definition: auto_dock.h:54


xbot_navi
Author(s):
autogenerated on Sat Oct 10 2020 03:27:50