Allow the viewer handle to return the mjModel/mjData objects from the simulation.

PiperOrigin-RevId: 643982026
Change-Id: Ida5ccb851c46f7352e724798738006be6badad0a
This commit is contained in:
Google DeepMind
2024-06-17 06:11:17 -07:00
committed by Copybara-Service
parent f15b6e5e21
commit c8cc2d51b0
2 changed files with 19 additions and 0 deletions
+14
View File
@@ -94,6 +94,20 @@ class Handle:
def user_scn(self):
return self._user_scn
@property
def m(self):
sim = self._sim()
if sim is not None:
return sim.m
return None
@property
def d(self):
sim = self._sim()
if sim is not None:
return sim.d
return None
def close(self):
sim = self._sim()
if sim is not None: