class_docstr: SimulationSynchronization class is responsible for the synchronization of ptv-vissim and carla
  simulations.
class_docstr_tok: ["SimulationSynchronization","class","is","responsible","for","the","synchronization","of","ptv-vissim","and","carla","simulations","."]
code: def __init__(self, vissim_simulation, carla_simulation, args):
      self.args = args
  
      self.vissim = vissim_simulation
      self.carla = carla_simulation
  
      # Mapped actor ids.
      self.vissim2carla_ids = (
          {}
      )  # Contains only actors controlled by vissim.
      self.carla2vissim_ids = (
          {}
      )  # Contains only actors controlled by carla.
  
      BridgeHelper.blueprint_library = (
          self.carla.world.get_blueprint_library()
      )
      dir_path = os.path.dirname(os.path.realpath(__file__))
      with open(os.path.join(dir_path, "data", "vtypes.json")) as f:
          BridgeHelper.vtypes = json.load(f)
  
      # Configuring carla simulation in sync mode.
      settings = self.carla.world.get_settings()
      settings.synchronous_mode = True
      settings.fixed_delta_seconds = args.step_length
      self.carla.world.apply_settings(settings)
  
file_path: carla/Co-Simulation/PTV-Vissim/run_synchronization.py
imports: import argparse
  import json
  import logging
  import time
  import glob
  import os
  import sys
  from vissim_integration.bridge_helper import BridgeHelper
  from vissim_integration.carla_simulation import CarlaSimulation
  from vissim_integration.vissim_simulation import PTVVissimSimulation
  from vissim_integration.constants import INVALID_ACTOR_ID
label_desc: Use image node_id 1 to create a new SimulationSynchronization object from inherited base classes: object with example: obj = SimulationSynchronization(vissim_simulation, carla_simulation, args)