From a9737c60e8f21ec22b15db729448bb7ab0005144 Mon Sep 17 00:00:00 2001 From: Kevin Zakka Date: Wed, 30 Oct 2024 11:40:17 -0700 Subject: [PATCH] Copybara import of the project: -- 5b525ccaef3d7184d3167815be63ed630781a064 by Kevin Zakka : Add command line scripts to MJX docs. COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/2196 from kevinzakka:typo-fixes 5b525ccaef3d7184d3167815be63ed630781a064 PiperOrigin-RevId: 691497203 Change-Id: I7c5d6a8fcbd2a42939673cee5eadb30bebdad833 --- doc/mjx.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/mjx.rst b/doc/mjx.rst index c1e0fc16..49435bc6 100644 --- a/doc/mjx.rst +++ b/doc/mjx.rst @@ -165,6 +165,30 @@ Minimal example pos = jax.jit(batched_step)(vel) print(pos) +.. _MjxCli: + +Helpful Command Line Scripts +---------------------------- + +We provide two command line scripts with the ``mujoco-mjx`` package: + +.. code-block:: shell + + mjx-testspeed --mjcf=/PATH/TO/MJCF/ --base_path=. + +This command takes in a path to an MJCF file along with optional arguments (use ``--help`` for more information) +and computes helpful metrics for performance tuning. The command will output, among other things, the total +simulation time, the total steps per second and the total realtime factor (here total is across all available +devices). + +.. code-block:: shell + + mjx-viewer --help + +This command launches the MJX model in the simulate viewer, allowing you to visualize and interact with the model. +Note this steps the simulation using MJX physics (not C MuJoCo) so it can be helpful for example for debugging +solver parameters. + .. _MjxFeatureParity: Feature Parity