Go to the documentation of this file.00001 import roslib; roslib.load_manifest('normal_descriptor_node')
00002 import sys
00003 import rospy
00004 from sensor_msgs.msg import PointCloud2, Image
00005 from normal_descriptor_node.msg import ndesc, ndesc_pc
00006 import numpy,pylab
00007
00008 class node_select_one_desc:
00009
00010 def __init__(self):
00011 print "init node_select_one_desc"
00012
00013 def listener(self):
00014 rospy.init_node("select_one_desc")
00015 self.sub = rospy.Subscriber("select_one_desc/ndescs_pc", ndesc_pc, self.callback_desc)
00016 self.pub = rospy.Publisher("select_one_desc/one_desc", ndesc)
00017 rospy.spin()
00018
00019 def callback_desc(self, data):
00020
00021 print data.num
00022 self.pub.publish(data.descriptors[1000])
00023
00024
00025
00026
00027
00028
00029 if __name__ == '__main__':
00030 A = node_select_one_desc()
00031 A.listener()
00032