static.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 
3 import roslib; roslib.load_manifest('people_velocity_tracker')
4 import rospy
5 import sys
6 from people_msgs.msg import Person, People
7 
8 
9 class VelocityTracker(object):
10  def __init__(self):
11  self.ppub = rospy.Publisher('/people', People, queue_size=10)
12 
13  def spin(self):
14  rate = rospy.Rate(10)
15  while not rospy.is_shutdown():
16  pv = Person()
17  pl = People()
18  pl.header.stamp = rospy.Time.now()
19  pl.header.frame_id = '/base_link'
20  pv.position.x = float(sys.argv[1])
21  pv.position.y = float(sys.argv[2])
22  pv.position.z = .5
23  pv.velocity.x = float(sys.argv[3])
24  pv.velocity.y = float(sys.argv[4])
25  pv.name = 'asdf'
26  pv.reliability = .90
27  pl.people.append(pv)
28 
29  self.ppub.publish(pl)
30  rate.sleep()
31 
32 rospy.init_node("people_velocity_tracker")
34 vt.spin()
def spin(self)
Definition: static.py:13
def __init__(self)
Definition: static.py:10


people_velocity_tracker
Author(s): David V. Lu!!
autogenerated on Fri Jun 7 2019 22:07:54