File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
3
+ PROJECT_PATH = os .path .abspath (os .path .join (os .path .dirname (__file__ )))
4
+
5
+
3
6
# Global URDF path pointing to robot and supports URDFs
4
7
PKL_PATH = os .path .abspath (os .path .join (os .path .dirname (__file__ ), "pkl" ))
5
8
MESHES_PATH = os .path .abspath (os .path .join (os .path .dirname (__file__ ), "meshes" ))
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python3
2
+ from pybullet_tree_sim import PROJECT_PATH
3
+
2
4
import os
3
5
import requests
4
6
from tqdm import tqdm
5
7
import zipfile
6
8
7
9
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" )
11
12
12
13
13
14
def get_filename_from_url (url : str ) -> str :
@@ -25,7 +26,7 @@ def is_download_needed(target_file_path: str) -> bool:
25
26
if not os .path .isfile (os .path .join (meshes_path , "pybullet-tree-sim-meshes.zip" )): # TODO: pass name into func
26
27
return True
27
28
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" )
29
30
return False
30
31
else :
31
32
print (f"Path { os .path .join (meshes_path , 'trees' )} already exists." )
You can’t perform that action at this time.
0 commit comments