hinted_plane_detector_nodelet.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2013, JSK Lab
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the JSK Lab nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 #define BOOST_PARAMETER_MAX_ARITY 7
36 #include "pcl_ros/transforms.h"
37 #include <visualization_msgs/Marker.h>
38 #include <pcl/surface/concave_hull.h>
39 #include <pcl/sample_consensus/method_types.h>
40 #include <pcl/sample_consensus/model_types.h>
41 #include <pcl/segmentation/sac_segmentation.h>
42 #include <pcl/filters/project_inliers.h>
43 #include <pcl/filters/extract_indices.h>
44 #include <pcl/ModelCoefficients.h>
45 #include <pcl/kdtree/kdtree.h>
46 #include <pcl/segmentation/extract_clusters.h>
47 #include <pcl/common/centroid.h>
49 
50 namespace jsk_pcl_ros {
51 
53  pcl::console::setVerbosityLevel(pcl::console::L_ERROR);
54  DiagnosticNodelet::onInit();
55  srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
56  typename dynamic_reconfigure::Server<Config>::CallbackType f =
57  boost::bind (&HintedPlaneDetector::configCallback, this, _1, _2);
58  srv_->setCallback (f);
59 
60  pub_hint_polygon_ = advertise<geometry_msgs::PolygonStamped>(
61  *pnh_, "output/hint/polygon", 1);
62  pub_hint_polygon_array_ = advertise<jsk_recognition_msgs::PolygonArray>(
63  *pnh_, "output/hint/polygon_array", 1);
64  pub_hint_inliers_ = advertise<PCLIndicesMsg>(
65  *pnh_, "output/hint/inliers", 1);
66  pub_hint_coefficients_ = advertise<PCLModelCoefficientMsg>(
67  *pnh_, "output/hint/coefficients", 1);
68  pub_polygon_ = advertise<geometry_msgs::PolygonStamped>(
69  *pnh_, "output/polygon", 1);
70  pub_polygon_array_ = advertise<jsk_recognition_msgs::PolygonArray>(
71  *pnh_, "output/polygon_array", 1);
72  pub_hint_filtered_indices_ = advertise<PCLIndicesMsg>(
73  *pnh_, "output/hint_filtered_indices", 1);
74  pub_plane_filtered_indices_ = advertise<PCLIndicesMsg>(
75  *pnh_, "output/plane_filtered_indices", 1);
76  pub_density_filtered_indices_ = advertise<PCLIndicesMsg>(
77  *pnh_, "output/density_filtered_indices", 1);
78  pub_euclidean_filtered_indices_ = advertise<PCLIndicesMsg>(
79  *pnh_, "output/euclidean_filtered_indices", 1);
80  pub_inliers_ = advertise<PCLIndicesMsg>(
81  *pnh_, "output/inliers", 1);
82  pub_coefficients_ = advertise<PCLModelCoefficientMsg>(
83  *pnh_, "output/coefficients", 1);
84  onInitPostProcess();
85  }
86 
88  // message_filters::Synchronizer needs to be called reset
89  // before message_filters::Subscriber is freed.
90  // Calling reset fixes the following error on shutdown of the nodelet:
91  // terminate called after throwing an instance of
92  // 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
93  // what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
94  // Also see https://github.com/ros/ros_comm/issues/720 .
95  sync_.reset();
96  }
97 
99  {
100  if (synchronize_) {
101  sub_cloud_.subscribe(*pnh_, "input", 1);
102  sub_hint_cloud_.subscribe(*pnh_, "input/hint/cloud", 1);
103  sync_ = boost::make_shared<message_filters::Synchronizer<SyncPolicy> >(100);
104  sync_->connectInput(sub_cloud_, sub_hint_cloud_);
105  sync_->registerCallback(
106  boost::bind(&HintedPlaneDetector::detect, this, _1, _2));
107  } else {
108  sub_hint_cloud_single_ = pnh_->subscribe<sensor_msgs::PointCloud2>(
109  "input/hint/cloud", 1, &HintedPlaneDetector::setHintCloud, this);
110  sub_cloud_single_ = pnh_->subscribe<sensor_msgs::PointCloud2>(
111  "input", 1,
112  boost::bind(&HintedPlaneDetector::detect, this, _1,
113  boost::ref(hint_cloud_)));
114  }
115  }
116 
118  {
119  if (synchronize_) {
122  } else {
125  }
126  }
127 
129  Config &config, uint32_t level)
130  {
131  boost::mutex::scoped_lock lock(mutex_);
132  const bool need_resubscribe = synchronize_ != config.synchronize;
133  synchronize_ = config.synchronize;
134  hint_outlier_threashold_ = config.hint_outlier_threashold;
135  hint_max_iteration_ = config.hint_max_iteration;
136  hint_min_size_ = config.hint_min_size;
137  outlier_threashold_ = config.outlier_threashold;
138  max_iteration_ = config.max_iteration;
139  min_size_ = config.min_size;
140  eps_angle_ = config.eps_angle;
141  normal_filter_eps_angle_ = config.normal_filter_eps_angle;
142  euclidean_clustering_filter_tolerance_ = config.euclidean_clustering_filter_tolerance;
143  euclidean_clustering_filter_min_size_ = config.euclidean_clustering_filter_min_size;
144  density_radius_ = config.density_radius;
145  density_num_ = config.density_num;
146  enable_euclidean_filtering_ = config.enable_euclidean_filtering;
147  enable_normal_filtering_ = config.enable_normal_filtering;
148  enable_distance_filtering_ = config.enable_distance_filtering;
149  enable_density_filtering_ = config.enable_density_filtering;
150  if (need_resubscribe && isSubscribed()) {
151  unsubscribe();
152  subscribe();
153  }
154  }
155 
157  const sensor_msgs::PointCloud2::ConstPtr &msg)
158 
159  {
160  hint_cloud_ = msg;
161  NODELET_DEBUG("hint cloud is set");
162  }
163 
165  const sensor_msgs::PointCloud2::ConstPtr& cloud_msg,
166  const sensor_msgs::PointCloud2::ConstPtr& hint_cloud_msg)
167  {
168  vital_checker_->poke();
169  boost::mutex::scoped_lock lock(mutex_);
170  if (!hint_cloud_msg) {
172  10.0,
173  "hint cloud is not received. Set hint cloud or enable 'synchronize'");
174  return;
175  }
176  pcl::PointCloud<pcl::PointNormal>::Ptr
177  input_cloud (new pcl::PointCloud<pcl::PointNormal>);
178  pcl::PointCloud<pcl::PointXYZ>::Ptr
179  hint_cloud (new pcl::PointCloud<pcl::PointXYZ>);
180  pcl::fromROSMsg(*cloud_msg, *input_cloud);
181  pcl::fromROSMsg(*hint_cloud_msg, *hint_cloud);
182 
183  // estimate plane out of hint_cloud
184 
186 
187  if (detectHintPlane(hint_cloud, convex) && convex) {
188  if (detectLargerPlane(input_cloud, convex)) {
189  NODELET_INFO("success to detect!");
190  }
191  else {
192  NODELET_ERROR("failed to detect larger plane");
193  }
194  }
195  }
196 
197  pcl::PointIndices::Ptr HintedPlaneDetector::getBestCluster(
198  pcl::PointCloud<pcl::PointNormal>::Ptr input_cloud,
199  const std::vector<pcl::PointIndices>& cluster_indices,
201  {
202  Eigen::Vector3f center = hint_convex->centroid();
203  double min_dist = DBL_MAX;
204  size_t min_index = 0;
205  for (size_t i = 0; i < cluster_indices.size(); i++) {
206  Eigen::Vector4f center_cluster4;
207  pcl::compute3DCentroid<pcl::PointNormal>(*input_cloud,
208  cluster_indices[i].indices,
209  center_cluster4);
210  Eigen::Vector3f center_cluster3(center_cluster4[0], center_cluster4[1], center_cluster4[2]);
211  double dist = (center - center_cluster3).norm();
212  if (dist < min_dist) {
213  min_dist = dist;
214  min_index = i;
215  }
216  }
217  pcl::PointIndices::Ptr ret (new pcl::PointIndices);
218  ret->indices = cluster_indices[min_index].indices;
219  return ret;
220  }
221 
223  const pcl::PointCloud<pcl::PointNormal>::Ptr cloud,
224  const pcl::PointIndices::Ptr indices,
225  pcl::PointIndices& output)
226  {
228  pcl::KdTreeFLANN<pcl::PointNormal> kdtree;
229  pcl::KdTreeFLANN<pcl::PointNormal>::IndicesPtr indices_ptr
230  (new std::vector<int>);
231  *indices_ptr = indices->indices;
232  kdtree.setInputCloud(cloud, indices_ptr);
233  for (size_t i = 0; i < indices->indices.size(); i++) {
234  int point_index = indices->indices[i];
235  std::vector<int> result_indices;
236  std::vector<float> result_distances;
237  kdtree.radiusSearch(i, density_radius_,
238  result_indices, result_distances);
239  if (result_distances.size() >= density_num_) {
240  output.indices.push_back(point_index);
241  }
242  }
243  }
244  else {
245  output = *indices;
246  }
247  output.header = cloud->header;
248  PCLIndicesMsg ros_indices;
249  pcl_conversions::fromPCL(output, ros_indices);
251  }
252 
254  const pcl::PointCloud<pcl::PointNormal>::Ptr cloud,
255  const pcl::PointIndices::Ptr indices,
257  pcl::PointIndices& output)
258  {
260  pcl::EuclideanClusterExtraction<pcl::PointNormal> ec;
261  ec.setClusterTolerance(euclidean_clustering_filter_tolerance_);
262  pcl::search::KdTree<pcl::PointNormal>::Ptr tree
263  (new pcl::search::KdTree<pcl::PointNormal>);
264  tree->setInputCloud(cloud);
265  ec.setSearchMethod(tree);
266  ec.setIndices(indices);
267  ec.setInputCloud(cloud);
268  //ec.setMinClusterSize ();
269  std::vector<pcl::PointIndices> cluster_indices;
270  ec.extract(cluster_indices);
271  if (cluster_indices.size() == 0) {
272  return;
273  }
274  NODELET_INFO("%lu clusters", cluster_indices.size());
275  pcl::PointIndices::Ptr filtered_indices
276  = getBestCluster(cloud, cluster_indices, hint_convex);
277  output = *filtered_indices;
278  }
279  else {
280  output = *indices;
281  }
282  output.header = cloud->header;
283  PCLIndicesMsg ros_indices;
284  pcl_conversions::fromPCL(output, ros_indices);
286  }
287 
289  const pcl::PointCloud<pcl::PointNormal>::Ptr cloud,
291  pcl::PointIndices& output)
292  {
293  for (size_t i = 0; i < cloud->points.size(); i++) {
294  pcl::PointNormal p = cloud->points[i];
295  if (!std::isnan(p.x) && !std::isnan(p.y) && !std::isnan(p.y)) {
296  Eigen::Vector4f v = p.getVector4fMap();
297  if (!enable_distance_filtering_ || hint_convex->distanceToPoint(v) < outlier_threashold_) {
298  Eigen::Vector3f n(p.normal_x, p.normal_y, p.normal_z);
299  if (!enable_normal_filtering_ || hint_convex->angle(n) < normal_filter_eps_angle_) {
300  output.indices.push_back(i);
301  }
302  }
303  }
304  }
305  output.header = cloud->header;
306  PCLIndicesMsg ros_candidate_inliers;
307  pcl_conversions::fromPCL(output, ros_candidate_inliers);
308  pub_hint_filtered_indices_.publish(ros_candidate_inliers);
309  }
310 
312  const pcl::PointCloud<pcl::PointNormal>::Ptr cloud,
313  const pcl::PointIndices::Ptr indices,
314  const Eigen::Vector3f& normal,
315  pcl::PointIndices& output,
316  pcl::ModelCoefficients& coefficients)
317  {
318  pcl::SACSegmentation<pcl::PointNormal> seg;
319  seg.setOptimizeCoefficients (true);
320  seg.setModelType (pcl::SACMODEL_PERPENDICULAR_PLANE);
321  seg.setMethodType (pcl::SAC_RANSAC);
322  seg.setDistanceThreshold (outlier_threashold_);
323  seg.setMaxIterations (max_iteration_);
324  seg.setEpsAngle(eps_angle_);
325  seg.setAxis(normal);
326  seg.setInputCloud(cloud);
327  seg.setIndices(indices);
328  seg.segment(output, coefficients);
329  coefficients.header = cloud->header;
330  output.header = cloud->header;
331  PCLIndicesMsg ros_indices;
332  pcl_conversions::fromPCL(output, ros_indices);
334  }
335 
337  pcl::PointCloud<pcl::PointNormal>::Ptr input_cloud,
339  {
340  pcl::PointIndices::Ptr candidate_inliers (new pcl::PointIndices);
341  hintFilter(input_cloud, hint_convex, *candidate_inliers);
342  // filter points based on hint_convex to get better result...
343 
344  pcl::PointIndices::Ptr plane_inliers (new pcl::PointIndices);
345  pcl::ModelCoefficients::Ptr plane_coefficients(new pcl::ModelCoefficients);
346  planeFilter(input_cloud, candidate_inliers,
347  hint_convex->getNormal(),
348  *plane_inliers, *plane_coefficients);
349  if (plane_inliers->indices.size() < min_size_) { // good!
350  NODELET_ERROR("failed to detect by plane fitting filtering");
351  return false;
352  }
353  // Check direction of plane_coefficients
354  Eigen::Vector3f plane_normal(plane_coefficients->values[0], plane_coefficients->values[1], plane_coefficients->values[2]);
355  if (plane_normal.dot(Eigen::Vector3f::UnitZ()) > 0) {
356  // flip
357  plane_coefficients->values[0] = -plane_coefficients->values[0];
358  plane_coefficients->values[1] = -plane_coefficients->values[1];
359  plane_coefficients->values[2] = -plane_coefficients->values[2];
360  plane_coefficients->values[3] = -plane_coefficients->values[3];
361  }
362  // filtering by euclidean clustering
363  pcl::PointIndices::Ptr euclidean_filtered_indices(new pcl::PointIndices);
364  euclideanFilter(input_cloud, plane_inliers, hint_convex,
365  *euclidean_filtered_indices);
366  if (euclidean_filtered_indices->indices.size() < min_size_) {
367  NODELET_ERROR("failed to detect by euclidean filtering");
368  return false;
369  }
370  pcl::PointIndices::Ptr density_filtered_indices (new pcl::PointIndices);
372  input_cloud, euclidean_filtered_indices, *density_filtered_indices);
373 
374  if (density_filtered_indices->indices.size() < min_size_) {
375  NODELET_ERROR("failed to detect by density filtering");
376  return false;
377  }
379  = jsk_recognition_utils::convexFromCoefficientsAndInliers<pcl::PointNormal>(
380  input_cloud, density_filtered_indices, plane_coefficients);
381  // publish to ROS
383  input_cloud->header);
384  PCLIndicesMsg ros_inliers;
385  pcl_conversions::fromPCL(*density_filtered_indices, ros_inliers);
386  pub_inliers_.publish(ros_inliers);
387  PCLModelCoefficientMsg ros_coefficients;
388  pcl_conversions::fromPCL(*plane_coefficients, ros_coefficients);
389  pub_coefficients_.publish(ros_coefficients);
390  return true;
391  }
392 
396  ros::Publisher& pub_polygon_array,
397  const pcl::PCLHeader& header)
398  {
399  geometry_msgs::PolygonStamped ros_polygon;
400  ros_polygon.polygon = convex->toROSMsg();
401  pcl_conversions::fromPCL(header, ros_polygon.header);
402  jsk_recognition_msgs::PolygonArray ros_polygon_array;
403  pcl_conversions::fromPCL(header, ros_polygon_array.header);
404  ros_polygon_array.polygons.push_back(
405  ros_polygon);
406  pub_polygon_array.publish(ros_polygon_array);
407  pub_polygon.publish(ros_polygon);
408  }
409 
411  pcl::PointCloud<pcl::PointXYZ>::Ptr hint_cloud,
413  {
414  pcl::PointIndices::Ptr hint_inliers (new pcl::PointIndices);
415  pcl::ModelCoefficients::Ptr hint_coefficients(new pcl::ModelCoefficients);
416  pcl::SACSegmentation<pcl::PointXYZ> seg;
417  seg.setOptimizeCoefficients (true);
418  seg.setModelType (pcl::SACMODEL_PLANE);
419  seg.setMethodType (pcl::SAC_RANSAC);
420  seg.setDistanceThreshold (hint_outlier_threashold_);
421  seg.setMaxIterations (hint_max_iteration_);
422  seg.setInputCloud(hint_cloud);
423  seg.segment(*hint_inliers, *hint_coefficients);
424  if (hint_inliers->indices.size() > hint_min_size_) { // good!
425  convex = jsk_recognition_utils::convexFromCoefficientsAndInliers<pcl::PointXYZ>(
426  hint_cloud, hint_inliers, hint_coefficients);
427  // publish hint results for debug/visualization
428  publishPolygon(convex,
430  hint_cloud->header);
431  PCLIndicesMsg ros_indices;
432  PCLModelCoefficientMsg ros_coefficients;
433  pcl_conversions::fromPCL(*hint_inliers, ros_indices);
434  pub_hint_inliers_.publish(ros_indices);
435  pcl_conversions::fromPCL(*hint_coefficients, ros_coefficients);
436  pub_hint_coefficients_.publish(ros_coefficients);
437  return true;
438  }
439  else {
440  NODELET_ERROR("Failed to find hint plane");
441  return false;
442  }
443  }
444 
445 }
446 
jsk_pcl_ros::HintedPlaneDetector::pub_coefficients_
ros::Publisher pub_coefficients_
Definition: hinted_plane_detector.h:185
NODELET_ERROR
#define NODELET_ERROR(...)
depth_error_calibration.lock
lock
Definition: depth_error_calibration.py:32
jsk_pcl_ros::HintedPlaneDetector::enable_normal_filtering_
bool enable_normal_filtering_
Definition: hinted_plane_detector.h:211
ros::Publisher
_2
boost::arg< 2 > _2
jsk_pcl_ros::HintedPlaneDetector::enable_density_filtering_
bool enable_density_filtering_
Definition: hinted_plane_detector.h:213
jsk_pcl_ros::HintedPlaneDetector::sync_
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
Definition: hinted_plane_detector.h:175
boost::shared_ptr< ConvexPolygon >
i
int i
jsk_pcl_ros::HintedPlaneDetector::subscribe
virtual void subscribe()
Definition: hinted_plane_detector_nodelet.cpp:98
jsk_pcl_ros::HintedPlaneDetector::pub_density_filtered_indices_
ros::Publisher pub_density_filtered_indices_
Definition: hinted_plane_detector.h:188
jsk_pcl_ros::HintedPlaneDetector::outlier_threashold_
double outlier_threashold_
Definition: hinted_plane_detector.h:205
sample_simulate_tabletop_cloud.header
header
Definition: sample_simulate_tabletop_cloud.py:162
jsk_pcl_ros::HintedPlaneDetector::sub_cloud_single_
ros::Subscriber sub_cloud_single_
Definition: hinted_plane_detector.h:192
jsk_pcl_ros::HintedPlaneDetector::density_num_
int density_num_
Definition: hinted_plane_detector.h:215
p
p
jsk_pcl_ros::HintedPlaneDetector::hintFilter
virtual void hintFilter(const pcl::PointCloud< pcl::PointNormal >::Ptr cloud, const jsk_recognition_utils::ConvexPolygon::Ptr hint_convex, pcl::PointIndices &output)
Definition: hinted_plane_detector_nodelet.cpp:288
jsk_pcl_ros::HintedPlaneDetector::planeFilter
virtual void planeFilter(const pcl::PointCloud< pcl::PointNormal >::Ptr cloud, const pcl::PointIndices::Ptr indices, const Eigen::Vector3f &normal, pcl::PointIndices &output, pcl::ModelCoefficients &coefficients)
Definition: hinted_plane_detector_nodelet.cpp:311
jsk_pcl_ros::HintedPlaneDetector::hint_max_iteration_
int hint_max_iteration_
Definition: hinted_plane_detector.h:201
PCLIndicesMsg
pcl::PointIndices PCLIndicesMsg
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(jsk_pcl_ros::HintedPlaneDetector, nodelet::Nodelet)
ros::Subscriber::shutdown
void shutdown()
jsk_pcl_ros::HintedPlaneDetector::pub_polygon_array_
ros::Publisher pub_polygon_array_
Definition: hinted_plane_detector.h:182
sample_simulate_tabletop_cloud.pub_polygon
pub_polygon
Definition: sample_simulate_tabletop_cloud.py:150
pcl::fromROSMsg
void fromROSMsg(const sensor_msgs::PointCloud2 &cloud, pcl::PointCloud< T > &pcl_cloud)
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
message_filters::Subscriber::unsubscribe
void unsubscribe()
jsk_pcl_ros::HintedPlaneDetector::unsubscribe
virtual void unsubscribe()
Definition: hinted_plane_detector_nodelet.cpp:117
jsk_pcl_ros::HintedPlaneDetector::mutex_
boost::mutex mutex_
Definition: hinted_plane_detector.h:191
cloud
cloud
transforms.h
NODELET_WARN_THROTTLE
#define NODELET_WARN_THROTTLE(rate,...)
jsk_pcl_ros::HintedPlaneDetector::densityFilter
virtual void densityFilter(const pcl::PointCloud< pcl::PointNormal >::Ptr cloud, const pcl::PointIndices::Ptr indices, pcl::PointIndices &output)
Definition: hinted_plane_detector_nodelet.cpp:222
class_list_macros.h
tree
tree
jsk_pcl_ros::HintedPlaneDetector::~HintedPlaneDetector
virtual ~HintedPlaneDetector()
Definition: hinted_plane_detector_nodelet.cpp:87
jsk_pcl_ros::HintedPlaneDetector::getBestCluster
virtual pcl::PointIndices::Ptr getBestCluster(pcl::PointCloud< pcl::PointNormal >::Ptr input_cloud, const std::vector< pcl::PointIndices > &cluster_indices, const jsk_recognition_utils::ConvexPolygon::Ptr hint_convex)
Definition: hinted_plane_detector_nodelet.cpp:197
pcl_conversions::fromPCL
void fromPCL(const pcl::ModelCoefficients &pcl_mc, pcl_msgs::ModelCoefficients &mc)
PCLModelCoefficientMsg
pcl::ModelCoefficients PCLModelCoefficientMsg
jsk_pcl_ros
Definition: add_color_from_image.h:51
jsk_pcl_ros::HintedPlaneDetector::eps_angle_
double eps_angle_
Definition: hinted_plane_detector.h:206
jsk_pcl_ros::HintedPlaneDetector::hint_min_size_
int hint_min_size_
Definition: hinted_plane_detector.h:202
jsk_pcl_ros::HintedPlaneDetector::srv_
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
Definition: hinted_plane_detector.h:190
jsk_pcl_ros::HintedPlaneDetector::sub_cloud_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_cloud_
Definition: hinted_plane_detector.h:176
jsk_pcl_ros::HintedPlaneDetector::sub_hint_cloud_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_hint_cloud_
Definition: hinted_plane_detector.h:177
jsk_pcl_ros::HintedPlaneDetector::density_radius_
double density_radius_
Definition: hinted_plane_detector.h:214
jsk_pcl_ros::HintedPlaneDetector::normal_filter_eps_angle_
double normal_filter_eps_angle_
Definition: hinted_plane_detector.h:207
jsk_pcl_ros::HintedPlaneDetector::pub_inliers_
ros::Publisher pub_inliers_
Definition: hinted_plane_detector.h:184
jsk_pcl_ros::HintedPlaneDetector::euclidean_clustering_filter_min_size_
int euclidean_clustering_filter_min_size_
Definition: hinted_plane_detector.h:209
jsk_pcl_ros::HintedPlaneDetector::pub_plane_filtered_indices_
ros::Publisher pub_plane_filtered_indices_
Definition: hinted_plane_detector.h:187
jsk_pcl_ros::HintedPlaneDetector::pub_hint_filtered_indices_
ros::Publisher pub_hint_filtered_indices_
Definition: hinted_plane_detector.h:186
jsk_pcl_ros::HintedPlaneDetector::euclideanFilter
virtual void euclideanFilter(const pcl::PointCloud< pcl::PointNormal >::Ptr cloud, const pcl::PointIndices::Ptr indices, const jsk_recognition_utils::ConvexPolygon::Ptr hint_convex, pcl::PointIndices &output)
Definition: hinted_plane_detector_nodelet.cpp:253
jsk_pcl_ros::HintedPlaneDetector::hint_cloud_
sensor_msgs::PointCloud2::ConstPtr hint_cloud_
Definition: hinted_plane_detector.h:194
jsk_pcl_ros::HintedPlaneDetector::pub_hint_polygon_array_
ros::Publisher pub_hint_polygon_array_
Definition: hinted_plane_detector.h:179
_1
boost::arg< 1 > _1
jsk_pcl_ros::HintedPlaneDetector::max_iteration_
int max_iteration_
Definition: hinted_plane_detector.h:203
jsk_pcl_ros::HintedPlaneDetector::euclidean_clustering_filter_tolerance_
double euclidean_clustering_filter_tolerance_
Definition: hinted_plane_detector.h:208
jsk_pcl_ros::HintedPlaneDetector::detect
virtual void detect(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg, const sensor_msgs::PointCloud2::ConstPtr &hint_cloud_msg)
Definition: hinted_plane_detector_nodelet.cpp:164
jsk_pcl_ros::HintedPlaneDetector
Definition: hinted_plane_detector.h:88
jsk_pcl_ros::HintedPlaneDetector::min_size_
int min_size_
Definition: hinted_plane_detector.h:204
message_filters::Subscriber::subscribe
void subscribe()
jsk_pcl_ros::HintedPlaneDetector::detectHintPlane
virtual bool detectHintPlane(pcl::PointCloud< pcl::PointXYZ >::Ptr hint_cloud, jsk_recognition_utils::ConvexPolygon::Ptr &convex)
Definition: hinted_plane_detector_nodelet.cpp:410
NODELET_INFO
#define NODELET_INFO(...)
nodelet::Nodelet
jsk_pcl_ros::HintedPlaneDetector::publishPolygon
virtual void publishPolygon(const jsk_recognition_utils::ConvexPolygon::Ptr convex, ros::Publisher &pub_polygon, ros::Publisher &pub_polygon_array, const pcl::PCLHeader &header)
Definition: hinted_plane_detector_nodelet.cpp:393
jsk_pcl_ros::HintedPlaneDetector::pub_euclidean_filtered_indices_
ros::Publisher pub_euclidean_filtered_indices_
Definition: hinted_plane_detector.h:189
jsk_pcl_ros::HintedPlaneDetector::enable_euclidean_filtering_
bool enable_euclidean_filtering_
Definition: hinted_plane_detector.h:210
hinted_plane_detector.h
dump_depth_error.f
f
Definition: dump_depth_error.py:39
jsk_pcl_ros::HintedPlaneDetector::onInit
virtual void onInit()
Definition: hinted_plane_detector_nodelet.cpp:52
coefficients
coefficients
jsk_pcl_ros::HintedPlaneDetector::sub_hint_cloud_single_
ros::Subscriber sub_hint_cloud_single_
Definition: hinted_plane_detector.h:193
jsk_pcl_ros::HintedPlaneDetector::synchronize_
bool synchronize_
Definition: hinted_plane_detector.h:199
jsk_pcl_ros::HintedPlaneDetector::pub_hint_inliers_
ros::Publisher pub_hint_inliers_
Definition: hinted_plane_detector.h:180
jsk_pcl_ros::HintedPlaneDetector::configCallback
virtual void configCallback(Config &config, uint32_t level)
Definition: hinted_plane_detector_nodelet.cpp:128
jsk_pcl_ros::HintedPlaneDetector::hint_outlier_threashold_
double hint_outlier_threashold_
Definition: hinted_plane_detector.h:200
jsk_pcl_ros::HintedPlaneDetector::enable_distance_filtering_
bool enable_distance_filtering_
Definition: hinted_plane_detector.h:212
config
config
jsk_pcl_ros::HintedPlaneDetector::pub_hint_coefficients_
ros::Publisher pub_hint_coefficients_
Definition: hinted_plane_detector.h:181
jsk_pcl_ros::HintedPlaneDetector::setHintCloud
virtual void setHintCloud(const sensor_msgs::PointCloud2::ConstPtr &msg)
Definition: hinted_plane_detector_nodelet.cpp:156
pose_with_covariance_sample.msg
msg
Definition: pose_with_covariance_sample.py:22
n
GLfloat n[6][3]
jsk_pcl_ros::HintedPlaneDetector::pub_polygon_
ros::Publisher pub_polygon_
Definition: hinted_plane_detector.h:183
v
GLfloat v[8][3]
jsk_pcl_ros::HintedPlaneDetector::pub_hint_polygon_
ros::Publisher pub_hint_polygon_
Definition: hinted_plane_detector.h:178
jsk_pcl_ros::HintedPlaneDetector::detectLargerPlane
virtual bool detectLargerPlane(pcl::PointCloud< pcl::PointNormal >::Ptr input_cloud, jsk_recognition_utils::ConvexPolygon::Ptr hint_convex)
Definition: hinted_plane_detector_nodelet.cpp:336
NODELET_DEBUG
#define NODELET_DEBUG(...)
jsk_pcl_ros::HintedPlaneDetector::Config
HintedPlaneDetectorConfig Config
Definition: hinted_plane_detector.h:123


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Tue Jan 7 2025 04:05:44