3 from jsk_recognition_msgs.msg
import ClusterPointIndices
4 from jsk_recognition_msgs.msg
import PolygonArray
5 from pcl_msgs.msg
import PointIndices
10 out_msg = ClusterPointIndices()
11 out_msg.header = msg.header
12 for _
in range(len(msg.polygons)):
13 indices = PointIndices()
14 out_msg.cluster_indices.append(indices)
18 if __name__ ==
'__main__':
19 rospy.init_node(
'sample_cluster_indices_publisher_from_polygons')
20 pub = rospy.Publisher(
'~output', ClusterPointIndices, queue_size=1)
21 sub = rospy.Subscriber(
'~input', PolygonArray, cb, queue_size=1)