parameters: (self, num_objects, test)
return_statement: return selected_objects_filenames
docstring: Randomly choose an object urdf from the random_urdfs directory.
  
      Args:
        num_objects:
          Number of graspable objects.
  
      Returns:
        A list of urdf filenames.
docstring_summary: Randomly choose an object urdf from the random_urdfs directory.
docstring_tokens: Randomly choose an object urdf from the random_urdfs directory .
function: def _get_random_object(self, num_objects, test):
      """Randomly choose an object urdf from the random_urdfs directory.
  
      Args:
        num_objects:
          Number of graspable objects.
  
      Returns:
        A list of urdf filenames.
      """
      if test:
        urdf_pattern = os.path.join(self._urdfRoot, 'random_urdfs/*0/*.urdf')
      else:
        urdf_pattern = os.path.join(self._urdfRoot, 'random_urdfs/*[1-9]/*.urdf')
      found_object_directories = glob.glob(urdf_pattern)
      total_num_objects = len(found_object_directories)
      selected_objects = np.random.choice(np.arange(total_num_objects), num_objects)
      selected_objects_filenames = []
      for object_index in selected_objects:
        selected_objects_filenames += [found_object_directories[object_index]]
      return selected_objects_filenames
function_tokens: def _get_random_object ( self , num_objects , test ) : if test : urdf_pattern = os . path . join ( self . _urdfRoot , 'random_urdfs/*0/*.urdf' ) else : urdf_pattern = os . path . join ( self . _urdfRoot , 'random_urdfs/*[1-9]/*.urdf' ) found_object_directories = glob . glob ( urdf_pattern ) total_num_objects = len ( found_object_directories ) selected_objects = np . random . choice ( np . arange ( total_num_objects ) , num_objects ) selected_objects_filenames = [ ] for object_index in selected_objects : selected_objects_filenames += [ found_object_directories [ object_index ] ] return selected_objects_filenames