multi_plane_sac_segmentation_nodelet.cpp
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 /*********************************************************************
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2014, JSK Lab
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of the JSK Lab nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *********************************************************************/
35 
37 #include <pcl/sample_consensus/method_types.h>
38 #include <pcl/sample_consensus/model_types.h>
39 #include <pcl/segmentation/sac_segmentation.h>
40 #include <pcl/filters/extract_indices.h>
43 
44 namespace jsk_pcl_ros
45 {
47  {
48  ConnectionBasedNodelet::onInit();
49  srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
50  dynamic_reconfigure::Server<Config>::CallbackType f =
51  boost::bind (&MultiPlaneSACSegmentation::configCallback, this, _1, _2);
52  srv_->setCallback (f);
53  pnh_->param("use_normal", use_normal_, false);
54  pnh_->param("use_clusters", use_clusters_, false);
55  pnh_->param("use_imu_parallel", use_imu_parallel_, false);
56  pnh_->param("use_imu_perpendicular", use_imu_perpendicular_, false);
57 
59  NODELET_ERROR("Cannot use ~use_imu_perpendicular and ~use_imu_parallel at the same time");
60  return;
61  }
64  }
66  // publishers
68  pub_inliers_ = advertise<jsk_recognition_msgs::ClusterPointIndices>(*pnh_, "output_indices", 1);
70  = advertise<jsk_recognition_msgs::ModelCoefficientsArray>(*pnh_, "output_coefficients", 1);
71  pub_polygons_ = advertise<jsk_recognition_msgs::PolygonArray>(*pnh_, "output_polygons", 1);
72  onInitPostProcess();
73  }
74 
76  // message_filters::Synchronizer needs to be called reset
77  // before message_filters::Subscriber is freed.
78  // Calling reset fixes the following error on shutdown of the nodelet:
79  // terminate called after throwing an instance of
80  // 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
81  // what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
82  // Also see https://github.com/ros/ros_comm/issues/720 .
83  sync_.reset();
84  sync_cluster_.reset();
85  sync_imu_.reset();
86  sync_normal_imu_.reset();
87  }
88 
90  {
92  // subscriber
95  sub_input_.subscribe(*pnh_, "input", 1);
96  sub_imu_.subscribe(*pnh_, "input_imu", 1);
97  if (use_normal_) {
98  sub_normal_.subscribe(*pnh_, "input_normal", 1);
99  sync_normal_imu_ = boost::make_shared<NormalImuSynchronizer>(100);
101  sync_normal_imu_->registerCallback(
102  boost::bind(
104  this, _1, _2, _3));
105  }
106  else {
107  sync_imu_ = boost::make_shared<message_filters::Synchronizer<SyncImuPolicy> >(100);
108  sync_imu_->connectInput(sub_input_, sub_imu_);
109  sync_imu_->registerCallback(boost::bind(
111  this, _1, _2));
112  }
113  }
114  else if (use_normal_) {
115  sub_input_.subscribe(*pnh_, "input", 1);
116  sub_normal_.subscribe(*pnh_, "input_normal", 1);
117  sync_ = boost::make_shared<message_filters::Synchronizer<SyncPolicy> >(100);
118  sync_->connectInput(sub_input_, sub_normal_);
119  sync_->registerCallback(boost::bind(&MultiPlaneSACSegmentation::segment,
120  this, _1, _2));
121  }
122  else if (use_clusters_) {
123  NODELET_INFO("use clusters");
124  sub_input_.subscribe(*pnh_, "input", 1);
125  sub_clusters_.subscribe(*pnh_, "input_clusters", 1);
127  = boost::make_shared<message_filters::Synchronizer<SyncClusterPolicy> >(100);
128  sync_cluster_->connectInput(sub_input_, sub_clusters_);
129  sync_cluster_->registerCallback(
131  this, _1, _2));
132  }
133  else {
134  sub_ = pnh_->subscribe("input", 1, &MultiPlaneSACSegmentation::segment, this);
135  }
136  }
137 
139  {
141  // subscriber
143  if (use_normal_) {
146  }
147  else if (use_clusters_) {
150  }
151  else {
152  sub_.shutdown();
153  }
154  }
155 
156  void MultiPlaneSACSegmentation::configCallback (Config &config, uint32_t level)
157  {
158  boost::mutex::scoped_lock lock(mutex_);
159  outlier_threshold_ = config.outlier_threshold;
160  min_inliers_ = config.min_inliers;
161  min_points_ = config.min_points;
162  max_iterations_ = config.max_iterations;
163  eps_angle_ = config.eps_angle;
164  normal_distance_weight_ = config.normal_distance_weight;
165  min_trial_ = config.min_trial;
166  }
167 
169  const pcl::PointCloud<PointT>::Ptr& input,
170  const pcl::PointCloud<pcl::Normal>::Ptr& normal,
171  const Eigen::Vector3f& imu_vector,
172  std::vector<pcl::PointIndices::Ptr>& output_inliers,
173  std::vector<pcl::ModelCoefficients::Ptr>& output_coefficients,
174  std::vector<jsk_recognition_utils::ConvexPolygon::Ptr>& output_polygons)
175  {
176  pcl::PointCloud<PointT>::Ptr rest_cloud (new pcl::PointCloud<PointT>);
177  pcl::PointCloud<pcl::Normal>::Ptr rest_normal (new pcl::PointCloud<pcl::Normal>);
178  *rest_cloud = *input;
179  *rest_normal = *normal;
180  int counter = 0;
181  while (true) {
182  NODELET_INFO("apply RANSAC: %d", counter);
183  ++counter;
184  pcl::PointIndices::Ptr inliers (new pcl::PointIndices);
185  pcl::ModelCoefficients::Ptr coefficients (new pcl::ModelCoefficients);
186  if (!use_normal_) {
187  pcl::SACSegmentation<PointT> seg;
188  seg.setOptimizeCoefficients (true);
189  seg.setRadiusLimits(0.3, std::numeric_limits<double>::max ());
190  seg.setMethodType (pcl::SAC_RANSAC);
191  seg.setDistanceThreshold (outlier_threshold_);
192  seg.setInputCloud(rest_cloud);
193  seg.setMaxIterations (max_iterations_);
194  if (use_imu_parallel_) {
195  seg.setModelType(pcl::SACMODEL_PARALLEL_PLANE);
196  seg.setAxis(imu_vector);
197  seg.setEpsAngle(eps_angle_);
198  }
199  else if (use_imu_perpendicular_) {
200  seg.setModelType(pcl::SACMODEL_PERPENDICULAR_PLANE);
201  seg.setAxis(imu_vector);
202  seg.setEpsAngle(eps_angle_);
203  }
204  else {
205  seg.setModelType (pcl::SACMODEL_PLANE);
206  }
207  seg.segment (*inliers, *coefficients);
208  }
209  else {
210  pcl::SACSegmentationFromNormals<PointT, pcl::Normal> seg;
211  seg.setOptimizeCoefficients (true);
212 
213  seg.setMethodType (pcl::SAC_RANSAC);
214  seg.setDistanceThreshold (outlier_threshold_);
215  seg.setNormalDistanceWeight(normal_distance_weight_);
216  seg.setInputCloud(rest_cloud);
217  seg.setInputNormals(rest_normal);
218  seg.setMaxIterations (max_iterations_);
219  if (use_imu_parallel_) {
220  seg.setModelType (pcl::SACMODEL_NORMAL_PARALLEL_PLANE);
221  seg.setAxis(imu_vector);
222  seg.setEpsAngle(eps_angle_);
223  }
224  else if (use_imu_perpendicular_) {
225  seg.setModelType (pcl::SACMODEL_NORMAL_PLANE);
226  seg.setAxis(imu_vector);
227  seg.setEpsAngle(eps_angle_);
228  }
229  else {
230  seg.setModelType (pcl::SACMODEL_NORMAL_PLANE);
231  }
232  seg.segment (*inliers, *coefficients);
233  }
234  NODELET_INFO("inliers: %lu", inliers->indices.size());
235  if (inliers->indices.size() >= min_inliers_) {
236  output_inliers.push_back(inliers);
237  output_coefficients.push_back(coefficients);
238  jsk_recognition_utils::ConvexPolygon::Ptr convex = jsk_recognition_utils::convexFromCoefficientsAndInliers<PointT>(
239  input, inliers, coefficients);
240  output_polygons.push_back(convex);
241  }
242  else {
243  if (min_trial_ <= counter) {
244  return;
245  }
246  }
247 
248  // prepare for next loop
249  pcl::PointCloud<PointT>::Ptr next_rest_cloud
250  (new pcl::PointCloud<PointT>);
251  pcl::PointCloud<pcl::Normal>::Ptr next_rest_normal
252  (new pcl::PointCloud<pcl::Normal>);
253  pcl::ExtractIndices<PointT> ex;
254  ex.setInputCloud(rest_cloud);
255  ex.setIndices(inliers);
256  ex.setNegative(true);
257  ex.setKeepOrganized(true);
258  ex.filter(*next_rest_cloud);
259  if (use_normal_) {
260  pcl::ExtractIndices<pcl::Normal> ex_normal;
261  ex_normal.setInputCloud(rest_normal);
262  ex_normal.setIndices(inliers);
263  ex_normal.setNegative(true);
264  ex_normal.setKeepOrganized(true);
265  ex_normal.filter(*next_rest_normal);
266  }
267  if (next_rest_cloud->points.size() < min_points_) {
268  NODELET_INFO("no more enough points are left");
269  return;
270  }
271  rest_cloud = next_rest_cloud;
272  rest_normal = next_rest_normal;
273  }
274  }
275 
277  const sensor_msgs::PointCloud2::ConstPtr& msg,
278  const jsk_recognition_msgs::ClusterPointIndices::ConstPtr& clusters)
279  {
280  boost::mutex::scoped_lock lock(mutex_);
281  pcl::PointCloud<PointT>::Ptr input (new pcl::PointCloud<PointT>);
283  std::vector<pcl::PointIndices::Ptr> cluster_indices
284  = pcl_conversions::convertToPCLPointIndices(clusters->cluster_indices);
285  pcl::ExtractIndices<PointT> ex;
286  ex.setInputCloud(input);
287  ex.setKeepOrganized(true);
288  std::vector<pcl::PointIndices::Ptr> all_inliers;
289  std::vector<pcl::ModelCoefficients::Ptr> all_coefficients;
290  std::vector<jsk_recognition_utils::ConvexPolygon::Ptr> all_convexes;
291  for (size_t i = 0; i < cluster_indices.size(); i++) {
292  pcl::PointIndices::Ptr indices = cluster_indices[i];
293  pcl::PointCloud<PointT>::Ptr cluster_cloud (new pcl::PointCloud<PointT>);
294  pcl::PointCloud<pcl::Normal>::Ptr normal (new pcl::PointCloud<pcl::Normal>);
295  ex.setIndices(indices);
296 
297  ex.filter(*cluster_cloud);
298  std::vector<pcl::PointIndices::Ptr> inliers;
299  std::vector<pcl::ModelCoefficients::Ptr> coefficients;
300  std::vector<jsk_recognition_utils::ConvexPolygon::Ptr> convexes;
301  Eigen::Vector3f dummy_imu_vector;
302  applyRecursiveRANSAC(cluster_cloud, normal, dummy_imu_vector, inliers, coefficients, convexes);
303  appendVector(all_inliers, inliers);
304  appendVector(all_coefficients, coefficients);
305  appendVector(all_convexes, convexes);
306  }
307  publishResult(msg->header, all_inliers, all_coefficients, all_convexes);
308  }
309 
311  const std_msgs::Header& header,
312  const std::vector<pcl::PointIndices::Ptr>& inliers,
313  const std::vector<pcl::ModelCoefficients::Ptr>& coefficients,
314  const std::vector<jsk_recognition_utils::ConvexPolygon::Ptr>& convexes)
315  {
316  jsk_recognition_msgs::ClusterPointIndices ros_indices_output;
317  jsk_recognition_msgs::ModelCoefficientsArray ros_coefficients_output;
318  jsk_recognition_msgs::PolygonArray ros_polygon_output;
319  ros_indices_output.header = header;
320  ros_coefficients_output.header = header;
321  ros_polygon_output.header = header;
322  ros_indices_output.cluster_indices
324  ros_coefficients_output.coefficients
326  pub_inliers_.publish(ros_indices_output);
327  pub_coefficients_.publish(ros_coefficients_output);
328  for (size_t i = 0; i < convexes.size(); i++) {
329  geometry_msgs::PolygonStamped polygon;
330  polygon.header = header;
331  polygon.polygon = convexes[i]->toROSMsg();
332  ros_polygon_output.polygons.push_back(polygon);
333  }
334  pub_polygons_.publish(ros_polygon_output);
335  }
336 
338  const sensor_msgs::PointCloud2::ConstPtr& msg,
339  const sensor_msgs::Imu::ConstPtr& imu_msg)
340  {
341  segmentWithImu(msg, sensor_msgs::PointCloud2::ConstPtr(), imu_msg);
342  }
343 
345  const sensor_msgs::PointCloud2::ConstPtr& msg,
346  const sensor_msgs::PointCloud2::ConstPtr& normal_msg,
347  const sensor_msgs::Imu::ConstPtr& imu_msg)
348  {
349  boost::mutex::scoped_lock lock(mutex_);
350  pcl::PointCloud<PointT>::Ptr input (new pcl::PointCloud<PointT>);
351  pcl::PointCloud<pcl::Normal>::Ptr
352  normal (new pcl::PointCloud<pcl::Normal>);
354  if (normal_msg) {
355  pcl::fromROSMsg(*normal_msg, *normal);
356  }
357  geometry_msgs::Vector3Stamped stamped_imu, transformed_stamped_imu;
358  stamped_imu.header = imu_msg->header;
359  stamped_imu.vector = imu_msg->linear_acceleration;
360  try {
362  msg->header.frame_id, imu_msg->header.frame_id, imu_msg->header.stamp,
363  ros::Duration(0.1));
365  msg->header.frame_id, stamped_imu, transformed_stamped_imu);
366  Eigen::Vector3d imu_vectord;
367  Eigen::Vector3f imu_vector;
368  tf::vectorMsgToEigen(transformed_stamped_imu.vector, imu_vectord);
369  jsk_recognition_utils::pointFromVectorToVector<Eigen::Vector3d, Eigen::Vector3f>(
370  imu_vectord, imu_vector);
371  imu_vector = - imu_vector;
372 
373  std::vector<pcl::PointIndices::Ptr> inliers;
374  std::vector<pcl::ModelCoefficients::Ptr> coefficients;
375  std::vector<jsk_recognition_utils::ConvexPolygon::Ptr> convexes;
376  applyRecursiveRANSAC(input, normal, imu_vector,
377  inliers, coefficients, convexes);
378  publishResult(msg->header, inliers, coefficients, convexes);
379  }
380  catch (tf2::ConnectivityException &e) {
381  NODELET_ERROR("[%s] Transform error: %s", __PRETTY_FUNCTION__, e.what());
382  }
383  catch (tf2::InvalidArgumentException &e) {
384  NODELET_ERROR("[%s] Transform error: %s", __PRETTY_FUNCTION__, e.what());
385  }
386  catch (tf2::ExtrapolationException& e) {
387  NODELET_ERROR("[%s] Transform error: %s", __PRETTY_FUNCTION__, e.what());
388  }
389 
390  }
391 
393  const sensor_msgs::PointCloud2::ConstPtr& msg,
394  const sensor_msgs::PointCloud2::ConstPtr& msg_normal)
395  {
396  boost::mutex::scoped_lock lock(mutex_);
397  pcl::PointCloud<PointT>::Ptr input (new pcl::PointCloud<PointT>);
398  pcl::PointCloud<pcl::Normal>::Ptr normal (new pcl::PointCloud<pcl::Normal>);
400  if (use_normal_) {
401  pcl::fromROSMsg(*msg_normal, *normal);
402  }
403  std::vector<pcl::PointIndices::Ptr> inliers;
404  std::vector<pcl::ModelCoefficients::Ptr> coefficients;
405  std::vector<jsk_recognition_utils::ConvexPolygon::Ptr> convexes;
406  Eigen::Vector3f dummy_imu_vector;
407  applyRecursiveRANSAC(input, normal, dummy_imu_vector,
408  inliers, coefficients, convexes);
409  publishResult(msg->header, inliers, coefficients, convexes);
410  }
411 
413  const sensor_msgs::PointCloud2::ConstPtr& msg)
414  {
415  segment(msg, sensor_msgs::PointCloud2::ConstPtr());
416  }
417 }
418 
extract_top_polygon_likelihood.ex
ex
Definition: extract_top_polygon_likelihood.py:51
jsk_pcl_ros::MultiPlaneSACSegmentation::unsubscribe
virtual void unsubscribe()
Definition: multi_plane_sac_segmentation_nodelet.cpp:170
jsk_pcl_ros::MultiPlaneSACSegmentation::sync_normal_imu_
boost::shared_ptr< message_filters::Synchronizer< SyncNormalImuPolicy > > sync_normal_imu_
Definition: multi_plane_sac_segmentation.h:196
NODELET_ERROR
#define NODELET_ERROR(...)
depth_error_calibration.lock
lock
Definition: depth_error_calibration.py:32
jsk_pcl_ros::MultiPlaneSACSegmentation::outlier_threshold_
double outlier_threshold_
Definition: multi_plane_sac_segmentation.h:207
_2
boost::arg< 2 > _2
sample_simulate_tabletop_cloud.polygon
polygon
Definition: sample_simulate_tabletop_cloud.py:167
_3
boost::arg< 3 > _3
boost::shared_ptr< ConvexPolygon >
i
int i
sample_simulate_tabletop_cloud.header
header
Definition: sample_simulate_tabletop_cloud.py:162
jsk_pcl_ros::MultiPlaneSACSegmentation::pub_polygons_
ros::Publisher pub_polygons_
Definition: multi_plane_sac_segmentation.h:191
jsk_pcl_ros::MultiPlaneSACSegmentation::segmentWithClusters
virtual void segmentWithClusters(const sensor_msgs::PointCloud2::ConstPtr &msg, const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &clusters)
Definition: multi_plane_sac_segmentation_nodelet.cpp:308
jsk_pcl_ros::MultiPlaneSACSegmentation::sub_normal_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_normal_
Definition: multi_plane_sac_segmentation.h:198
tf::TransformListener::transformVector
void transformVector(const std::string &target_frame, const geometry_msgs::Vector3Stamped &stamped_in, geometry_msgs::Vector3Stamped &stamped_out) const
jsk_pcl_ros::MultiPlaneSACSegmentation::use_clusters_
bool use_clusters_
Definition: multi_plane_sac_segmentation.h:212
ros::Subscriber::shutdown
void shutdown()
pcl_conversions::convertToPCLPointIndices
std::vector< pcl::PointIndices::Ptr > convertToPCLPointIndices(const std::vector< PCLIndicesMsg > &cluster_indices)
jsk_pcl_ros::MultiPlaneSACSegmentation::applyRecursiveRANSAC
virtual void applyRecursiveRANSAC(const pcl::PointCloud< PointT >::Ptr &input, const pcl::PointCloud< pcl::Normal >::Ptr &normal, const Eigen::Vector3f &imu_vector, std::vector< pcl::PointIndices::Ptr > &output_inliers, std::vector< pcl::ModelCoefficients::Ptr > &output_coefficients, std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > &output_polygons)
Definition: multi_plane_sac_segmentation_nodelet.cpp:200
pcl::fromROSMsg
void fromROSMsg(const sensor_msgs::PointCloud2 &cloud, pcl::PointCloud< T > &pcl_cloud)
jsk_pcl_ros::MultiPlaneSACSegmentation::publishResult
virtual void publishResult(const std_msgs::Header &header, const std::vector< pcl::PointIndices::Ptr > &inliers, const std::vector< pcl::ModelCoefficients::Ptr > &coefficients, const std::vector< jsk_recognition_utils::ConvexPolygon::Ptr > &convexes)
Definition: multi_plane_sac_segmentation_nodelet.cpp:342
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
message_filters::Subscriber::unsubscribe
void unsubscribe()
jsk_pcl_ros::MultiPlaneSACSegmentation
Definition: multi_plane_sac_segmentation.h:98
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(jsk_pcl_ros::MultiPlaneSACSegmentation, nodelet::Nodelet)
jsk_pcl_ros::MultiPlaneSACSegmentation::sync_cluster_
boost::shared_ptr< message_filters::Synchronizer< SyncClusterPolicy > > sync_cluster_
Definition: multi_plane_sac_segmentation.h:194
class_list_macros.h
jsk_pcl_ros::MultiPlaneSACSegmentation::sub_imu_
message_filters::Subscriber< sensor_msgs::Imu > sub_imu_
Definition: multi_plane_sac_segmentation.h:200
jsk_pcl_ros::MultiPlaneSACSegmentation::~MultiPlaneSACSegmentation
virtual ~MultiPlaneSACSegmentation()
Definition: multi_plane_sac_segmentation_nodelet.cpp:107
jsk_pcl_ros::MultiPlaneSACSegmentation::normal_distance_weight_
double normal_distance_weight_
Definition: multi_plane_sac_segmentation.h:216
jsk_pcl_ros
Definition: add_color_from_image.h:51
jsk_pcl_ros::MultiPlaneSACSegmentation::pub_coefficients_
ros::Publisher pub_coefficients_
Definition: multi_plane_sac_segmentation.h:191
jsk_pcl_ros::MultiPlaneSACSegmentation::use_imu_perpendicular_
bool use_imu_perpendicular_
Definition: multi_plane_sac_segmentation.h:214
tf2::ExtrapolationException
jsk_pcl_ros::MultiPlaneSACSegmentation::sub_clusters_
message_filters::Subscriber< jsk_recognition_msgs::ClusterPointIndices > sub_clusters_
Definition: multi_plane_sac_segmentation.h:199
eigen_msg.h
tf::vectorMsgToEigen
void vectorMsgToEigen(const geometry_msgs::Vector3 &m, Eigen::Vector3d &e)
jsk_pcl_ros::MultiPlaneSACSegmentation::sync_imu_
boost::shared_ptr< message_filters::Synchronizer< SyncImuPolicy > > sync_imu_
Definition: multi_plane_sac_segmentation.h:195
_1
boost::arg< 1 > _1
appendVector
void appendVector(std::vector< T > &a, const std::vector< T > &b)
tf::Transformer::waitForTransform
bool waitForTransform(const std::string &target_frame, const ros::Time &target_time, const std::string &source_frame, const ros::Time &source_time, const std::string &fixed_frame, const ros::Duration &timeout, const ros::Duration &polling_sleep_duration=ros::Duration(0.01), std::string *error_msg=NULL) const
pcl_conversions::convertToROSModelCoefficients
std::vector< PCLModelCoefficientMsg > convertToROSModelCoefficients(const std::vector< pcl::ModelCoefficients::Ptr > &coefficients, const std_msgs::Header &header)
tf2::ConnectivityException
jsk_pcl_ros::MultiPlaneSACSegmentation::segment
virtual void segment(const sensor_msgs::PointCloud2::ConstPtr &msg)
Definition: multi_plane_sac_segmentation_nodelet.cpp:444
message_filters::Subscriber::subscribe
void subscribe()
jsk_pcl_ros::MultiPlaneSACSegmentation::min_inliers_
int min_inliers_
Definition: multi_plane_sac_segmentation.h:208
NODELET_INFO
#define NODELET_INFO(...)
jsk_pcl_ros::MultiPlaneSACSegmentation::use_imu_parallel_
bool use_imu_parallel_
Definition: multi_plane_sac_segmentation.h:213
nodelet::Nodelet
jsk_pcl_ros::MultiPlaneSACSegmentation::min_points_
int min_points_
Definition: multi_plane_sac_segmentation.h:209
jsk_pcl_ros::MultiPlaneSACSegmentation::max_iterations_
int max_iterations_
Definition: multi_plane_sac_segmentation.h:210
pcl_util.h
jsk_pcl_ros::MultiPlaneSACSegmentation::pub_inliers_
ros::Publisher pub_inliers_
Definition: multi_plane_sac_segmentation.h:191
jsk_pcl_ros::MultiPlaneSACSegmentation::subscribe
virtual void subscribe()
Definition: multi_plane_sac_segmentation_nodelet.cpp:121
dump_depth_error.f
f
Definition: dump_depth_error.py:39
jsk_pcl_ros::MultiPlaneSACSegmentation::tf_listener_
tf::TransformListener * tf_listener_
Definition: multi_plane_sac_segmentation.h:202
jsk_pcl_ros::MultiPlaneSACSegmentation::use_normal_
bool use_normal_
Definition: multi_plane_sac_segmentation.h:211
jsk_pcl_ros::MultiPlaneSACSegmentation::mutex_
boost::mutex mutex_
Definition: multi_plane_sac_segmentation.h:201
multi_plane_sac_segmentation.h
coefficients
coefficients
jsk_pcl_ros::MultiPlaneSACSegmentation::eps_angle_
double eps_angle_
Definition: multi_plane_sac_segmentation.h:215
jsk_pcl_ros::MultiPlaneSACSegmentation::sync_
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
Definition: multi_plane_sac_segmentation.h:193
jsk_recognition_utils::TfListenerSingleton::getInstance
static tf::TransformListener * getInstance()
depth_error_calibration.input
input
Definition: depth_error_calibration.py:43
jsk_pcl_ros::MultiPlaneSACSegmentation::segmentWithImu
virtual void segmentWithImu(const sensor_msgs::PointCloud2::ConstPtr &msg, const sensor_msgs::Imu::ConstPtr &imu)
Definition: multi_plane_sac_segmentation_nodelet.cpp:369
tf2::InvalidArgumentException
pcl_conversions::convertToROSPointIndices
std::vector< PCLIndicesMsg > convertToROSPointIndices(const std::vector< pcl::PointIndices > cluster_indices, const std_msgs::Header &header)
jsk_pcl_ros::MultiPlaneSACSegmentation::srv_
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
Definition: multi_plane_sac_segmentation.h:192
jsk_pcl_ros::MultiPlaneSACSegmentation::min_trial_
int min_trial_
Definition: multi_plane_sac_segmentation.h:217
config
config
ros::Duration
pose_with_covariance_sample.msg
msg
Definition: pose_with_covariance_sample.py:22
pose_with_covariance_sample.counter
int counter
Definition: pose_with_covariance_sample.py:11
jsk_pcl_ros::MultiPlaneSACSegmentation::sub_
ros::Subscriber sub_
Definition: multi_plane_sac_segmentation.h:190
jsk_pcl_ros::MultiPlaneSACSegmentation::sub_input_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_input_
Definition: multi_plane_sac_segmentation.h:197
jsk_pcl_ros::MultiPlaneSACSegmentation::onInit
virtual void onInit()
Definition: multi_plane_sac_segmentation_nodelet.cpp:78
jsk_pcl_ros::MultiPlaneSACSegmentation::configCallback
virtual void configCallback(Config &config, uint32_t level)
Definition: multi_plane_sac_segmentation_nodelet.cpp:188


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