From 5004a4c8c5468891b5a8254cb867b70ebf683cbb Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 7 Nov 2022 10:35:50 -0800 Subject: [PATCH] Better memory setting and reporting, updated example models. - Memory heuristic rounds up to the nearest MB. - `simulate` reports total memory currently allocated in the info box. - All example models use `` rather than legacy attributes. - Regenerated `example_saved.xml` and reformatted original model in [overview chapter](https://mujoco.readthedocs.io/en/latest/overview.html?#examples). - `` top-level section does not get written if empty. PiperOrigin-RevId: 486702670 Change-Id: I0306e335f32344c59562ba606664ec9d2101f8a8 --- doc/_static/example_saved.xml | 76 ++++++++-------- doc/overview.rst | 89 ++++++++++--------- model/adhesion/active_adhesion.xml | 2 +- model/composite/cloth.xml | 2 +- model/composite/grid2pin.xml | 2 +- model/composite/loop.xml | 2 +- model/composite/particle.xml | 2 +- model/composite/rope.xml | 2 +- model/composite/softbox.xml | 2 +- model/hammock/hammock.xml | 2 +- model/humanoid/22_humanoids.xml | 2 +- model/humanoid100/humanoid100.xml | 2 +- model/plugin/cable.xml | 4 +- model/tendon_arm/arm26.xml | 2 - simulate/simulate.cc | 6 +- src/user/user_model.cc | 6 ++ src/xml/xml_native_writer.cc | 3 + .../collision_convex/stacked_boxes.xml | 2 +- 18 files changed, 107 insertions(+), 101 deletions(-) diff --git a/doc/_static/example_saved.xml b/doc/_static/example_saved.xml index 17a40303..fab7d45b 100644 --- a/doc/_static/example_saved.xml +++ b/doc/_static/example_saved.xml @@ -1,44 +1,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/doc/overview.rst b/doc/overview.rst index 42732472..bc41c731 100644 --- a/doc/overview.rst +++ b/doc/overview.rst @@ -177,14 +177,14 @@ objects and cast shadows, and a floating box with 6 DOFs (this is what the "free .. code:: xml - - - - - - - - + + + + + + + + The built-in OpenGL visualizer renders this model as: @@ -244,43 +244,46 @@ Next we provide a more elaborate example illustrating several features of MJCF. .. code:: xml - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + .. raw:: html diff --git a/model/adhesion/active_adhesion.xml b/model/adhesion/active_adhesion.xml index b36931e1..1c6d6ce0 100644 --- a/model/adhesion/active_adhesion.xml +++ b/model/adhesion/active_adhesion.xml @@ -4,7 +4,7 @@ -->