feature_registration.h
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 
36 
37 #ifndef JSK_PCL_ROS_FEATURE_REGISTRATION_H_
38 #define JSK_PCL_ROS_FEATURE_REGISTRATION_H_
39 
40 #include <jsk_topic_tools/diagnostic_nodelet.h>
41 
46 
47 #include <dynamic_reconfigure/server.h>
48 #include <jsk_pcl_ros/FeatureRegistrationConfig.h>
49 
50 #include <pcl/point_types.h>
51 #include <pcl/point_cloud.h>
52 #include <sensor_msgs/PointCloud2.h>
53 #include <geometry_msgs/PoseStamped.h>
54 
55 namespace jsk_pcl_ros
56 {
61  class FeatureRegistration: public jsk_topic_tools::DiagnosticNodelet
62  {
63  public:
64  typedef FeatureRegistrationConfig Config;
66  sensor_msgs::PointCloud2,
67  sensor_msgs::PointCloud2> SyncPolicy;
68  FeatureRegistration(): DiagnosticNodelet("FeatureRegistration") {};
69  virtual ~FeatureRegistration();
70  protected:
71  virtual void onInit();
72  virtual void subscribe();
73  virtual void unsubscribe();
74 
75  virtual void configCallback(Config &config, uint32_t level);
76 
77  virtual void referenceCallback(
78  const sensor_msgs::PointCloud2::ConstPtr& cloud_msg,
79  const sensor_msgs::PointCloud2::ConstPtr& feature_msg);
80 
81  virtual void estimate(
82  const sensor_msgs::PointCloud2::ConstPtr& cloud_msg,
83  const sensor_msgs::PointCloud2::ConstPtr& feature_msg);
84 
89 
93 
97 
98  // parameters to store reference data
99  pcl::PointCloud<pcl::PointNormal>::Ptr reference_cloud_;
100  pcl::PointCloud<pcl::FPFHSignature33>::Ptr reference_feature_;
101 
102  int max_iterations_;
104  double similarity_threshold_;
106  double inlier_fraction_;
108  private:
109 
110  };
111 }
112 
113 #endif
jsk_pcl_ros::FeatureRegistration::SyncPolicy
message_filters::sync_policies::ApproximateTime< sensor_msgs::PointCloud2, sensor_msgs::PointCloud2 > SyncPolicy
Definition: feature_registration.h:131
ros::Publisher
jsk_pcl_ros::FeatureRegistration::subscribe
virtual void subscribe()
Definition: feature_registration_nodelet.cpp:81
boost::shared_ptr
jsk_pcl_ros::FeatureRegistration::configCallback
virtual void configCallback(Config &config, uint32_t level)
Definition: feature_registration_nodelet.cpp:110
jsk_pcl_ros::FeatureRegistration::unsubscribe
virtual void unsubscribe()
Definition: feature_registration_nodelet.cpp:92
jsk_pcl_ros::FeatureRegistration::sub_input_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_input_
Definition: feature_registration.h:154
jsk_pcl_ros::FeatureRegistration::similarity_threshold_
double similarity_threshold_
Definition: feature_registration.h:168
jsk_pcl_ros::FeatureRegistration::reference_sync_
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > reference_sync_
Definition: feature_registration.h:160
time_synchronizer.h
jsk_pcl_ros::FeatureRegistration::sub_input_feature_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_input_feature_
Definition: feature_registration.h:155
message_filters::Subscriber< sensor_msgs::PointCloud2 >
jsk_pcl_ros::FeatureRegistration::reference_cloud_
pcl::PointCloud< pcl::PointNormal >::Ptr reference_cloud_
Definition: feature_registration.h:163
jsk_pcl_ros::FeatureRegistration::inlier_fraction_
double inlier_fraction_
Definition: feature_registration.h:170
message_filters::sync_policies::ApproximateTime
jsk_pcl_ros
Definition: add_color_from_image.h:51
jsk_pcl_ros::FeatureRegistration::onInit
virtual void onInit()
Definition: feature_registration_nodelet.cpp:46
subscriber.h
jsk_pcl_ros::FeatureRegistration::sync_
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
Definition: feature_registration.h:156
jsk_pcl_ros::FeatureRegistration::reference_feature_
pcl::PointCloud< pcl::FPFHSignature33 >::Ptr reference_feature_
Definition: feature_registration.h:164
jsk_pcl_ros::FeatureRegistration::sub_input_reference_feature_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_input_reference_feature_
Definition: feature_registration.h:159
jsk_pcl_ros::FeatureRegistration::correspondence_randomness_
int correspondence_randomness_
Definition: feature_registration.h:167
jsk_pcl_ros::FeatureRegistration::transformation_epsilon_
double transformation_epsilon_
Definition: feature_registration.h:171
jsk_pcl_ros::FeatureRegistration::srv_
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
Definition: feature_registration.h:152
jsk_pcl_ros::FeatureRegistration::FeatureRegistration
FeatureRegistration()
Definition: feature_registration.h:132
jsk_pcl_ros::FeatureRegistration::mutex_
boost::mutex mutex_
Definition: feature_registration.h:149
jsk_pcl_ros::FeatureRegistration::referenceCallback
virtual void referenceCallback(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg, const sensor_msgs::PointCloud2::ConstPtr &feature_msg)
Definition: feature_registration_nodelet.cpp:98
jsk_pcl_ros::FeatureRegistration::Config
FeatureRegistrationConfig Config
Definition: feature_registration.h:128
synchronizer.h
approximate_time.h
mutex
boost::mutex mutex
global mutex.
Definition: depth_camera_error_visualization.cpp:86
jsk_pcl_ros::FeatureRegistration::~FeatureRegistration
virtual ~FeatureRegistration()
Definition: feature_registration_nodelet.cpp:69
jsk_pcl_ros::FeatureRegistration::max_iterations_
int max_iterations_
Definition: feature_registration.h:166
jsk_pcl_ros::FeatureRegistration::sub_input_reference_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_input_reference_
Definition: feature_registration.h:158
jsk_pcl_ros::FeatureRegistration::estimate
virtual void estimate(const sensor_msgs::PointCloud2::ConstPtr &cloud_msg, const sensor_msgs::PointCloud2::ConstPtr &feature_msg)
Definition: feature_registration_nodelet.cpp:122
jsk_pcl_ros::FeatureRegistration::pub_pose_
ros::Publisher pub_pose_
Definition: feature_registration.h:150
jsk_pcl_ros::FeatureRegistration::max_correspondence_distance_
double max_correspondence_distance_
Definition: feature_registration.h:169
jsk_pcl_ros::FeatureRegistration::pub_cloud_
ros::Publisher pub_cloud_
Definition: feature_registration.h:151


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