Spaces:
Running
Running
RemiFabre commited on
Commit Β·
431d0b3
1
Parent(s): 5f38209
Add convenience launcher script
Browse files- Theremini/main.py +2 -11
- main.py +6 -0
Theremini/main.py
CHANGED
|
@@ -12,17 +12,8 @@ from reachy_mini.utils import create_head_pose
|
|
| 12 |
from scamp import Session
|
| 13 |
from scipy.spatial.transform import Rotation as R
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
import sys
|
| 18 |
-
from pathlib import Path
|
| 19 |
-
|
| 20 |
-
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
| 21 |
-
from Theremini.config import get_active_instruments
|
| 22 |
-
from Theremini.dashboard import DASHBOARD_PORT, DashboardServer, set_status
|
| 23 |
-
else:
|
| 24 |
-
from .config import get_active_instruments
|
| 25 |
-
from .dashboard import DASHBOARD_PORT, DashboardServer, set_status
|
| 26 |
|
| 27 |
# ββββββββββββββββββ mapping constants βββββββββββββββββββββββββββββββ
|
| 28 |
ROLL_DEG_RANGE = (-60, 60) # head roll span
|
|
|
|
| 12 |
from scamp import Session
|
| 13 |
from scipy.spatial.transform import Rotation as R
|
| 14 |
|
| 15 |
+
from .config import get_active_instruments
|
| 16 |
+
from .dashboard import DASHBOARD_PORT, DashboardServer, set_status
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# ββββββββββββββββββ mapping constants βββββββββββββββββββββββββββββββ
|
| 19 |
ROLL_DEG_RANGE = (-60, 60) # head roll span
|
main.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Convenience launcher so `python main.py` behaves like `python -m Theremini.main`."""
|
| 2 |
+
|
| 3 |
+
from runpy import run_module
|
| 4 |
+
|
| 5 |
+
if __name__ == "__main__":
|
| 6 |
+
run_module("Theremini.main", run_name="__main__")
|