File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,18 @@ def get_filename_from_url(url: str) -> str:
1717
1818def  is_download_needed (target_file_path : str ) ->  bool :
1919    if  not  os .path .exists (meshes_path ):
20+         print (f"Creating path { meshes_path }  )
2021        os .mkdir (meshes_path )
2122        return  True 
23+ 
2224    if  not  os .path .exists (os .path .join (meshes_path , "trees" )):
2325        if  not  os .path .isfile (os .path .join (meshes_path , "pybullet-tree-sim-meshes.zip" )):  # TODO: pass name into func 
2426            return  True 
2527        else :
28+             print (f"File { os .path .join (meshes_path , "pybullet-tree-sim-meshes.zip" )}  )
2629            return  False 
2730    else :
31+         print (f"Path { os .path .join (meshes_path , 'trees' )}  )
2832        return  False 
2933
3034
@@ -58,8 +62,13 @@ def download_file(url: str, target_file_path: str) -> bool:
5862
5963
6064def  unzip (zip_file : str ):
65+     print (f"Extracting file { zip_file }  )
6166    with  zipfile .ZipFile (zip_file , "r" ) as  zipper :
6267        zipper .extractall (os .path .dirname (zip_file ))
68+     print (f"Files extracted" )
69+ 
70+     if  not  os .path .exists (meshes_path ):
71+         print (f"Cannot find path { meshes_path }  )
6372    return 
6473
6574
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments