parameters: (self)
docstring: Spawns actor-camera to be used to render view.
          Sets calibration for client-side boxes rendering.
docstring_summary: Spawns actor-camera to be used to render view.
          Sets calibration for client-side boxes rendering.
docstring_tokens: Spawns actor - camera to be used to render view . Sets calibration for client - side boxes rendering .
function: def setup_camera(self):
          """
          Spawns actor-camera to be used to render view.
          Sets calibration for client-side boxes rendering.
          """
  
          camera_transform = carla.Transform(carla.Location(x=-5.5, z=2.8), carla.Rotation(pitch=-15))
          self.camera = self.world.spawn_actor(self.camera_blueprint(), camera_transform, attach_to=self.car)
          weak_self = weakref.ref(self)
          self.camera.listen(lambda image: weak_self().set_image(weak_self, image))
  
          calibration = np.identity(3)
          calibration[0, 2] = VIEW_WIDTH / 2.0
          calibration[1, 2] = VIEW_HEIGHT / 2.0
          calibration[0, 0] = calibration[1, 1] = VIEW_WIDTH / (2.0 * np.tan(VIEW_FOV * np.pi / 360.0))
          self.camera.calibration = calibration
function_tokens: def setup_camera ( self ) : camera_transform = carla . Transform ( carla . Location ( x = - 5.5 , z = 2.8 ) , carla . Rotation ( pitch = - 15 ) ) self . camera = self . world . spawn_actor ( self . camera_blueprint ( ) , camera_transform , attach_to = self . car ) weak_self = weakref . ref ( self ) self . camera . listen ( lambda image : weak_self ( ) . set_image ( weak_self , image ) ) calibration = np . identity ( 3 ) calibration [ 0 , 2 ] = VIEW_WIDTH / 2.0 calibration [ 1 , 2 ] = VIEW_HEIGHT / 2.0 calibration [ 0 , 0 ] = calibration [ 1 , 1 ] = VIEW_WIDTH / ( 2.0 * np . tan ( VIEW_FOV * np . pi / 360.0 ) ) self . camera . calibration = calibration