(self)
return assets
Returns a dict containing the binary assets referenced in this model.

    This will contain `{vfs_filename: contents}` pairs. `vfs_filename` will be
    the name of the asset in MuJoCo's Virtual File System, which corresponds to
    the filename given in the XML returned by `to_xml_string()`. `contents` is a
    bytestring.

    This dict can be used together with the result of `to_xml_string()` to
    construct a `mujoco.Physics` instance:

    ```python
    physics = mujoco.Physics.from_xml_string(
        xml_string=mjcf_model.to_xml_string(),
        assets=mjcf_model.get_assets())
    ```
Returns a dict containing the binary assets referenced in this model.
Returns a dict containing the binary assets referenced in this model .
def get_assets(self):
    """Returns a dict containing the binary assets referenced in this model.

    This will contain `{vfs_filename: contents}` pairs. `vfs_filename` will be
    the name of the asset in MuJoCo's Virtual File System, which corresponds to
    the filename given in the XML returned by `to_xml_string()`. `contents` is a
    bytestring.

    This dict can be used together with the result of `to_xml_string()` to
    construct a `mujoco.Physics` instance:

    ```python
    physics = mujoco.Physics.from_xml_string(
        xml_string=mjcf_model.to_xml_string(),
        assets=mjcf_model.get_assets())
    ```
    """
    # Get the assets referenced within this `RootElement`'s namescope.
    assets = {file_obj.to_xml_string(): file_obj.get_contents()
              for file_obj in self.namescope.files
              if file_obj.value}

    # Recursively add assets belonging to attachments.
    for attached_model in self._attachments.values():
      assets.update(attached_model.get_assets())

    return assets
def get_assets ( self ) : # Get the assets referenced within this `RootElement`'s namescope. assets = { file_obj . to_xml_string ( ) : file_obj . get_contents ( ) for file_obj in self . namescope . files if file_obj . value } # Recursively add assets belonging to attachments. for attached_model in self . _attachments . values ( ) : assets . update ( attached_model . get_assets ( ) ) return assets