code: def __init__(
      self,
      parent_actor,
      world,
      unstructured_scene_visualizer,
      bounding_box_visualizer,
      state_visualizer,
      routing_targets=None,
  ):
      self.sensor = None
      self.unstructured_scene_visualizer = unstructured_scene_visualizer
      self.bounding_box_visualizer = bounding_box_visualizer
      self._parent = parent_actor
      self.timestamp = None
      self.response_valid = False
      self.proper_response = None
      self.rss_state_snapshot = None
      self.situation_snapshot = None
      self.world_model = None
      self.individual_rss_states = []
      self._allowed_heading_ranges = []
      self.ego_dynamics_on_route = None
      self.current_vehicle_parameters = self.get_default_parameters()
      self.route = None
      self.debug_visualizer = RssDebugVisualizer(parent_actor, world)
      self.state_visualizer = state_visualizer
      self.change_to_unstructured_position_map = dict()
  
      # get max steering angle
      physics_control = parent_actor.get_physics_control()
      self._max_steer_angle = 0.0
      for wheel in physics_control.wheels:
          if wheel.max_steer_angle > self._max_steer_angle:
              self._max_steer_angle = wheel.max_steer_angle
      self._max_steer_angle = math.radians(self._max_steer_angle)
  
      world = self._parent.get_world()
      bp = world.get_blueprint_library().find("sensor.other.rss")
      self.sensor = world.spawn_actor(
          bp,
          carla.Transform(carla.Location(x=0.0, z=0.0)),
          attach_to=self._parent,
      )
      # We need to pass the lambda a weak reference to self to avoid circular
      # reference.
  
      def check_rss_class(clazz):
          return (
              inspect.isclass(clazz) and "RssSensor" in clazz.__name__
          )
  
      if not inspect.getmembers(carla, check_rss_class):
          raise RuntimeError(
              'CARLA PythonAPI not compiled in RSS variant, please "make PythonAPI.rss"'
          )
  
      self.log_level = carla.RssLogLevel.warn
      self.map_log_level = carla.RssLogLevel.warn
  
      self.set_default_parameters()
  
      self.sensor.register_actor_constellation_callback(
          self._on_actor_constellation_request
      )
  
      self.sensor.listen(self._on_rss_response)
      self.sensor.set_log_level(self.log_level)
      self.sensor.set_map_log_level(self.map_log_level)
  
      # only relevant if actor constellation callback is not registered
      # self.sensor.ego_vehicle_dynamics = self.current_vehicle_parameters
  
      self.sensor.road_boundaries_mode = carla.RssRoadBoundariesMode.Off
  
      self.sensor.reset_routing_targets()
      if routing_targets:
          for target in routing_targets:
              self.sensor.append_routing_target(target)
  
imports: import glob
  import os
  import sys
  import inspect
  import carla
  from carla import ad
  import math
  from rss_visualization import RssDebugVisualizer
label_desc: Use image node_id 1 to create a new RssSensor object from inherited base classes: object with example: obj = RssSensor(parent_actor, world, unstructured_scene_visualizer, bounding_box_visualizer, state_visualizer, routing_targets)