parameters: (self, transform)
docstring: Spawns a new actor.
  
          Warning: When the maximum number of simulator vehicles being tracked at the same time is
          reached, no new vehicles are spawned.
docstring_summary: Spawns a new actor.
docstring_tokens: Spawns a new actor .
function: def spawn_actor(self, transform):
          """
          Spawns a new actor.
  
          Warning: When the maximum number of simulator vehicles being tracked at the same time is
          reached, no new vehicles are spawned.
          """
          # Checks number of simulator vehicles currently being tracked.
          if (len(self._simulator_vehicles) < self._max_simulator_vehicles):
              actor_id = self._get_next_actor_id()
              self._simulator_vehicles[actor_id] = Simulator_Veh_Data(
                  transform.location.x, transform.location.y, transform.location.z,
                  math.radians(transform.rotation.yaw), math.radians(transform.rotation.pitch), 0.0,
                  False, 0, 0)
              return actor_id
          else:
              logging.warning(
                  'Maximum number of simulator vehicles reached. No vehicle will be spawned.')
              return constants.INVALID_ACTOR_ID
function_tokens: def spawn_actor ( self , transform ) : # Checks number of simulator vehicles currently being tracked. if ( len ( self . _simulator_vehicles ) < self . _max_simulator_vehicles ) : actor_id = self . _get_next_actor_id ( ) self . _simulator_vehicles [ actor_id ] = Simulator_Veh_Data ( transform . location . x , transform . location . y , transform . location . z , math . radians ( transform . rotation . yaw ) , math . radians ( transform . rotation . pitch ) , 0.0 , False , 0 , 0 ) return actor_id else : logging . warning ( 'Maximum number of simulator vehicles reached. No vehicle will be spawned.' ) return constants . INVALID_ACTOR_ID