def send_status(self):
""" Run our code """
next_status_send = rospy.get_rostime().to_sec()
next_picture_send = rospy.get_rostime().to_sec()
while True:
rospy.sleep(0.1)
if not self.zarj_comm.connected:
continue
now = rospy.get_rostime().to_sec()
if now >= next_status_send:
next_status_send = now + self.STATUS_INTERVAL
zmsg = ZarjStatus(self.task, self.checkpoint, self.elapsed_time, now, self.score, self.harness)
self.zarj_comm.push_message(zmsg)
if self.picture_interval > 0.01 and now >= next_picture_send:
next_picture_send = now + self.picture_interval
self.send_left_camera()
if self.task >= 3:
self.send_lidar(True)
评论列表
文章目录