Go to the documentation of this file.00001
00002
00003
00004
00005 import rospy
00006 from rail_object_detection_msgs.msg import Detections
00007
00008 def detections_callback(data):
00009 rospy.loginfo("*****************New Message:*********************")
00010 rospy.loginfo(
00011 "Frame@Timestamp: %s@%s" % (data.header.frame_id, data.header.stamp,)
00012 )
00013 rospy.loginfo("Objects: %s" % ",".join([x.label for x in data.objects]))
00014
00015 def main():
00016 rospy.init_node('test_detections_topic')
00017 rospy.Subscriber('/darknet_node/detections', Detections, detections_callback)
00018 rospy.spin()
00019
00020 if __name__ == '__main__':
00021 main()