hinted_stick_finder_nodelet.cpp
Go to the documentation of this file.
1 // -*- mode: c++ -*-
2 /*********************************************************************
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2015, 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 #define BOOST_PARAMETER_MAX_ARITY 7
38 #include <pcl/sample_consensus/method_types.h>
39 #include <pcl/sample_consensus/model_types.h>
40 #include <pcl/segmentation/sac_segmentation.h>
41 #include <pcl/filters/project_inliers.h>
42 #include <pcl/filters/extract_indices.h>
43 #include <pcl/features/normal_3d_omp.h>
44 #include <visualization_msgs/Marker.h>
45 #include <geometry_msgs/PoseStamped.h>
46 
47 namespace jsk_pcl_ros
48 {
50  {
51  DiagnosticNodelet::onInit();
52  srv_ = boost::make_shared <dynamic_reconfigure::Server<Config> > (*pnh_);
53  typename dynamic_reconfigure::Server<Config>::CallbackType f =
54  boost::bind (&HintedStickFinder::configCallback, this, _1, _2);
55  srv_->setCallback (f);
56  pnh_->param("use_normal", use_normal_, false);
57  pnh_->param("not_synchronize", not_synchronize_, false);
58 
59  pub_line_filtered_indices_ = advertise<PCLIndicesMsg>(
60  *pnh_, "debug/line_filtered_indices", 1);
61  pub_line_filtered_normal_ = advertise<sensor_msgs::PointCloud2>(
62  *pnh_, "debug/line_filtered_normal", 1);
63  pub_cylinder_marker_ = advertise<visualization_msgs::Marker>(
64  *pnh_, "debug/cylinder_marker", 1);
65  pub_cylinder_pose_ = advertise<geometry_msgs::PoseStamped>(
66  *pnh_, "output/cylinder_pose", 1);
67  pub_inliers_ = advertise<PCLIndicesMsg>(
68  *pnh_, "output/inliers", 1);
69  pub_coefficients_ = advertise<PCLModelCoefficientMsg>(
70  *pnh_, "output/coefficients", 1);
71  onInitPostProcess();
72  }
73 
75  // message_filters::Synchronizer needs to be called reset
76  // before message_filters::Subscriber is freed.
77  // Calling reset fixes the following error on shutdown of the nodelet:
78  // terminate called after throwing an instance of
79  // 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
80  // what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
81  // Also see https://github.com/ros/ros_comm/issues/720 .
82  sync_.reset();
83  }
84 
86  {
87  if (!not_synchronize_) {
88  sub_polygon_.subscribe(*pnh_, "input/hint/line", 1);
89  sub_info_.subscribe(*pnh_, "input/camera_info", 1);
90  sub_cloud_.subscribe(*pnh_, "input", 1);
91  sync_ = boost::make_shared<message_filters::Synchronizer<ASyncPolicy> >(100);
92  sync_->connectInput(sub_polygon_, sub_info_, sub_cloud_);
93  sync_->registerCallback(boost::bind(&HintedStickFinder::detect, this,
94  _1, _2, _3));
95  }
96  else {
97  sub_no_sync_cloud_ = pnh_->subscribe(
98  "input", 1, &HintedStickFinder::cloudCallback, this);
99  sub_no_sync_camera_info_ = pnh_->subscribe(
100  "input/camera_info", 1, &HintedStickFinder::infoCallback, this);
101  sub_no_sync_polygon_ = pnh_->subscribe(
102  "input/hint/line", 1, &HintedStickFinder::hintCallback, this);
103  }
104  }
105 
106 
108  const sensor_msgs::PointCloud2::ConstPtr& cloud_msg)
109  {
110  {
111  boost::mutex::scoped_lock lock(mutex_);
113  // not yet ready
114  NODELET_WARN_THROTTLE(1, "~input/hint/lline or ~input/camera_info is not ready");
115  return;
116  }
117  }
119  }
120 
121 
123  const geometry_msgs::PolygonStamped::ConstPtr& hint_msg)
124  {
125  boost::mutex::scoped_lock lock(mutex_);
126  latest_hint_ = hint_msg;
127  }
128 
130  const sensor_msgs::CameraInfo::ConstPtr& info_msg)
131  {
132  boost::mutex::scoped_lock lock(mutex_);
134  }
135 
136 
138  {
139  if (!not_synchronize_) {
143  }
144  else {
148  }
149  }
150 
152  const geometry_msgs::PolygonStamped::ConstPtr& polygon_msg,
153  const sensor_msgs::CameraInfo::ConstPtr& camera_info_msg,
154  const sensor_msgs::PointCloud2::ConstPtr& cloud_msg)
155  {
156  boost::mutex::scoped_lock lock(mutex_);
157  NODELET_WARN("starting detection");
160  model.fromCameraInfo(camera_info_msg);
161  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud
162  (new pcl::PointCloud<pcl::PointXYZ>);
163  pcl::fromROSMsg(*cloud_msg, *cloud);
164  // convert 2-D point into 3-D ray
165  Eigen::Vector3f a, b;
167  pcl::PointIndices::Ptr candidate_indices
168  (new pcl::PointIndices);
169 
170  filterPointCloud(cloud, polygon, *candidate_indices);
171  pcl::PointCloud<pcl::Normal>::Ptr normals
172  (new pcl::PointCloud<pcl::Normal>);
173  pcl::PointCloud<pcl::PointXYZ>::Ptr normals_cloud
174  (new pcl::PointCloud<pcl::PointXYZ>);
175  if (!use_normal_) {
176  normalEstimate(cloud, candidate_indices, *normals, *normals_cloud);
177  }
178  else {
179  // we don't need to compute normal
180  pcl::PointCloud<pcl::Normal>::Ptr all_normals
181  (new pcl::PointCloud<pcl::Normal>);
182  pcl::fromROSMsg(*cloud_msg, *all_normals);
183  pcl::ExtractIndices<pcl::PointXYZ> xyz_extract;
184  xyz_extract.setInputCloud(cloud);
185  xyz_extract.setIndices(candidate_indices);
186  xyz_extract.filter(*normals_cloud);
187 
188  pcl::ExtractIndices<pcl::Normal> normal_extract;
189  normal_extract.setInputCloud(all_normals);
190  normal_extract.setIndices(candidate_indices);
191  normal_extract.filter(*normals);
192  }
193  fittingCylinder(normals_cloud, normals, a, b);
194  ros::Time end_time = ros::Time::now();
195  NODELET_WARN("detection time: %f", (end_time - start_time).toSec());
196  }
197 
199  const pcl::PointCloud<pcl::PointXYZ>::Ptr& cloud,
200  const pcl::PointIndices::Ptr indices,
201  pcl::PointCloud<pcl::Normal>& normals,
202  pcl::PointCloud<pcl::PointXYZ>& normals_cloud)
203  {
204  pcl::NormalEstimationOMP<pcl::PointXYZ, pcl::Normal> ne;
205  ne.setInputCloud(cloud);
206  ne.setIndices(indices);
207  pcl::search::KdTree<pcl::PointXYZ>::Ptr tree
208  (new pcl::search::KdTree<pcl::PointXYZ> ());
209  ne.setSearchMethod(tree);
210  ne.setRadiusSearch (0.03);
211  ne.compute (normals);
212  pcl::ExtractIndices<pcl::PointXYZ> ex;
213  ex.setInputCloud(cloud);
214  ex.setIndices(indices);
215  ex.filter(normals_cloud);
216  }
217 
219  const jsk_recognition_utils::Cylinder::Ptr& cylinder,
220  const Eigen::Vector3f& a,
221  const Eigen::Vector3f& b)
222  {
223  Eigen::Vector3f hint_dir((b - a));
224  hint_dir[2] = 0;
225  hint_dir.normalize();
226  Eigen::Vector3f cylinder_dir(cylinder->getDirection());
227  cylinder_dir[2] = 0;
228  cylinder_dir.normalize();
229  double ang = acos(cylinder_dir.dot(hint_dir));
230  NODELET_INFO("angle: %f", ang);
231  return !(ang < eps_2d_angle_ || (M_PI - ang) < eps_2d_angle_);
232  }
233 
235  const pcl::PointCloud<pcl::PointXYZ>::Ptr& filtered_cloud,
236  const pcl::PointCloud<pcl::Normal>::Ptr& cloud_normals,
237  const Eigen::Vector3f& a,
238  const Eigen::Vector3f& b)
239  {
240  pcl::SACSegmentationFromNormals<pcl::PointXYZ, pcl::Normal> seg;
241  pcl::PointIndices::Ptr inliers (new pcl::PointIndices);
242  pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients);
243  Eigen::Vector3f normal = (a - b).normalized();
244  seg.setOptimizeCoefficients (true);
245  seg.setModelType (pcl::SACMODEL_CYLINDER);
246  seg.setMethodType (pcl::SAC_RANSAC);
247  seg.setDistanceThreshold (outlier_threshold_);
248  seg.setMaxIterations (max_iteration_);
249  seg.setNormalDistanceWeight (0.1);
250  seg.setRadiusLimits(min_radius_, max_radius_);
251  // seg.setEpsAngle(eps_angle_);
252  // seg.setAxis(normal);
253  seg.setProbability(min_probability_);
254  seg.setInputCloud(filtered_cloud);
255  seg.setInputNormals(cloud_normals);
256  for (size_t i = 0; i < cylinder_fitting_trial_; i++) {
257  seg.segment(*inliers, *coefficients);
258  if (inliers->indices.size() > min_inliers_) {
259  Eigen::Vector3f dir(coefficients->values[3],
260  coefficients->values[4],
261  coefficients->values[5]);
262  if (dir.dot(Eigen::Vector3f(0, -1, 0)) < 0) {
263  dir = -dir;
264  }
266  coefficients->values[0],
267  coefficients->values[1],
268  coefficients->values[2]),
269  dir,
270  coefficients->values[6]));
271  pcl::PointIndices::Ptr cylinder_indices
272  (new pcl::PointIndices);
273  cylinder->filterPointCloud(*filtered_cloud,
275  *cylinder_indices);
276  double height = 0;
277  Eigen::Vector3f center;
278  cylinder->estimateCenterAndHeight(
279  *filtered_cloud, *cylinder_indices,
280  center, height);
281  if (!rejected2DHint(cylinder, a, b)) {
282  Eigen::Vector3f uz = Eigen::Vector3f(
283  dir).normalized();
284  // build maker
285  visualization_msgs::Marker marker;
286  cylinder->toMarker(marker, center, uz, height);
287  pcl_conversions::fromPCL(filtered_cloud->header, marker.header);
289  geometry_msgs::PoseStamped pose;
290  pose.header = marker.header;
291  pose.pose = marker.pose;
293 
294  PCLIndicesMsg ros_inliers;
295  pcl_conversions::fromPCL(*inliers, ros_inliers);
296  pub_inliers_.publish(ros_inliers);
297  PCLModelCoefficientMsg ros_coefficients;
298  ros_coefficients.header = pcl_conversions::fromPCL(coefficients->header);
299  ros_coefficients.values.push_back(center[0]);
300  ros_coefficients.values.push_back(center[1]);
301  ros_coefficients.values.push_back(center[2]);
302  ros_coefficients.values.push_back(dir[0]);
303  ros_coefficients.values.push_back(dir[1]);
304  ros_coefficients.values.push_back(dir[2]);
305  ros_coefficients.values.push_back(coefficients->values[6]);
306  ros_coefficients.values.push_back(height);
307  pub_coefficients_.publish(ros_coefficients);
308  return;
309  }
310  }
311  NODELET_WARN("failed to detect cylinder [%lu/%d]", i, cylinder_fitting_trial_);
312  }
313  }
314 
316  const pcl::PointCloud<pcl::PointXYZ>::Ptr& cloud,
318  pcl::PointIndices& output_indices)
319  {
320  output_indices.indices.clear();
321  for (size_t i = 0; i < cloud->points.size(); i++) {
322  pcl::PointXYZ p = cloud->points[i];
323  if (!std::isnan(p.x) && !std::isnan(p.y) && !std::isnan(p.z)) {
324  if (polygon->isProjectableInside(p.getVector3fMap())) {
325  if (polygon->distanceSmallerThan(p.getVector3fMap(), filter_distance_)) {
326  output_indices.indices.push_back(i);
327  }
328  }
329  }
330  }
331  output_indices.header = cloud->header;
332  PCLIndicesMsg ros_indices;
333  pcl_conversions::fromPCL(output_indices, ros_indices);
334  pub_line_filtered_indices_.publish(ros_indices);
335  }
336 
337 
339  const geometry_msgs::PolygonStamped::ConstPtr& polygon_msg,
341  Eigen::Vector3f& a,
342  Eigen::Vector3f& b)
343  {
344  cv::Point2d point_a(polygon_msg->polygon.points[0].x,
345  polygon_msg->polygon.points[0].y);
346  cv::Point2d point_b(polygon_msg->polygon.points[1].x,
347  polygon_msg->polygon.points[1].y);
348  cv::Point3d ray_a = model.projectPixelTo3dRay(point_a);
349  cv::Point3d ray_b = model.projectPixelTo3dRay(point_b);
350  a = Eigen::Vector3f(ray_a.x, ray_a.y, ray_a.z);
351  b = Eigen::Vector3f(ray_b.x, ray_b.y, ray_b.z);
352  // 20m is far enough??
353  Eigen::Vector3f far_a = 20.0 * a;
354  Eigen::Vector3f far_b = 20.0 * b;
355  Eigen::Vector3f O(0, 0, 0);
357  vertices.push_back(O);
358  vertices.push_back(far_a);
359  vertices.push_back(far_b);
361  return polygon;
362  }
363 
364  void HintedStickFinder::configCallback(Config &config, uint32_t level)
365  {
366  boost::mutex::scoped_lock lock(mutex_);
367  min_radius_ = config.min_radius;
368  max_radius_ = config.max_radius;
369  filter_distance_ = config.filter_distance;
370  outlier_threshold_ = config.outlier_threshold;
371  max_iteration_ = config.max_iteration;
372  eps_angle_ = config.eps_angle;
373  min_probability_ = config.min_probability;
374  cylinder_fitting_trial_ = config.cylinder_fitting_trial;
375  min_inliers_ = config.min_inliers;
376  eps_2d_angle_ = config.eps_2d_angle;
377  }
378 }
379 
extract_top_polygon_likelihood.ex
ex
Definition: extract_top_polygon_likelihood.py:51
hinted_stick_finder.h
jsk_pcl_ros::HintedStickFinder
Definition: hinted_stick_finder.h:91
jsk_pcl_ros::HintedStickFinder::eps_2d_angle_
double eps_2d_angle_
Definition: hinted_stick_finder.h:230
jsk_pcl_ros::HintedStickFinder::normalEstimate
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)
Definition: hinted_stick_finder_nodelet.cpp:198
depth_error_calibration.lock
lock
Definition: depth_error_calibration.py:32
jsk_pcl_ros::HintedStickFinder::use_normal_
bool use_normal_
True if use ~input has normal fields.
Definition: hinted_stick_finder.h:235
_2
boost::arg< 2 > _2
jsk_recognition_utils::ConvexPolygon
jsk_pcl_ros::HintedStickFinder::max_iteration_
int max_iteration_
Definition: hinted_stick_finder.h:225
jsk_pcl_ros::HintedStickFinder::cloudCallback
virtual void cloudCallback(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg)
Non synchronized message callback for ~input pointcloud.
Definition: hinted_stick_finder_nodelet.cpp:107
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
p
p
M_PI
#define M_PI
jsk_pcl_ros::HintedStickFinder::pub_line_filtered_indices_
ros::Publisher pub_line_filtered_indices_
Definition: hinted_stick_finder.h:209
jsk_pcl_ros::HintedStickFinder::sub_info_
message_filters::Subscriber< sensor_msgs::CameraInfo > sub_info_
Definition: hinted_stick_finder.h:204
jsk_pcl_ros::HintedStickFinder::min_radius_
double min_radius_
Definition: hinted_stick_finder.h:222
PCLIndicesMsg
pcl::PointIndices PCLIndicesMsg
jsk_pcl_ros::HintedStickFinder::rejected2DHint
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_,...
Definition: hinted_stick_finder_nodelet.cpp:218
jsk_pcl_ros::HintedStickFinder::latest_hint_
geometry_msgs::PolygonStamped::ConstPtr latest_hint_
Definition: hinted_stick_finder.h:244
NODELET_WARN
#define NODELET_WARN(...)
jsk_pcl_ros::HintedStickFinder::infoCallback
virtual void infoCallback(const sensor_msgs::CameraInfo::ConstPtr &info_msg)
Non synchronized message callback for ~input/camera_info.
Definition: hinted_stick_finder_nodelet.cpp:129
ros::Subscriber::shutdown
void shutdown()
jsk_pcl_ros::HintedStickFinder::eps_angle_
double eps_angle_
Definition: hinted_stick_finder.h:226
pcl::fromROSMsg
void fromROSMsg(const sensor_msgs::PointCloud2 &cloud, pcl::PointCloud< T > &pcl_cloud)
jsk_pcl_ros::HintedStickFinder::pub_line_filtered_normal_
ros::Publisher pub_line_filtered_normal_
Definition: hinted_stick_finder.h:210
ros::Publisher::publish
void publish(const boost::shared_ptr< M > &message) const
jsk_recognition_utils::Cylinder
message_filters::Subscriber::unsubscribe
void unsubscribe()
cloud
cloud
jsk_pcl_ros::HintedStickFinder::pub_coefficients_
ros::Publisher pub_coefficients_
Definition: hinted_stick_finder.h:214
NODELET_WARN_THROTTLE
#define NODELET_WARN_THROTTLE(rate,...)
pose
pose
class_list_macros.h
jsk_pcl_ros::HintedStickFinder::fittingCylinder
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)
Definition: hinted_stick_finder_nodelet.cpp:234
jsk_pcl_ros::HintedStickFinder::outlier_threshold_
double outlier_threshold_
Definition: hinted_stick_finder.h:224
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(jsk_pcl_ros::HintedStickFinder, nodelet::Nodelet)
tree
tree
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::HintedStickFinder::Config
HintedStickFinderConfig Config
Definition: hinted_stick_finder.h:130
jsk_pcl_ros::HintedStickFinder::sub_no_sync_camera_info_
ros::Subscriber sub_no_sync_camera_info_
Definition: hinted_stick_finder.h:217
jsk_pcl_ros::HintedStickFinder::filter_distance_
double filter_distance_
Definition: hinted_stick_finder.h:223
jsk_pcl_ros::HintedStickFinder::unsubscribe
virtual void unsubscribe()
Definition: hinted_stick_finder_nodelet.cpp:137
jsk_pcl_ros::HintedStickFinder::sub_polygon_
message_filters::Subscriber< geometry_msgs::PolygonStamped > sub_polygon_
Definition: hinted_stick_finder.h:203
jsk_pcl_ros::HintedStickFinder::filterPointCloud
virtual void filterPointCloud(const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const jsk_recognition_utils::ConvexPolygon::Ptr polygon, pcl::PointIndices &output_indices)
Definition: hinted_stick_finder_nodelet.cpp:315
jsk_pcl_ros::HintedStickFinder::subscribe
virtual void subscribe()
Definition: hinted_stick_finder_nodelet.cpp:85
jsk_pcl_ros::HintedStickFinder::~HintedStickFinder
virtual ~HintedStickFinder()
Definition: hinted_stick_finder_nodelet.cpp:74
_1
boost::arg< 1 > _1
jsk_pcl_ros::HintedStickFinder::srv_
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
Definition: hinted_stick_finder.h:219
start_time
start_time
jsk_pcl_ros::HintedStickFinder::sync_
boost::shared_ptr< message_filters::Synchronizer< ASyncPolicy > > sync_
Definition: hinted_stick_finder.h:207
pcl_conversion_util.h
jsk_pcl_ros::HintedStickFinder::configCallback
virtual void configCallback(Config &config, uint32_t level)
Definition: hinted_stick_finder_nodelet.cpp:364
jsk_pcl_ros::HintedStickFinder::polygonFromLine
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)
Definition: hinted_stick_finder_nodelet.cpp:338
depth_error_calibration.model
model
Definition: depth_error_calibration.py:37
message_filters::Subscriber::subscribe
void subscribe()
NODELET_INFO
#define NODELET_INFO(...)
jsk_pcl_ros::HintedStickFinder::pub_cylinder_marker_
ros::Publisher pub_cylinder_marker_
Definition: hinted_stick_finder.h:211
nodelet::Nodelet
jsk_pcl_ros::HintedStickFinder::not_synchronize_
bool not_synchronize_
Run in continuous mode. continuous mode means this nodelet does not synchronize hint and input messag...
Definition: hinted_stick_finder.h:241
ros::Time
jsk_pcl_ros::HintedStickFinder::detect
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.
Definition: hinted_stick_finder_nodelet.cpp:151
jsk_pcl_ros::HintedStickFinder::pub_inliers_
ros::Publisher pub_inliers_
Definition: hinted_stick_finder.h:213
jsk_pcl_ros::HintedStickFinder::cylinder_fitting_trial_
int cylinder_fitting_trial_
Definition: hinted_stick_finder.h:228
image_geometry::PinholeCameraModel
jsk_pcl_ros::HintedStickFinder::latest_camera_info_
sensor_msgs::CameraInfo::ConstPtr latest_camera_info_
Definition: hinted_stick_finder.h:243
dump_depth_error.f
f
Definition: dump_depth_error.py:39
jsk_pcl_ros::HintedStickFinder::hintCallback
virtual void hintCallback(const geometry_msgs::PolygonStamped::ConstPtr &hint_msg)
Non synchronized message callback for ~input/hint/line.
Definition: hinted_stick_finder_nodelet.cpp:122
coefficients
coefficients
jsk_pcl_ros::HintedStickFinder::sub_no_sync_polygon_
ros::Subscriber sub_no_sync_polygon_
Definition: hinted_stick_finder.h:218
jsk_pcl_ros::HintedStickFinder::sub_no_sync_cloud_
ros::Subscriber sub_no_sync_cloud_
Definition: hinted_stick_finder.h:216
height
height
jsk_pcl_ros::HintedStickFinder::pub_cylinder_pose_
ros::Publisher pub_cylinder_pose_
Definition: hinted_stick_finder.h:212
jsk_pcl_ros::HintedStickFinder::max_radius_
double max_radius_
Definition: hinted_stick_finder.h:221
jsk_pcl_ros::HintedStickFinder::min_inliers_
int min_inliers_
Definition: hinted_stick_finder.h:229
a
char a[26]
jsk_pcl_ros::HintedStickFinder::min_probability_
double min_probability_
Definition: hinted_stick_finder.h:227
config
config
polygon_msg
jsk_recognition_msgs::PolygonArray::ConstPtr polygon_msg
info_msg
info_msg
jsk_pcl_ros::HintedStickFinder::onInit
virtual void onInit()
Definition: hinted_stick_finder_nodelet.cpp:49
jsk_pcl_ros::HintedStickFinder::mutex_
boost::mutex mutex_
Definition: hinted_stick_finder.h:201
ros::Time::now
static Time now()
jsk_pcl_ros::HintedStickFinder::sub_cloud_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_cloud_
Definition: hinted_stick_finder.h:205
jsk_recognition_utils::Vertices
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > Vertices


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