Skip to content

Commit 8b6fc84

Browse files
committed
md update
1 parent 943073e commit 8b6fc84

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pybullet_tree_sim/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import 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
47
PKL_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "pkl"))
58
MESHES_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "meshes"))

pybullet_tree_sim/utils/mesh_downloader.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/usr/bin/env python3
2+
from pybullet_tree_sim import PROJECT_PATH
3+
24
import os
35
import requests
46
from tqdm import tqdm
57
import 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

1314
def 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.")

0 commit comments

Comments
 (0)