tracking.py
Go to the documentation of this file.
00001 
00002 
00003 #!/usr/bin/env python
00004 
00005 """Code developed by Stephon Mikell, Jr. It is intergrated with follow.py."""
00006 
00007 import rospy
00008 import tf
00009 from std_msgs.msg import Bool
00010 
00011 def tracker():
00012 #       """Checks to see if what the robot detects is a person or not, then if it is
00013 #       it will publish True to follow.py, else it will publish False."""
00014     rospy.init_node('tracking')
00015     pub = rospy.Publisher('tracking', Bool, queue_size=10)
00016     while not rospy.is_shutdown():
00017         #t = tf.Transformer(True, rospy.Duration(10.0))
00018         t = tf.TransformListener()
00019         if t.frameExists('openni_depth_frame'):
00020             track = True
00021         else:
00022             track = False
00023         rospy.loginfo("list: %s", t.getFrameStrings())
00024         pub.publish(track)
00025         rospy.sleep(1.0)
00026 
00027 if __name__ == '__main__':
00028         tracker()
00029 


gapter
Author(s):
autogenerated on Thu Jun 6 2019 22:05:13