parameters: (self, batch)
docstring: ingest_in_objects_queue: 
              Converts a list of batched objects from SDK get_objects_batch() to a sorted list of sl.Objects
              Use this function to fill a deque of sl.Objects that can be considered and used as a stream of objects with a delay
          
          Parameters:
              batch (list[sl.ObjectsBatch]): list of sl.ObjectsBatch objects obtained from calling get_objects_batch
docstring_summary: ingest_in_objects_queue: 
              Converts a list of batched objects from SDK get_objects_batch() to a sorted list of sl.Objects
              Use this function to fill a deque of sl.Objects that can be considered and used as a stream of objects with a delay
          
          Parameters:
              batch (list[sl.ObjectsBatch]): list of sl.ObjectsBatch objects obtained from calling get_objects_batch
docstring_tokens: ingest_in_objects_queue : Converts a list of batched objects from SDK get_objects_batch () to a sorted list of sl . Objects Use this function to fill a deque of sl . Objects that can be considered and used as a stream of objects with a delay Parameters : batch ( list [ sl . ObjectsBatch ] ) : list of sl . ObjectsBatch objects obtained from calling get_objects_batch
function: def ingest_in_objects_queue(self, batch):
          '''
          ingest_in_objects_queue: 
              Converts a list of batched objects from SDK get_objects_batch() to a sorted list of sl.Objects
              Use this function to fill a deque of sl.Objects that can be considered and used as a stream of objects with a delay
          
          Parameters:
              batch (list[sl.ObjectsBatch]): list of sl.ObjectsBatch objects obtained from calling get_objects_batch
          '''
          # If the list is empty, do nothing
          if not batch:
              return
  
          # Add objects in dict with timestamp as key
          list_of_new_objects = {}
          for current_traj in batch:
              # Impossible but still better to check
              if len(current_traj.timestamps) != len(current_traj.positions):
                  continue
              # For each sample, construct an ObjectData and put it in the corresponding sl.Objects
              for i in range(len(current_traj.timestamps)):
                  ts = current_traj.timestamps[i]
                  new_object_data = sl.ObjectData()
                  new_object_data.id = current_traj.id
                  new_object_data.tracking_state = current_traj.tracking_state
                  new_object_data.position = current_traj.positions[i]
                  new_object_data.label = current_traj.label
                  new_object_data.sublabel = current_traj.sublabel
                  new_object_data.bounding_box_2d = current_traj.bounding_boxes_2d[i]
                  new_object_data.bounding_box = current_traj.bounding_boxes[i]
  
                  # Check if a detected object with the current timestamp already exists in the map
                  if (ts.get_milliseconds() in list_of_new_objects.keys()):
                      # Append new_object_data to the object_list
                      list_of_new_objects[ts.get_milliseconds()].object_list = list_of_new_objects[ts.get_milliseconds()].object_list + [new_object_data]
                  else:
                      current_obj = sl.Objects()
                      current_obj.timestamp = ts.data_ns      # sl.Objects.timestamp can be set with time in nanoseconds 
                      current_obj.is_new = True
                      current_obj.is_tracked = True 
                      # Append new_object_data to the object_list
                      current_obj.object_list = current_obj.object_list + [new_object_data]
                      list_of_new_objects[ts.get_milliseconds()] = current_obj
          
          # Ingest in Queue of objects that will be emptied by the main loop
          # Since dicts are sorted by key, we are sure that timestamps are continous.
          for value in list_of_new_objects.values():
              self.objects_tracked_queue.append(value)
function_tokens: def ingest_in_objects_queue ( self , batch ) : # If the list is empty, do nothing if not batch : return # Add objects in dict with timestamp as key list_of_new_objects = { } for current_traj in batch : # Impossible but still better to check if len ( current_traj . timestamps ) != len ( current_traj . positions ) : continue # For each sample, construct an ObjectData and put it in the corresponding sl.Objects for i in range ( len ( current_traj . timestamps ) ) : ts = current_traj . timestamps [ i ] new_object_data = sl . ObjectData ( ) new_object_data . id = current_traj . id new_object_data . tracking_state = current_traj . tracking_state new_object_data . position = current_traj . positions [ i ] new_object_data . label = current_traj . label new_object_data . sublabel = current_traj . sublabel new_object_data . bounding_box_2d = current_traj . bounding_boxes_2d [ i ] new_object_data . bounding_box = current_traj . bounding_boxes [ i ] # Check if a detected object with the current timestamp already exists in the map if ( ts . get_milliseconds ( ) in list_of_new_objects . keys ( ) ) : # Append new_object_data to the object_list list_of_new_objects [ ts . get_milliseconds ( ) ] . object_list = list_of_new_objects [ ts . get_milliseconds ( ) ] . object_list + [ new_object_data ] else : current_obj = sl . Objects ( ) current_obj . timestamp = ts . data_ns # sl.Objects.timestamp can be set with time in nanoseconds  current_obj . is_new = True current_obj . is_tracked = True # Append new_object_data to the object_list current_obj . object_list = current_obj . object_list + [ new_object_data ] list_of_new_objects [ ts . get_milliseconds ( ) ] = current_obj # Ingest in Queue of objects that will be emptied by the main loop # Since dicts are sorted by key, we are sure that timestamps are continous. for value in list_of_new_objects . values ( ) : self . objects_tracked_queue . append ( value )