Go to the documentation of this file.00001
00002 import rospy
00003
00004 PKG='jsk_pcl_ros'
00005
00006 import imp
00007 try:
00008 imp.find_module(PKG)
00009 except:
00010 import roslib;roslib.load_manifest(PKG)
00011
00012 from sensor_msgs.msg import PointCloud2
00013 from jsk_recognition_msgs.srv import SetPointCloud2
00014
00015 def cloud_cb(cloud):
00016
00017 try:
00018 setCloud = rospy.ServiceProxy('particle_filter_tracker/renew_model', SetPointCloud2)
00019 setCloud(cloud)
00020 rospy.loginfo("Success renew_tracking service");
00021 except rospy.ServiceException, e:
00022 rospy.loginfo("Failed to call renew_tracking service")
00023
00024 if __name__ == "__main__":
00025 rospy.init_node('send_renew_model', anonymous=True)
00026 rospy.wait_for_service('particle_filter_tracker/renew_model')
00027 rospy.Subscriber("selected_pointcloud", PointCloud2, cloud_cb)
00028 rospy.spin()