5 from people_msgs.msg
import People, Person
12 self.
ppub = rospy.Publisher(
'/people', People, queue_size=10)
14 self.person.position.x = x
15 self.person.position.y = y
16 self.person.position.z = 0.5
17 self.person.velocity.x = vx
18 self.person.velocity.y = vy
19 self.person.name =
'static_test_person' 20 self.person.reliability = 0.90
24 while not rospy.is_shutdown():
26 pl.header.stamp = rospy.Time.now()
27 pl.header.frame_id =
'/base_link' 28 pl.people.append(self.
person)
33 if __name__ ==
'__main__':
34 rospy.init_node(
'people_velocity_tracker')
35 parser = argparse.ArgumentParser()
36 parser.add_argument(
'x', type=float, help=
'x coordinate')
37 parser.add_argument(
'y', type=float, help=
'y coordinate')
38 parser.add_argument(
'vx', type=float, nargs=
'?', default=0.0, help=
'x velocity')
39 parser.add_argument(
'vy', type=float, nargs=
'?', default=0.0, help=
'y velocity')
40 args = parser.parse_args()
def __init__(self, x, y, vx, vy)