37 #ifndef JSK_PCL_ROS_HINTED_STICK_FINDER_H_ 38 #define JSK_PCL_ROS_HINTED_STICK_FINDER_H_ 47 #include <sensor_msgs/Image.h> 48 #include <geometry_msgs/PolygonStamped.h> 49 #include <sensor_msgs/CameraInfo.h> 50 #include <sensor_msgs/PointCloud2.h> 54 #include <dynamic_reconfigure/server.h> 55 #include <jsk_pcl_ros/HintedStickFinderConfig.h> 63 geometry_msgs::PolygonStamped,
64 sensor_msgs::CameraInfo,
66 typedef HintedStickFinderConfig
Config;
79 const geometry_msgs::PolygonStamped::ConstPtr&
polygon_msg,
80 const sensor_msgs::CameraInfo::ConstPtr& camera_info_msg,
81 const sensor_msgs::PointCloud2::ConstPtr& cloud_msg);
87 const sensor_msgs::PointCloud2::ConstPtr& cloud_msg);
93 const geometry_msgs::PolygonStamped::ConstPtr& hint_msg);
99 const sensor_msgs::CameraInfo::ConstPtr&
info_msg);
102 const geometry_msgs::PolygonStamped::ConstPtr& polygon_msg,
108 const pcl::PointCloud<pcl::PointXYZ>::Ptr&
cloud,
110 pcl::PointIndices& output_indices);
112 const pcl::PointCloud<pcl::PointXYZ>::Ptr& cloud,
113 const pcl::PointIndices::Ptr indices,
114 pcl::PointCloud<pcl::Normal>& normals,
115 pcl::PointCloud<pcl::PointXYZ>& normals_cloud);
118 const pcl::PointCloud<pcl::PointXYZ>::Ptr& filtered_cloud,
119 const pcl::PointCloud<pcl::Normal>::Ptr& cloud_nromals,
120 const Eigen::Vector3f& a,
121 const Eigen::Vector3f& b);
133 const Eigen::Vector3f& a,
134 const Eigen::Vector3f& b);
virtual void hintCallback(const geometry_msgs::PolygonStamped::ConstPtr &hint_msg)
Non synchronized message callback for ~input/hint/line.
virtual void normalEstimate(const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const pcl::PointIndices::Ptr indices, pcl::PointCloud< pcl::Normal > &normals, pcl::PointCloud< pcl::PointXYZ > &normals_cloud)
bool use_normal_
True if use ~input has normal fields.
ros::Publisher pub_line_filtered_indices_
geometry_msgs::PolygonStamped::ConstPtr latest_hint_
virtual void cloudCallback(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg)
Non synchronized message callback for ~input pointcloud.
ros::Subscriber sub_no_sync_camera_info_
double outlier_threshold_
message_filters::Subscriber< sensor_msgs::CameraInfo > sub_info_
ros::Publisher pub_line_filtered_normal_
virtual void infoCallback(const sensor_msgs::CameraInfo::ConstPtr &info_msg)
Non synchronized message callback for ~input/camera_info.
message_filters::sync_policies::ApproximateTime< geometry_msgs::PolygonStamped, sensor_msgs::CameraInfo, sensor_msgs::PointCloud2 > ASyncPolicy
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
boost::shared_ptr< message_filters::Synchronizer< ASyncPolicy > > sync_
virtual void unsubscribe()
ros::Publisher pub_coefficients_
virtual void fittingCylinder(const pcl::PointCloud< pcl::PointXYZ >::Ptr &filtered_cloud, const pcl::PointCloud< pcl::Normal >::Ptr &cloud_nromals, const Eigen::Vector3f &a, const Eigen::Vector3f &b)
HintedStickFinderConfig Config
jsk_recognition_msgs::PolygonArray::ConstPtr polygon_msg
virtual jsk_recognition_utils::ConvexPolygon::Ptr polygonFromLine(const geometry_msgs::PolygonStamped::ConstPtr &polygon_msg, const image_geometry::PinholeCameraModel &model, Eigen::Vector3f &a, Eigen::Vector3f &b)
sensor_msgs::CameraInfo::ConstPtr latest_camera_info_
bool not_synchronize_
Run in continuous mode. continuous mode means this nodelet does not synchronize hint and input messag...
message_filters::Subscriber< geometry_msgs::PolygonStamped > sub_polygon_
virtual void filterPointCloud(const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const jsk_recognition_utils::ConvexPolygon::Ptr polygon, pcl::PointIndices &output_indices)
boost::mutex mutex
global mutex.
ros::Subscriber sub_no_sync_cloud_
int cylinder_fitting_trial_
virtual void configCallback(Config &config, uint32_t level)
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_normal_
ros::Publisher pub_inliers_
virtual void detect(const geometry_msgs::PolygonStamped::ConstPtr &polygon_msg, const sensor_msgs::CameraInfo::ConstPtr &camera_info_msg, const sensor_msgs::PointCloud2::ConstPtr &cloud_msg)
Synchronized message callback.
ros::Subscriber sub_no_sync_polygon_
ros::Publisher pub_cylinder_marker_
virtual bool rejected2DHint(const jsk_recognition_utils::Cylinder::Ptr &cylinder, const Eigen::Vector3f &a, const Eigen::Vector3f &b)
Check direction of cylinder in 2-D image coordinate system and if it is larger than eps_2d_angle_...
ros::Publisher pub_cylinder_pose_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_cloud_