static.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 
00003 import roslib; roslib.load_manifest('people_velocity_tracker')
00004 import rospy
00005 import sys
00006 from people_msgs.msg import Person, People
00007 
00008 
00009 class VelocityTracker(object):
00010     def __init__(self):
00011         self.ppub = rospy.Publisher('/people', People, queue_size=10)
00012 
00013     def spin(self):
00014         rate = rospy.Rate(10)
00015         while not rospy.is_shutdown():
00016             pv = Person()
00017             pl = People()
00018             pl.header.stamp = rospy.Time.now()
00019             pl.header.frame_id = '/base_link'
00020             pv.position.x = float(sys.argv[1])
00021             pv.position.y = float(sys.argv[2])
00022             pv.position.z = .5
00023             pv.velocity.x = float(sys.argv[3])
00024             pv.velocity.y = float(sys.argv[4])
00025             pv.name = 'asdf'
00026             pv.reliability = .90
00027             pl.people.append(pv)
00028 
00029             self.ppub.publish(pl)
00030             rate.sleep()
00031 
00032 rospy.init_node("people_velocity_tracker")
00033 vt = VelocityTracker()
00034 vt.spin()


people_velocity_tracker
Author(s): David V. Lu!!
autogenerated on Thu Apr 13 2017 02:41:54