Finalize built-in mesh example model and documentation
PiperOrigin-RevId: 791227350 Change-Id: Ibdcdb8a4ee5b3f78c9ae93e1db2a9a2f9d55a80c
This commit is contained in:
committed by
Copybara-Service
parent
2f4375dda3
commit
fde479736e
@@ -590,6 +590,8 @@ attaching. However, it is possible to override the default behavior by setting `
|
||||
worldframe_in_site = parent.attach(child, site=site, prefix='child-')
|
||||
worldframe_in_frame = parent.attach(child, frame=frame, prefix='child-')
|
||||
|
||||
.. _PyEditConvenience:
|
||||
|
||||
Convenience methods
|
||||
-------------------
|
||||
|
||||
@@ -641,6 +643,17 @@ The ``MjSpec`` object can be serialized with all of its assets using the functio
|
||||
can be either a path to a file or a file object. In order to load the spec from a zip file, use ``spec =
|
||||
MjSpec.from_zip(file)``, where ``file`` is a path to a zip file or a zip file object.
|
||||
|
||||
Mesh creation
|
||||
^^^^^^^^^^^^^
|
||||
The :ref:`mjsMesh` object includes convenience methods for model creation with named attributes, corresponding to the
|
||||
:ref:`mesh/builtin<asset-mesh-builtin>` semantics. See `specs_test.py
|
||||
<https://github.com/google-deepmind/mujoco/blob/main/python/mujoco/specs_test.py>`__.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
mesh = spec.add_mesh(name='prism')
|
||||
mesh.make_cone(nedge=5, radius=1)
|
||||
|
||||
.. _PyMJCF:
|
||||
|
||||
Relationship to ``PyMJCF`` and ``bind``
|
||||
|
||||
Reference in New Issue
Block a user