Add MjSpec.encode method.
PiperOrigin-RevId: 907177387 Change-Id: I65800298798037c4a0c0cd79ec86706be67db51e
This commit is contained in:
committed by
Copybara-Service
parent
ace90c00b9
commit
d92fe0810c
@@ -7,6 +7,11 @@ Upcoming version (not yet released)
|
||||
|
||||
- Added island support for the :ref:`PGS solver<soAlgorithms>`.
|
||||
|
||||
Python
|
||||
^^^^^^
|
||||
|
||||
- Added ``MjSpec.encode`` method, wrapping :ref:`mj_encode`.
|
||||
|
||||
Version 3.8.0 (April 24, 2026)
|
||||
------------------------------
|
||||
|
||||
|
||||
@@ -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