parameters: (prediction_channel, rate)
docstring: publisher
docstring_summary: publisher
docstring_tokens: publisher
function: def prediction_publisher(prediction_channel, rate):
      """publisher"""
      cyber.init()
      node = cyber.Node("prediction")
      writer = node.create_writer(prediction_channel, PredictionObstacles)
      sleep_time = 1.0 / rate
      seq_num = 1
      while not cyber.is_shutdown():
          prediction = PredictionObstacles()
          prediction.header.sequence_num = seq_num
          prediction.header.timestamp_sec = cyber_time.Time.now().to_sec()
          prediction.header.module_name = "prediction"
          print(str(prediction))
          writer.write(prediction)
          seq_num += 1
          time.sleep(sleep_time)
function_tokens: def prediction_publisher ( prediction_channel , rate ) : cyber . init ( ) node = cyber . Node ( "prediction" ) writer = node . create_writer ( prediction_channel , PredictionObstacles ) sleep_time = 1.0 / rate seq_num = 1 while not cyber . is_shutdown ( ) : prediction = PredictionObstacles ( ) prediction . header . sequence_num = seq_num prediction . header . timestamp_sec = cyber_time . Time . now ( ) . to_sec ( ) prediction . header . module_name = "prediction" print ( str ( prediction ) ) writer . write ( prediction ) seq_num += 1 time . sleep ( sleep_time )