fix: IS 4.1.0 + Blackwell GPU compatibility fixes
- Add scipy Rotation scalar_first monkey-patch for older scipy (<1.11) - Fix SimulationApp import to support both IS 4.x and 5.x - Reuse task object across reset() calls to prevent duplicate prims - Add _scene_initialized guard in set_up_scene() for repeated resets - Cache arena_file_path to survive task_cfg.pop() - Clean up collision groups before re-creating - Switch to PathTracing renderer for clean output on Blackwell GPU Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
launcher.py
35
launcher.py
@@ -5,6 +5,41 @@ from nimbus.utils.utils import init_env
|
||||
|
||||
init_env()
|
||||
|
||||
# Patch scipy.spatial.transform module so that `from_quat` and `as_quat`
|
||||
# accept `scalar_first=` on older scipy (< 1.11).
|
||||
try:
|
||||
from scipy.spatial.transform import Rotation as _R
|
||||
_R.from_quat([1, 0, 0, 0], scalar_first=True)
|
||||
except TypeError:
|
||||
import numpy as _np
|
||||
import scipy.spatial.transform as _sst
|
||||
from scipy.spatial.transform import Rotation as _OrigR
|
||||
|
||||
class Rotation(_OrigR):
|
||||
@classmethod
|
||||
def from_quat(cls, quat, *args, scalar_first=False, **kwargs):
|
||||
quat = _np.asarray(quat, dtype=float)
|
||||
if scalar_first:
|
||||
if quat.ndim == 1:
|
||||
quat = _np.array([quat[1], quat[2], quat[3], quat[0]])
|
||||
else:
|
||||
quat = _np.concatenate([quat[..., 1:], quat[..., :1]], axis=-1)
|
||||
return super().from_quat(quat, *args, **kwargs)
|
||||
|
||||
def as_quat(self, *args, scalar_first=False, **kwargs):
|
||||
q = super().as_quat(*args, **kwargs)
|
||||
if scalar_first:
|
||||
if q.ndim == 1:
|
||||
q = _np.array([q[3], q[0], q[1], q[2]])
|
||||
else:
|
||||
q = _np.concatenate([q[..., 3:], q[..., :3]], axis=-1)
|
||||
return q
|
||||
|
||||
_sst.Rotation = Rotation
|
||||
import sys
|
||||
sys.modules['scipy.spatial.transform._rotation'].Rotation = Rotation
|
||||
sys.modules['scipy.spatial.transform'].Rotation = Rotation
|
||||
|
||||
import argparse
|
||||
|
||||
from nimbus import run_data_engine
|
||||
|
||||
Reference in New Issue
Block a user