box_array_to_box.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import rospy
00003 
00004 PKG='jsk_pcl_ros'
00005 
00006 import imp
00007 ## import message_filters
00008 try:
00009     imp.find_module(PKG)
00010 except:
00011     import roslib;roslib.load_manifest(PKG)
00012 
00013 from jsk_recognition_msgs.msg import BoundingBox, BoundingBoxArray
00014 
00015 def boxarray_cb(boxarray):
00016     if (len(boxarray.boxes)==0):
00017         rospy.loginfo("box size 0")
00018         return
00019     BPub.publish(boxarray.boxes[0])
00020 
00021 
00022 if __name__ == "__main__":
00023     rospy.init_node('transform_box', anonymous=True)
00024     BPub = rospy.Publisher('bounding_box', BoundingBox)
00025     rospy.Subscriber("bounding_box_array", BoundingBoxArray, boxarray_cb)
00026     rospy.spin()


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Wed Sep 16 2015 04:36:47