MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / reload_from_xml_path

Method reload_from_xml_path

dm_control/mujoco/engine.py:517–527  ·  view source on GitHub ↗

Reloads the `Physics` instance from a path to an MJCF XML file. After calling this method, the state of the `Physics` instance is the same as a new `Physics` instance created with the `from_xml_path` named constructor. Args: file_path: String containing path to model definiti

(self, file_path)

Source from the content-addressed store, hash-verified

515 self._reload_from_model(new_model)
516
517 def reload_from_xml_path(self, file_path):
518 """Reloads the `Physics` instance from a path to an MJCF XML file.
519
520 After calling this method, the state of the `Physics` instance is the same
521 as a new `Physics` instance created with the `from_xml_path`
522 named constructor.
523
524 Args:
525 file_path: String containing path to model definition file.
526 """
527 self._reload_from_model(wrapper.MjModel.from_xml_path(file_path))
528
529 @property
530 def named(self):

Callers 1

testReloadMethod · 0.80

Calls 2

_reload_from_modelMethod · 0.95
from_xml_pathMethod · 0.45

Tested by 1

testReloadMethod · 0.64