code: def __init__(self, parent_actor, display_dimensions):
      self.surface = None
      self._parent = parent_actor
      self.current_frame = None
      bp_library = self._parent.get_world().get_blueprint_library()
      bp = bp_library.find("sensor.camera.rgb")
      bp.set_attribute("image_size_x", str(display_dimensions[0]))
      bp.set_attribute("image_size_y", str(display_dimensions[1]))
      self.sensor = self._parent.get_world().spawn_actor(
          bp,
          carla.Transform(
              carla.Location(x=-5.5, z=2.5), carla.Rotation(pitch=8.0)
          ),
          attach_to=self._parent,
          attachment_type=carla.AttachmentType.SpringArmGhost,
      )
  
      # We need to pass the lambda a weak reference to self to avoid
      # circular reference.
      weak_self = weakref.ref(self)
      self.sensor.listen(
          lambda image: Camera._parse_image(weak_self, image)
      )
  
imports: from __future__ import print_function
  import glob
  import os
  import sys
  import signal
  import carla
  from carla import ColorConverter
  import argparse
  import logging
  import math
  import random
  import weakref
  from rss_sensor import RssSensor
  from rss_visualization import RssUnstructuredSceneVisualizer, RssBoundingBoxVisualizer, RssStateVisualizer
label_desc: Use image node_id 1 to create a new Camera object from inherited base classes: object with example: obj = Camera(parent_actor, display_dimensions)