diff --git a/mujoco_py/mjcore.py b/mujoco_py/mjcore.py index e2256286..4b62b21a 100644 --- a/mujoco_py/mjcore.py +++ b/mujoco_py/mjcore.py @@ -137,6 +137,18 @@ def numeric_names(self): return [ctypes.string_at(start_addr + int(inc)) for inc in self.name_numericadr.flatten()] + @property + def actuator_names(self): + start_addr = ctypes.addressof(self.names.contents) + return [ctypes.string_at(start_addr + int(inc)) + for inc in self.name_actuatoradr.flatten()] + + @property + def camera_names(self): + start_addr = ctypes.addressof(self.names.contents) + return [ctypes.string_at(start_addr + int(inc)) + for inc in self.name_camadr.flatten()] + class MjData(MjDataWrapper):