1 #ifndef HECTOR_BARREL_DETECTION_NODE_H 2 #define HECTOR_BARREL_DETECTION_NODE_H 6 #include <sensor_msgs/PointCloud2.h> 7 #include <sensor_msgs/CameraInfo.h> 8 #include <sensor_msgs/Image.h> 14 #include <pcl/point_types.h> 15 #include <pcl/PCLPointCloud2.h> 16 #include <pcl/conversions.h> 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> 30 #include <geometry_msgs/PoseStamped.h> 31 #include <visualization_msgs/MarkerArray.h> 32 #include <opencv/highgui.h> 33 #include <opencv/cv.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> 45 #include <dynamic_reconfigure/server.h> 46 #include <hector_barrel_detection_nodelet/BarrelDetectionConfig.h> 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);
75 pcl::PassThrough<pcl::PointXYZ>
pass_;
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);
103 #endif // HECTOR_BARREL_DETECTION_NODE_H virtual ~BarrelDetection()
void imageCallback(const sensor_msgs::ImageConstPtr &img, const sensor_msgs::CameraInfoConstPtr &info)
void PclCallback(const sensor_msgs::PointCloud2::ConstPtr &pc_msg)
image_transport::CameraPublisher pub_imageDetection
ros::ServiceClient worldmodel_srv_client_
ros::Publisher debug_imagePoint_pub_
image_transport::CameraPublisher black_white_image_pub_
sensor_msgs::PointCloud2::ConstPtr current_pc_msg_
dynamic_reconfigure::Server< hector_barrel_detection_nodelet::BarrelDetectionConfig > dynamic_recf_server
ros::Publisher pose_publisher_
ros::Publisher barrel_marker_publisher_
ros::Publisher cloud_filtered_publisher_
pcl::PassThrough< pcl::PointXYZ > pass_
dynamic_reconfigure::Server< hector_barrel_detection_nodelet::BarrelDetectionConfig >::CallbackType dynamic_recf_type
ros::Publisher posePercept_pub_
image_transport::CameraSubscriber image_sub
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
tf::TransformListener listener_
ros::Publisher imagePercept_pub_
ros::Publisher pcl_debug_pub_