Skip to content

Commit

Permalink
Merge pull request StanfordVL#910 from StanfordVL/better-install
Browse files Browse the repository at this point in the history
Improved installation via an install script instead of setup.sh and metapackage
  • Loading branch information
cgokmen authored Oct 1, 2024
2 parents e747d28 + a34866a commit 88f091c
Show file tree
Hide file tree
Showing 10 changed files with 517 additions and 258 deletions.
199 changes: 111 additions & 88 deletions docs/getting_started/installation.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion omnigibson/download_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def main():
print(
f"If you want to install data under a different path, please change the DATA_PATH variable in omnigibson/macros.py and rerun omnigibson/download_datasets.py."
)
if click.confirm("Do you want to continue?"):
if click.confirm("Do you want to continue?", default=True):
# Only download if the dataset path doesn't exist
if not dataset_exists:
print("Downloading dataset...")
Expand Down
396 changes: 396 additions & 0 deletions omnigibson/install.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion omnigibson/robots/robot_base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from abc import abstractmethod
from copy import deepcopy

import matplotlib.pyplot as plt
import torch as th

import omnigibson.utils.transform_utils as T
Expand Down Expand Up @@ -416,6 +415,8 @@ def visualize_sensors(self):
print(f"Modalities: {remaining_obs_modalities} cannot be visualized, skipping...")

# Write all the frames to a plot
import matplotlib.pyplot as plt

for sensor_name, sensor_frames in frames.items():
n_sensor_frames = len(sensor_frames)
if n_sensor_frames > 0:
Expand Down
3 changes: 2 additions & 1 deletion omnigibson/scene_graphs/graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import networkx as nx
import torch as th
from matplotlib import pyplot as plt
from PIL import Image

from omnigibson import object_states
Expand Down Expand Up @@ -300,6 +299,8 @@ def _draw_graph():
figwidth = imgwidth / figdpi

# Draw the graph onto the figure.
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(figwidth, figheight), dpi=figdpi)
_draw_graph()
fig.canvas.draw()
Expand Down
1 change: 1 addition & 0 deletions omnigibson/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def _launch_app():
# if we are using the pip installed version, all the ISAAC_PATH etc. env vars are set correctly.
# On the regular omniverse launcher version this should not have any impact.
try:
os.environ["OMNI_KIT_ACCEPT_EULA"] = "YES"
import isaacsim # noqa: F401
except ImportError:
isaacsim = None
Expand Down
6 changes: 2 additions & 4 deletions omnigibson/systems/macro_particle_system.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import os

import matplotlib.pyplot as plt
import cv2
import torch as th
import trimesh

Expand Down Expand Up @@ -212,7 +210,7 @@ def process_particle_object(self):
else:
diffuse_texture = self.particle_object.material.diffuse_texture
color = (
plt.imread(diffuse_texture).mean(dim=(0, 1))
cv2.imread(diffuse_texture).mean()
if diffuse_texture
else self.particle_object.material.diffuse_color_constant
)
Expand Down
92 changes: 0 additions & 92 deletions scripts/setup.bat

This file was deleted.

68 changes: 0 additions & 68 deletions scripts/setup.sh

This file was deleted.

5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@
"rtree~=1.2.0",
"graphviz~=0.20",
"numba>=0.60.0",
"matplotlib>=3.0.0",
],
extras_require={
"isaac": ["isaacsim-for-omnigibson>=4.1.0"],
},
extras_require={},
tests_require=[],
python_requires=">=3",
include_package_data=True,
Expand Down

0 comments on commit 88f091c

Please sign in to comment.