hector_barrel_detection_nodelet.h
Go to the documentation of this file.
1 #ifndef HECTOR_BARREL_DETECTION_NODE_H
2 #define HECTOR_BARREL_DETECTION_NODE_H
3 
4 #include <ros/ros.h>
5 #include <nodelet/nodelet.h>
6 #include <sensor_msgs/PointCloud2.h>
7 #include <sensor_msgs/CameraInfo.h>
8 #include <sensor_msgs/Image.h>
11 #include <tf/transform_listener.h>
14 #include <pcl/point_types.h>
15 #include <pcl/PCLPointCloud2.h>
16 #include <pcl/conversions.h>
17 #include <pcl_ros/transforms.h>
18 
19 #include <pcl/io/pcd_io.h>
20 #include <pcl/filters/passthrough.h>
21 #include <pcl/filters/voxel_grid.h>
22 #include <pcl/filters/statistical_outlier_removal.h>
23 #include <pcl/ModelCoefficients.h>
24 #include <pcl/features/normal_3d.h>
25 #include <pcl/sample_consensus/method_types.h>
26 #include <pcl/sample_consensus/model_types.h>
27 #include <pcl/segmentation/sac_segmentation.h>
28 #include <pcl/filters/extract_indices.h>
29 #include <tf/transform_datatypes.h>
30 #include <geometry_msgs/PoseStamped.h>
31 #include <visualization_msgs/MarkerArray.h>
32 #include <opencv/highgui.h>
33 #include <opencv/cv.h>
34 #include <cv_bridge/cv_bridge.h>
36 #include <hector_worldmodel_msgs/ImagePercept.h>
37 #include <hector_worldmodel_msgs/PosePercept.h>
38 #include <hector_worldmodel_msgs/GetObjectModel.h>
41 #include <hector_nav_msgs/GetDistanceToObstacle.h>
42 
45 #include <dynamic_reconfigure/server.h>
46 #include <hector_barrel_detection_nodelet/BarrelDetectionConfig.h>
47 
49 
51 
52 public:
53  virtual void onInit();
55  virtual ~BarrelDetection();
56 protected:
57  void PclCallback(const sensor_msgs::PointCloud2::ConstPtr& pc_msg);
58  void imageCallback(const sensor_msgs::ImageConstPtr& img, const sensor_msgs::CameraInfoConstPtr& info);
59  void findCylinder(const sensor_msgs::PointCloud2::ConstPtr& pc_msg, float xKey, float yKey, const geometry_msgs::PointStamped cut_around_keypoint);
60 
61 
62 private:
64 
74  Eigen::Affine3d to_map_;
75  pcl::PassThrough<pcl::PointXYZ> pass_;
76 
80 
81  sensor_msgs::PointCloud2::ConstPtr current_pc_msg_;
82 
83  //Dynamic reconfigure
84  dynamic_reconfigure::Server<hector_barrel_detection_nodelet::BarrelDetectionConfig> dynamic_recf_server;
85  dynamic_reconfigure::Server<hector_barrel_detection_nodelet::BarrelDetectionConfig>::CallbackType dynamic_recf_type;
86  void dynamic_recf_cb(hector_barrel_detection_nodelet::BarrelDetectionConfig &config, uint32_t level);
88  void publish_rectangle_for_recf(std::vector<cv::KeyPoint> keypoints, const sensor_msgs::ImageConstPtr &img, const sensor_msgs::CameraInfoConstPtr &info, cv::Mat &img_filtered);
89 
90  int v_min;
91  int v_max;
92  int s_min;
93  int s_max;
94  int h_min;
95  int h_max;
96  double bluePart;
97  double minRadius;
98  double maxRadius;
99 
100 };
101 }
102 
103 #endif // HECTOR_BARREL_DETECTION_NODE_H
void imageCallback(const sensor_msgs::ImageConstPtr &img, const sensor_msgs::CameraInfoConstPtr &info)
void PclCallback(const sensor_msgs::PointCloud2::ConstPtr &pc_msg)
dynamic_reconfigure::Server< hector_barrel_detection_nodelet::BarrelDetectionConfig > dynamic_recf_server
dynamic_reconfigure::Server< hector_barrel_detection_nodelet::BarrelDetectionConfig >::CallbackType dynamic_recf_type
void publish_rectangle_for_recf(std::vector< cv::KeyPoint > keypoints, const sensor_msgs::ImageConstPtr &img, const sensor_msgs::CameraInfoConstPtr &info, cv::Mat &img_filtered)
void dynamic_recf_cb(hector_barrel_detection_nodelet::BarrelDetectionConfig &config, uint32_t level)
void findCylinder(const sensor_msgs::PointCloud2::ConstPtr &pc_msg, float xKey, float yKey, const geometry_msgs::PointStamped cut_around_keypoint)
boost::shared_ptr< image_geometry::PinholeCameraModel > CameraModelPtr


hector_barrel_detection_nodelet
Author(s):
autogenerated on Mon Jun 10 2019 13:36:28