File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import os
22
3+ PROJECT_PATH = os .path .abspath (os .path .join (os .path .dirname (__file__ )))
4+
5+
36# Global URDF path pointing to robot and supports URDFs
47PKL_PATH = os .path .abspath (os .path .join (os .path .dirname (__file__ ), "pkl" ))
58MESHES_PATH = os .path .abspath (os .path .join (os .path .dirname (__file__ ), "meshes" ))
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2+ from pybullet_tree_sim import PROJECT_PATH
3+
24import os
35import requests
46from tqdm import tqdm
57import zipfile
68
79
8- _here = os .path .abspath (__file__ )
9- lib_path = os .path .dirname (os .path .dirname (_here ))
10- meshes_path = os .path .join (lib_path , "meshes" )
10+ proj_src_path = os .path .dirname (os .path .dirname (os .path .dirname (os .path .dirname (os .path .dirname (PROJECT_PATH )))))
11+ meshes_path = os .path .join (proj_src_path , "pybullet_tree_sim" , "meshes" )
1112
1213
1314def get_filename_from_url (url : str ) -> str :
@@ -25,7 +26,7 @@ def is_download_needed(target_file_path: str) -> bool:
2526 if not os .path .isfile (os .path .join (meshes_path , "pybullet-tree-sim-meshes.zip" )): # TODO: pass name into func
2627 return True
2728 else :
28- print (f"File { os .path .join (meshes_path , " pybullet-tree-sim-meshes.zip" )} already exists" )
29+ print (f"File { os .path .join (meshes_path , ' pybullet-tree-sim-meshes.zip' )} already exists" )
2930 return False
3031 else :
3132 print (f"Path { os .path .join (meshes_path , 'trees' )} already exists." )
You can’t perform that action at this time.
0 commit comments