Add MjSpec.encode method.
PiperOrigin-RevId: 907177387 Change-Id: I65800298798037c4a0c0cd79ec86706be67db51e
This commit is contained in:
committed by
Copybara-Service
parent
ace90c00b9
commit
d92fe0810c
@@ -547,6 +547,12 @@ Compiled ``MjSpec`` objects can be saved to XML string with the ``to_xml()`` met
|
||||
</worldbody>
|
||||
</mujoco>
|
||||
|
||||
Alternatively, the spec can be saved directly to a file using ``encode()``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
spec.encode('model.xml', model)
|
||||
|
||||
Attachment
|
||||
----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user