forked from isaac-sim/IsaacGymEnvs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (56 loc) · 2.21 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
"""Installation script for the 'isaacgymenvs' python package."""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from setuptools import setup, find_packages
import os
root_dir = os.path.dirname(os.path.realpath(__file__))
# Minimum dependencies required prior to installation
INSTALL_REQUIRES = [
# RL
"gym==0.24.1",
"torch",
"omegaconf",
"termcolor",
"hydra-core>=1.1",
"rl-games==1.5.2",
"pyvirtualdisplay",
"opencv-python"
]
# Build extension to create Cython interface to OpenVR and SGCore and SGConnect required for teleoperation
# Find libraries
openvr_lib_dir = os.path.expanduser("~/.steam/steam/steamapps/common/SteamVR/bin/linux64")
sgcore_lib_dir = os.path.abspath("./isaacgymenvs/tasks/dexterity/demo/contrib/SenseGlove-API/Core/SGCoreCpp/lib/linux/Release")
sgconnect_lib_dir = os.path.abspath("./isaacgymenvs/tasks/dexterity/demo/contrib/SenseGlove-API/Core/SGConnect/lib/linux/Release")
# If OpenVR is found: install with teleoperation functionality
if os.path.isdir(openvr_lib_dir):
from Cython.Build import cythonize
from distutils.core import Extension
EXTENSIONS = cythonize(
[Extension(
"dexterityvr",
["./isaacgymenvs/tasks/dexterity/demo/src/dexterityvr.pyx"],
libraries=["openvr_api", "SGCoreCpp", "SGConnect", "GL", "GLEW", "glut"],
library_dirs=[openvr_lib_dir, sgcore_lib_dir, sgconnect_lib_dir],
runtime_library_dirs=[openvr_lib_dir, sgcore_lib_dir, sgconnect_lib_dir],
)])
else:
EXTENSIONS = []
import warnings
warnings.warn("Path to OpenVR not found. Installing dexterity without teleoperation functionality.")
# Installation operation
setup(
name="isaacgymenvs",
author="NVIDIA",
version="1.3.2",
description="Benchmark environments for high-speed robot learning in NVIDIA IsaacGym.",
keywords=["robotics", "rl"],
include_package_data=True,
python_requires=">=3.6.*",
install_requires=INSTALL_REQUIRES,
packages=find_packages("."),
classifiers=["Natural Language :: English", "Programming Language :: Python :: 3.7, 3.8"],
zip_safe=False,
ext_modules=EXTENSIONS,
)
# EOF