bed_detection.h
Go to the documentation of this file.
1 /*************************************************************
2  Copyright (C) 2019 Earth Rover Limited. All rights reserved.
3 *************************************************************/
4 
12 #ifndef __BED_DETECTION_CLASS_H__
13 #define __BED_DETECTION_CLASS_H__
14 
15 // C++ standard libraries
16 #include <string>
17 #include <climits>
18 #include <algorithm>
19 #include <chrono>
20 
21 // ROS libraries
22 #include <ros/ros.h>
23 
24 #include <sensor_msgs/NavSatFix.h>
25 #include <nav_msgs/Odometry.h>
26 #include <std_msgs/Bool.h>
27 
28 namespace nm = nav_msgs;
29 
34 class BedDetection {
35  public:
36 
42  BedDetection(const ros::NodeHandle &node_handle, const ros::NodeHandle &private_node_handle);
43 
47  ~BedDetection() = default;
48 
52  void init();
53 
58  bool ok();
59 
60 
61  void cb_is_straight(const nm::OdometryPtr& odom_sub);
62 
63  bool is_straight();
64 
65  bool is_straight_time();
66 
67  private:
68  // ros node handles
71 
72  // Subscribers
74 
75  // Publishers
77 
78  // System vars
79  bool _is_init;
84 
85  // ROS messages
86  nm::Odometry _odom;
87 
88 };
89 
90 #endif // __BED_DETECTION_CLASS_H__
bool is_straight()
double _threshold_twist
Definition: bed_detection.h:82
~BedDetection()=default
bool is_straight_time()
ros::Time _tp_1
Definition: bed_detection.h:83
nm::Odometry _odom
Definition: bed_detection.h:86
bool _is_init
states if system is init
Definition: bed_detection.h:79
ros::Publisher _pub_is_straight
Definition: bed_detection.h:76
ros::NodeHandle _pnh
private node handle
Definition: bed_detection.h:70
BedDetection(const ros::NodeHandle &node_handle, const ros::NodeHandle &private_node_handle)
double _threshold_time
Definition: bed_detection.h:81
void cb_is_straight(const nm::OdometryPtr &odom_sub)
This class implements the detection of a bed given an odometry.
Definition: bed_detection.h:34
ros::NodeHandle _nh
node handle
Definition: bed_detection.h:69
ros::Subscriber _sub_odom
Definition: bed_detection.h:73


earth_rover_bed_detection
Author(s):
autogenerated on Wed Apr 28 2021 02:15:32