include
jsk_pcl_ros
selected_cluster_publisher.h
Go to the documentation of this file.
1
// -*- mode: c++ -*-
2
/*********************************************************************
3
* Software License Agreement (BSD License)
4
*
5
* Copyright (c) 2013, Ryohei Ueda and 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
#ifndef JSK_PCL_ROS_SELECTED_CLUSTER_PUBLISHER_H_
37
#define JSK_PCL_ROS_SELECTED_CLUSTER_PUBLISHER_H_
38
39
#include <
pcl_ros/pcl_nodelet.h
>
40
#include <
pcl_ros/point_cloud.h
>
41
#include <sensor_msgs/PointCloud2.h>
42
#include <jsk_recognition_msgs/Int32Stamped.h>
43
#include <jsk_recognition_msgs/ClusterPointIndices.h>
44
#include <
message_filters/time_synchronizer.h
>
45
#include <
message_filters/synchronizer.h
>
46
#include <jsk_topic_tools/connection_based_nodelet.h>
47
48
namespace
jsk_pcl_ros
49
{
50
class
SelectedClusterPublisher:
public
jsk_topic_tools::ConnectionBasedNodelet
51
{
52
public
:
53
typedef
message_filters::sync_policies::ExactTime<sensor_msgs::PointCloud2, jsk_recognition_msgs::ClusterPointIndices, jsk_recognition_msgs::Int32Stamped>
SyncPolicy
;
54
virtual
~SelectedClusterPublisher
();
55
protected
:
56
ros::Publisher
pub_
;
57
message_filters::Subscriber<sensor_msgs::PointCloud2>
sub_input_
;
58
message_filters::Subscriber<jsk_recognition_msgs::ClusterPointIndices>
sub_indices_
;
59
message_filters::Subscriber<jsk_recognition_msgs::Int32Stamped>
sub_index_
;
60
boost::shared_ptr<message_filters::Synchronizer<SyncPolicy>
>
sync_
;
61
62
virtual
void
extract
(
const
sensor_msgs::PointCloud2::ConstPtr&
input
,
63
const
jsk_recognition_msgs::ClusterPointIndices::ConstPtr& indices,
64
const
jsk_recognition_msgs::Int32Stamped::ConstPtr& index);
65
virtual
void
subscribe
();
66
virtual
void
unsubscribe
();
67
private
:
68
virtual
void
onInit
();
69
70
bool
keep_organized_
;
71
};
72
73
}
74
75
#endif
ros::Publisher
jsk_pcl_ros::SelectedClusterPublisher::sub_input_
message_filters::Subscriber< sensor_msgs::PointCloud2 > sub_input_
Definition:
selected_cluster_publisher.h:121
boost::shared_ptr
jsk_pcl_ros::SelectedClusterPublisher::subscribe
virtual void subscribe()
Definition:
selected_cluster_publisher_nodelet.cpp:94
time_synchronizer.h
point_cloud.h
message_filters::Subscriber< sensor_msgs::PointCloud2 >
pcl_nodelet.h
jsk_pcl_ros::SelectedClusterPublisher::SyncPolicy
message_filters::sync_policies::ExactTime< sensor_msgs::PointCloud2, jsk_recognition_msgs::ClusterPointIndices, jsk_recognition_msgs::Int32Stamped > SyncPolicy
Definition:
selected_cluster_publisher.h:117
jsk_pcl_ros
Definition:
add_color_from_image.h:51
jsk_pcl_ros::SelectedClusterPublisher::unsubscribe
virtual void unsubscribe()
Definition:
selected_cluster_publisher_nodelet.cpp:104
jsk_pcl_ros::SelectedClusterPublisher::sub_index_
message_filters::Subscriber< jsk_recognition_msgs::Int32Stamped > sub_index_
Definition:
selected_cluster_publisher.h:123
jsk_pcl_ros::SelectedClusterPublisher::extract
virtual void extract(const sensor_msgs::PointCloud2::ConstPtr &input, const jsk_recognition_msgs::ClusterPointIndices::ConstPtr &indices, const jsk_recognition_msgs::Int32Stamped::ConstPtr &index)
Definition:
selected_cluster_publisher_nodelet.cpp:111
jsk_pcl_ros::SelectedClusterPublisher::onInit
virtual void onInit()
Definition:
selected_cluster_publisher_nodelet.cpp:75
jsk_pcl_ros::SelectedClusterPublisher::~SelectedClusterPublisher
virtual ~SelectedClusterPublisher()
Definition:
selected_cluster_publisher_nodelet.cpp:83
jsk_pcl_ros::SelectedClusterPublisher::keep_organized_
bool keep_organized_
Definition:
selected_cluster_publisher.h:134
jsk_pcl_ros::SelectedClusterPublisher::sync_
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
Definition:
selected_cluster_publisher.h:124
jsk_pcl_ros::SelectedClusterPublisher::pub_
ros::Publisher pub_
Definition:
selected_cluster_publisher.h:120
synchronizer.h
jsk_pcl_ros::SelectedClusterPublisher::sub_indices_
message_filters::Subscriber< jsk_recognition_msgs::ClusterPointIndices > sub_indices_
Definition:
selected_cluster_publisher.h:122
depth_error_calibration.input
input
Definition:
depth_error_calibration.py:43
message_filters::sync_policies::ExactTime
jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Tue Jan 7 2025 04:05:45