class_docstr: BridgeHelper provides methos to ease the co-simulation between sumo and carla.
class_docstr_tok: ["BridgeHelper","provides","methos","to","ease","the","co-simulation","between","sumo","and","carla","."]
docstr: Returns sumo traffic light state based on carla traffic light state.
docstr_tok: ["Returns","sumo","traffic","light","state","based","on","carla","traffic","light","state","."]
code: def get_sumo_traffic_light_state(carla_tl_state):
      """
      Returns sumo traffic light state based on carla traffic light state.
      """
      if carla_tl_state == carla.TrafficLightState.Red:
          return SumoSignalState.RED
  
      elif carla_tl_state == carla.TrafficLightState.Yellow:
          return SumoSignalState.YELLOW
  
      elif carla_tl_state == carla.TrafficLightState.Green:
          return SumoSignalState.GREEN
  
      else:  # carla.TrafficLightState.Off and carla.TrafficLightState.Unknown
          return SumoSignalState.OFF
  
file_path: carla/Co-Simulation/Sumo/sumo_integration/bridge_helper.py
imports: import json
  import logging
  import math
  import os
  import random
  import carla
  import traci
  from .sumo_simulation import SumoSignalState, SumoVehSignal
label_desc: Use image node_id 10 for calling the BridgeHelper obj's underlying member method code with example usage: obj.get_sumo_traffic_light_state(carla_tl_state) and returns: SumoSignalState, SumoSignalState, SumoSignalState, SumoSignalState