Update run_sim.py
Browse files- run_sim.py +2 -14
run_sim.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
#!/usr/bin/env python3
|
| 2 |
-
"""Standalone MuJoCo simulator for Unitree G1"""
|
| 3 |
import sys
|
| 4 |
from pathlib import Path
|
| 5 |
|
|
@@ -10,11 +9,7 @@ import yaml
|
|
| 10 |
from sim.simulator_factory import SimulatorFactory, init_channel
|
| 11 |
|
| 12 |
def main(n_envs=1, use_async_envs: bool = False,
|
| 13 |
-
publish_images=True, camera_port=
|
| 14 |
-
# Use default values
|
| 15 |
-
publish_images = True
|
| 16 |
-
camera_port = 5554
|
| 17 |
-
cameras = None
|
| 18 |
|
| 19 |
# Load config
|
| 20 |
config_path = Path(__file__).parent / "config.yaml"
|
|
@@ -23,14 +18,7 @@ def main(n_envs=1, use_async_envs: bool = False,
|
|
| 23 |
|
| 24 |
# Override config with default values
|
| 25 |
enable_offscreen = publish_images or config.get("ENABLE_OFFSCREEN", False)
|
| 26 |
-
|
| 27 |
-
print("="*60)
|
| 28 |
-
print("🤖 Starting Unitree G1 MuJoCo Simulator")
|
| 29 |
-
print("="*60)
|
| 30 |
-
print(f"📁 Scene: {config['ROBOT_SCENE']}")
|
| 31 |
-
print(f"⏱️ Timestep: {config['SIMULATE_DT']}s ({int(1/config['SIMULATE_DT'])} Hz)")
|
| 32 |
-
print(f"👁️ Visualization: {'ON' if config.get('ENABLE_ONSCREEN', True) else 'OFF'}")
|
| 33 |
-
|
| 34 |
# Configure cameras if requested
|
| 35 |
camera_configs = {}
|
| 36 |
if enable_offscreen:
|
|
|
|
| 1 |
#!/usr/bin/env python3
|
|
|
|
| 2 |
import sys
|
| 3 |
from pathlib import Path
|
| 4 |
|
|
|
|
| 9 |
from sim.simulator_factory import SimulatorFactory, init_channel
|
| 10 |
|
| 11 |
def main(n_envs=1, use_async_envs: bool = False,
|
| 12 |
+
publish_images=True, camera_port=5555, cameras=None, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Load config
|
| 15 |
config_path = Path(__file__).parent / "config.yaml"
|
|
|
|
| 18 |
|
| 19 |
# Override config with default values
|
| 20 |
enable_offscreen = publish_images or config.get("ENABLE_OFFSCREEN", False)
|
| 21 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
# Configure cameras if requested
|
| 23 |
camera_configs = {}
|
| 24 |
if enable_offscreen:
|