parameters: (
      observations: List[np.ndarray],
      primary_obs: str,
      primary_obs_type: str,
      video_file: str,
      fps: int = 60,
      open_vid: bool = True,
      video_dims: Optional[Tuple[int]] = None,
      overlay_settings: Optional[List[Dict[str, Any]]] = None,
      depth_clip: Optional[float] = 10.0,
      observation_to_image=observation_to_image,
  )
docstring: Build a video from a passed observations array, with some images optionally overlayed.
      :param observations: List of observations from which the video should be constructed.
      :param primary_obs: Sensor name in observations to be used for primary video images.
      :param primary_obs_type: Primary image observation type ("color", "depth", "semantic" supported).
      :param video_file: File to save resultant .mp4 video.
      :param fps: Desired video frames per second.
      :param open_vid: Whether or not to open video upon creation.
      :param video_dims: Height by Width of video if different than observation dimensions. Applied after overlays.
      :param overlay_settings: List of settings Dicts, optional.
      :param depth_clip: Defines default depth clip normalization for all depth images.
      :param observation_to_image: Allows overriding the observation_to_image function
      With **overlay_settings** dicts specifying per-entry: \n
          "type": observation type ("color", "depth", "semantic" supported)\n
          "dims": overlay dimensions (Tuple : (width, height))\n
          "pos": overlay position (top left) (Tuple : (width, height))\n
          "border": overlay image border thickness (int)\n
          "border_color": overlay image border color [0-255] (3d: array, list, or tuple). Defaults to gray [150]\n
          "obs": observation key (string)\n
docstring_summary: Build a video from a passed observations array, with some images optionally overlayed.
      :param observations: List of observations from which the video should be constructed.
      :param primary_obs: Sensor name in observations to be used for primary video images.
      :param primary_obs_type: Primary image observation type ("color", "depth", "semantic" supported).
      :param video_file: File to save resultant .mp4 video.
      :param fps: Desired video frames per second.
      :param open_vid: Whether or not to open video upon creation.
      :param video_dims: Height by Width of video if different than observation dimensions. Applied after overlays.
      :param overlay_settings: List of settings Dicts, optional.
      :param depth_clip: Defines default depth clip normalization for all depth images.
      :param observation_to_image: Allows overriding the observation_to_image function
      With **overlay_settings** dicts specifying per-entry: \n
          "type": observation type ("color", "depth", "semantic" supported)\n
          "dims": overlay dimensions (Tuple : (width, height))\n
          "pos": overlay position (top left) (Tuple : (width, height))\n
          "border": overlay image border thickness (int)\n
          "border_color": overlay image border color [0-255] (3d: array, list, or tuple). Defaults to gray [150]\n
          "obs": observation key (string)\n
docstring_tokens: Build a video from a passed observations array with some images optionally overlayed . : param observations : List of observations from which the video should be constructed . : param primary_obs : Sensor name in observations to be used for primary video images . : param primary_obs_type : Primary image observation type ( color depth semantic supported ) . : param video_file : File to save resultant . mp4 video . : param fps : Desired video frames per second . : param open_vid : Whether or not to open video upon creation . : param video_dims : Height by Width of video if different than observation dimensions . Applied after overlays . : param overlay_settings : List of settings Dicts optional . : param depth_clip : Defines default depth clip normalization for all depth images . : param observation_to_image : Allows overriding the observation_to_image function With ** overlay_settings ** dicts specifying per - entry : \ n type : observation type ( color depth semantic supported ) \ n dims : overlay dimensions ( Tuple : ( width height )) \ n pos : overlay position ( top left ) ( Tuple : ( width height )) \ n border : overlay image border thickness ( int ) \ n border_color : overlay image border color [ 0 - 255 ] ( 3d : array list or tuple ) . Defaults to gray [ 150 ] \ n obs : observation key ( string ) \ n
function: def make_video(
      observations: List[np.ndarray],
      primary_obs: str,
      primary_obs_type: str,
      video_file: str,
      fps: int = 60,
      open_vid: bool = True,
      video_dims: Optional[Tuple[int]] = None,
      overlay_settings: Optional[List[Dict[str, Any]]] = None,
      depth_clip: Optional[float] = 10.0,
      observation_to_image=observation_to_image,
  ):
      """Build a video from a passed observations array, with some images optionally overlayed.
      :param observations: List of observations from which the video should be constructed.
      :param primary_obs: Sensor name in observations to be used for primary video images.
      :param primary_obs_type: Primary image observation type ("color", "depth", "semantic" supported).
      :param video_file: File to save resultant .mp4 video.
      :param fps: Desired video frames per second.
      :param open_vid: Whether or not to open video upon creation.
      :param video_dims: Height by Width of video if different than observation dimensions. Applied after overlays.
      :param overlay_settings: List of settings Dicts, optional.
      :param depth_clip: Defines default depth clip normalization for all depth images.
      :param observation_to_image: Allows overriding the observation_to_image function
      With **overlay_settings** dicts specifying per-entry: \n
          "type": observation type ("color", "depth", "semantic" supported)\n
          "dims": overlay dimensions (Tuple : (width, height))\n
          "pos": overlay position (top left) (Tuple : (width, height))\n
          "border": overlay image border thickness (int)\n
          "border_color": overlay image border color [0-255] (3d: array, list, or tuple). Defaults to gray [150]\n
          "obs": observation key (string)\n
      """
      if not video_file.endswith(".mp4"):
          video_file = video_file + ".mp4"
      print("Encoding the video: %s " % video_file)
      writer = get_fast_video_writer(video_file, fps=fps)
      observation_to_image = partial(observation_to_image, depth_clip=depth_clip)
  
      for ob in observations:
          # primary image processing
          image_frame = make_video_frame(
              ob,
              primary_obs,
              primary_obs_type,
              video_dims,
              overlay_settings=overlay_settings,
              observation_to_image=observation_to_image,
          )
  
          # write the desired image to video
          writer.append_data(np.array(image_frame))
  
      writer.close()
      if open_vid:
          display_video(video_file)
function_tokens: def make_video ( observations : List [ np . ndarray ] , primary_obs : str , primary_obs_type : str , video_file : str , fps : int = 60 , open_vid : bool = True , video_dims : Optional [ Tuple [ int ] ] = None , overlay_settings : Optional [ List [ Dict [ str , Any ] ] ] = None , depth_clip : Optional [ float ] = 10.0 , observation_to_image = observation_to_image , ) : if not video_file . endswith ( ".mp4" ) : video_file = video_file + ".mp4" print ( "Encoding the video: %s " % video_file ) writer = get_fast_video_writer ( video_file , fps = fps ) observation_to_image = partial ( observation_to_image , depth_clip = depth_clip ) for ob in observations : # primary image processing image_frame = make_video_frame ( ob , primary_obs , primary_obs_type , video_dims , overlay_settings = overlay_settings , observation_to_image = observation_to_image , ) # write the desired image to video writer . append_data ( np . array ( image_frame ) ) writer . close ( ) if open_vid : display_video ( video_file )