Skip to content

Commit

Permalink
fix optional spacemouse import (#186)
Browse files Browse the repository at this point in the history
* Update __init__.py

* Update __init__.py

* Update spacemouse.py
  • Loading branch information
amandlek committed Feb 10, 2021
1 parent f123b78 commit e203530
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion robosuite/devices/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from .device import Device
from .keyboard import Keyboard
from .spacemouse import SpaceMouse
try:
from .spacemouse import SpaceMouse
except ImportError:
print("""Unable to load module hid, required to interface with SpaceMouse.\n
Only Mac OS X is officially supported. Install the additional\n
requirements with `pip install -r requirements-extra.txt`""")
2 changes: 1 addition & 1 deletion robosuite/devices/spacemouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
except ModuleNotFoundError as exc:
raise ImportError("Unable to load module hid, required to interface with SpaceMouse. "
"Only Mac OS X is officially supported. Install the additional "
"requirements with `pip install -r requirements-ik.txt`") from exc
"requirements with `pip install -r requirements-extra.txt`") from exc

from robosuite.utils.transform_utils import rotation_matrix
from robosuite.devices import Device
Expand Down

0 comments on commit e203530

Please sign in to comment.