mujoco 3.5.0__tar.gz → 3.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mujoco-3.5.0/mujoco.egg-info → mujoco-3.6.0}/PKG-INFO +5 -5
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/CMakeLists.txt +4 -2
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/__init__.py +15 -3
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/MujocoDependencies.cmake +2 -34
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/MujocoLinkOptions.cmake +5 -9
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/ShellTests.cmake +1 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/enum_traits.h +1 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/function_traits.h +11 -0
- mujoco-3.6.0/mujoco/gl_context.py +21 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/indexer_xmacro.h +4 -5
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/enums.py +2 -1
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/functions.py +16 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/structs.py +31 -26
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/mjpython/Info.plist +4 -4
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/mjpython/mjpython.mm +31 -3
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/msh2obj_test.py +1 -0
- mujoco-3.6.0/mujoco/renderer.py +21 -0
- mujoco-3.6.0/mujoco/rendering/classic/__init__.py +16 -0
- {mujoco-3.5.0/mujoco → mujoco-3.6.0/mujoco/rendering/classic}/renderer.py +32 -33
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/CMakeLists.txt +1 -1
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/MujocoLinkOptions.cmake +5 -9
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/simulate.cc +168 -19
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/simulate.h +11 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate.cc +5 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/specs.cc.inc +1005 -681
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/specs_test.py +50 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/structs.cc +51 -118
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/structs.h +16 -36
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/structs_wrappers.cc +7 -5
- {mujoco-3.5.0 → mujoco-3.6.0/mujoco.egg-info}/PKG-INFO +5 -5
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco.egg-info/SOURCES.txt +3 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/pyproject.toml +5 -5
- {mujoco-3.5.0 → mujoco-3.6.0}/LICENSE +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/LICENSES_THIRD_PARTY.md +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/MANIFEST.in +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/README.md +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/bindings_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/callbacks.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cgl/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cgl/cgl.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/CheckAvxSupport.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/FindOrFetch.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/MujocoHarden.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/MujocoMacOS.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/MujocoOptions.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/cmake/TargetAddRpath.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/constants.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/egl/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/egl/egl_ext.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/enums.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/errors.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/errors.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/functions.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/functions.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/glfw/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/indexers.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/indexers.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/ast_nodes.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/ast_nodes_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/codegen/formatter.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/codegen/generate_enums.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/codegen/generate_functions.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/codegen/generate_structs.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/enums_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/functions_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/mjxmacro.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/structs_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/type_parsing.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/introspect/type_parsing_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/memory_leak_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/minimize.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/minimize_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/mjpython/mjpython.icns +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/mjpython/mjpython.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/msh2obj.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/osmesa/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/private.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/raw.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/render.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/render_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/renderer_test.py +0 -0
- {mujoco-3.5.0/mujoco → mujoco-3.6.0/mujoco/rendering/classic}/gl_context.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/rollout.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/rollout.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/rollout_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/serialization.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/array_safety.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/CheckAvxSupport.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/FindOrFetch.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/MujocoHarden.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/MujocoMacOS.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/SimulateDependencies.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/cmake/SimulateOptions.cmake +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/glfw_adapter.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/glfw_adapter.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/glfw_corevideo.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/glfw_corevideo.mm +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/glfw_dispatch.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/glfw_dispatch.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/macos_gui.mm +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/main.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/platform_ui_adapter.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/simulate/platform_ui_adapter.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/specs.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/specs_wrapper.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/specs_wrapper.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/io.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/model_modifier.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/optimize.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/parameter.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/plotting.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/residual.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/signal_modifier.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/signal_transform.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/timeseries.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/_src/trajectory.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/py.typed +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/builder.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/defaults.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/base.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/covariance.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/group.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/insights.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/optimization_trace.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/parameter_distribution.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/parameters.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/row.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/signals.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/sections/video.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/covariance.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/group.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/insights.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/layout.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/optimization_trace.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/parameter_confidence.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/parameters_table.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/plot_generic.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/row.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/signals.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/templates/video.html +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/report/utils.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/__init__.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/conftest.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/test_integration.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/test_model_modifier.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/test_parameter.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/test_signal.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/test_timeseries.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/sysid/tests/test_trajectory.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/MJCF_NoRoot.zip +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/MJCF_Root.zip +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/abdomen_1_body.msh +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/model.urdf +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/model.xml +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/msh.xml +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/simple_usd_preview_surface.usda +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/testdata/usd_golden.usda +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/threadpool.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/threadpool.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/camera.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/demo.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/exporter.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/exporter_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/lights.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/objects.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/shapes.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/usd/utils.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/CMakeLists.txt +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/array_traits.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/array_traits_test.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/crossplatform.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/func_traits.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/func_traits_test.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/func_wrap.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/func_wrap_test.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/tuple_tools.h +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/util/tuple_tools_test.cc +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/viewer.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco/viewer_test.py +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco.egg-info/dependency_links.txt +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco.egg-info/requires.txt +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/mujoco.egg-info/top_level.txt +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/setup.cfg +0 -0
- {mujoco-3.5.0 → mujoco-3.6.0}/setup.py +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mujoco
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.0
|
|
4
4
|
Summary: MuJoCo Physics Simulator
|
|
5
5
|
Author-email: Google DeepMind <mujoco@deepmind.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/google-deepmind/mujoco
|
|
8
|
-
Project-URL: Documentation, https://mujoco.readthedocs.io/en/3.
|
|
8
|
+
Project-URL: Documentation, https://mujoco.readthedocs.io/en/3.6.0
|
|
9
9
|
Project-URL: Repository, https://github.com/google-deepmind/mujoco
|
|
10
|
-
Project-URL: Changelog, https://mujoco.readthedocs.io/en/3.
|
|
10
|
+
Project-URL: Changelog, https://mujoco.readthedocs.io/en/3.6.0/changelog.html
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
14
14
|
Classifier: Natural Language :: English
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Topic :: Scientific/Engineering
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
License-File: LICENSES_THIRD_PARTY.md
|
|
@@ -51,6 +51,8 @@ endif()
|
|
|
51
51
|
|
|
52
52
|
include(MujocoLinkOptions)
|
|
53
53
|
get_mujoco_extra_link_options(EXTRA_LINK_OPTIONS)
|
|
54
|
+
list(FILTER EXTRA_LINK_OPTIONS EXCLUDE REGEX "STACK")
|
|
55
|
+
list(FILTER EXTRA_LINK_OPTIONS EXCLUDE REGEX "stack")
|
|
54
56
|
add_link_options(${EXTRA_LINK_OPTIONS})
|
|
55
57
|
|
|
56
58
|
include(MujocoMacOS)
|
|
@@ -84,7 +86,7 @@ if(NOT TARGET mujoco)
|
|
|
84
86
|
if(MUJOCO_FRAMEWORK)
|
|
85
87
|
message("MuJoCo framework is at ${MUJOCO_FRAMEWORK}/mujoco.framework")
|
|
86
88
|
set(MUJOCO_LIBRARY
|
|
87
|
-
${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.3.
|
|
89
|
+
${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.3.6.0.dylib
|
|
88
90
|
)
|
|
89
91
|
target_compile_options(mujoco INTERFACE -F${MUJOCO_FRAMEWORK})
|
|
90
92
|
endif()
|
|
@@ -92,7 +94,7 @@ if(NOT TARGET mujoco)
|
|
|
92
94
|
|
|
93
95
|
if(NOT MUJOCO_FRAMEWORK)
|
|
94
96
|
find_library(
|
|
95
|
-
MUJOCO_LIBRARY mujoco mujoco.3.
|
|
97
|
+
MUJOCO_LIBRARY mujoco mujoco.3.6.0 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED
|
|
96
98
|
)
|
|
97
99
|
find_path(MUJOCO_INCLUDE mujoco/mujoco.h HINTS ${MUJOCO_INCLUDE_DIR} REQUIRED)
|
|
98
100
|
message("MuJoCo is at ${MUJOCO_LIBRARY}")
|
|
@@ -56,11 +56,23 @@ from mujoco._constants import *
|
|
|
56
56
|
from mujoco._enums import *
|
|
57
57
|
from mujoco._errors import *
|
|
58
58
|
from mujoco._functions import *
|
|
59
|
-
from mujoco._render import *
|
|
60
59
|
from mujoco._specs import *
|
|
61
60
|
from mujoco._structs import *
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
|
|
62
|
+
try:
|
|
63
|
+
from mujoco._render import * # pytype: disable=import-error
|
|
64
|
+
except ImportError:
|
|
65
|
+
pass
|
|
66
|
+
|
|
67
|
+
try:
|
|
68
|
+
from mujoco.rendering.classic.renderer import Renderer # pytype: disable=import-error
|
|
69
|
+
except ImportError:
|
|
70
|
+
pass
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
from mujoco.rendering.classic.gl_context import * # pytype: disable=import-error
|
|
74
|
+
except ImportError:
|
|
75
|
+
pass
|
|
64
76
|
|
|
65
77
|
MjStruct: TypeAlias = Union[
|
|
66
78
|
_specs.MjsBody,
|
|
@@ -54,15 +54,10 @@ set(MUJOCO_DEP_VERSION_gtest
|
|
|
54
54
|
)
|
|
55
55
|
|
|
56
56
|
set(MUJOCO_DEP_VERSION_benchmark
|
|
57
|
-
|
|
57
|
+
5c55f5d4f45a1b09c5d98aa63a671993ebd42c69
|
|
58
58
|
CACHE STRING "Version of `benchmark` to be fetched."
|
|
59
59
|
)
|
|
60
60
|
|
|
61
|
-
set(MUJOCO_DEP_VERSION_TriangleMeshDistance
|
|
62
|
-
2cb643de1436e1ba8e2be49b07ec5491ac604457
|
|
63
|
-
CACHE STRING "Version of `TriangleMeshDistance` to be fetched."
|
|
64
|
-
)
|
|
65
|
-
|
|
66
61
|
mark_as_advanced(MUJOCO_DEP_VERSION_lodepng)
|
|
67
62
|
mark_as_advanced(MUJOCO_DEP_VERSION_MarchingCubeCpp)
|
|
68
63
|
mark_as_advanced(MUJOCO_DEP_VERSION_tinyxml2)
|
|
@@ -73,7 +68,6 @@ mark_as_advanced(MUJOCO_DEP_VERSION_Eigen3)
|
|
|
73
68
|
mark_as_advanced(MUJOCO_DEP_VERSION_abseil)
|
|
74
69
|
mark_as_advanced(MUJOCO_DEP_VERSION_gtest)
|
|
75
70
|
mark_as_advanced(MUJOCO_DEP_VERSION_benchmark)
|
|
76
|
-
mark_as_advanced(MUJOCO_DEP_VERSION_TriangleMeshDistance)
|
|
77
71
|
|
|
78
72
|
include(FetchContent)
|
|
79
73
|
include(FindOrFetch)
|
|
@@ -202,30 +196,6 @@ if(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
|
|
202
196
|
unset(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
|
203
197
|
endif()
|
|
204
198
|
|
|
205
|
-
if(NOT TARGET trianglemeshdistance)
|
|
206
|
-
FetchContent_Declare(
|
|
207
|
-
trianglemeshdistance
|
|
208
|
-
GIT_REPOSITORY https://github.com/InteractiveComputerGraphics/TriangleMeshDistance.git
|
|
209
|
-
GIT_TAG ${MUJOCO_DEP_VERSION_TriangleMeshDistance}
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
FetchContent_GetProperties(trianglemeshdistance)
|
|
213
|
-
if(NOT trianglemeshdistance_POPULATED)
|
|
214
|
-
FetchContent_Populate(trianglemeshdistance)
|
|
215
|
-
# Patch the source code to silence a warning/error related to a loop variable creating a copy.
|
|
216
|
-
# Since this is a header only library this fix is less intrusive than disabling the warning for
|
|
217
|
-
# any target including the header.
|
|
218
|
-
set(TMD_HEADER ${trianglemeshdistance_SOURCE_DIR}/TriangleMeshDistance/include/tmd/TriangleMeshDistance.h)
|
|
219
|
-
file(READ ${TMD_HEADER} TMD_CONTENT)
|
|
220
|
-
string(REPLACE
|
|
221
|
-
"for (const auto edge_count : edges_count) {"
|
|
222
|
-
"for (const auto& edge_count : edges_count) {"
|
|
223
|
-
TMD_CONTENT "${TMD_CONTENT}")
|
|
224
|
-
file(WRITE ${TMD_HEADER} "${TMD_CONTENT}")
|
|
225
|
-
include_directories(${trianglemeshdistance_SOURCE_DIR})
|
|
226
|
-
endif()
|
|
227
|
-
endif()
|
|
228
|
-
|
|
229
199
|
set(ENABLE_DOUBLE_PRECISION ON)
|
|
230
200
|
set(CCD_HIDE_ALL_SYMBOLS ON)
|
|
231
201
|
|
|
@@ -339,9 +309,7 @@ if(MUJOCO_BUILD_TESTS)
|
|
|
339
309
|
"sed"
|
|
340
310
|
"-i"
|
|
341
311
|
"-e"
|
|
342
|
-
"s/-
|
|
343
|
-
"-e"
|
|
344
|
-
"s/HAVE_CXX_FLAG_STD_CXX11/HAVE_CXX_FLAG_STD_CXX14/g"
|
|
312
|
+
"s/-Wformat=2/-Wformat/g"
|
|
345
313
|
"${CMAKE_BINARY_DIR}/_deps/benchmark-src/CMakeLists.txt"
|
|
346
314
|
)
|
|
347
315
|
endif()
|
|
@@ -23,16 +23,12 @@ function(get_mujoco_extra_link_options OUTPUT_VAR)
|
|
|
23
23
|
set(EXTRA_LINK_OPTIONS)
|
|
24
24
|
|
|
25
25
|
if(WIN32)
|
|
26
|
-
set(EXTRA_LINK_OPTIONS ${EXTRA_LINK_OPTIONS} -Wl,/STACK:16777216)
|
|
27
26
|
set(CMAKE_REQUIRED_FLAGS "-fuse-ld=lld-link")
|
|
28
|
-
check_c_source_compiles("int main() {}"
|
|
29
|
-
if(
|
|
30
|
-
set(EXTRA_LINK_OPTIONS
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-Wl,/OPT:REF
|
|
34
|
-
-Wl,/OPT:ICF
|
|
35
|
-
)
|
|
27
|
+
check_c_source_compiles("int main() {}" SUPPORTS_LLD_LINK)
|
|
28
|
+
if(SUPPORTS_LLD_LINK)
|
|
29
|
+
set(EXTRA_LINK_OPTIONS ${EXTRA_LINK_OPTIONS} -fuse-ld=lld-link -Wl,/STACK:16777216 -Wl,/OPT:REF -Wl,/OPT:ICF)
|
|
30
|
+
else()
|
|
31
|
+
set(EXTRA_LINK_OPTIONS ${EXTRA_LINK_OPTIONS} -Wl,--stack,16777216)
|
|
36
32
|
endif()
|
|
37
33
|
else()
|
|
38
34
|
set(CMAKE_REQUIRED_FLAGS "-fuse-ld=lld")
|
|
@@ -38,6 +38,7 @@ function(add_mujoco_shell_test TEST_NAME TARGET_BINARY)
|
|
|
38
38
|
"CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
|
|
39
39
|
"TARGET_BINARY=$<TARGET_FILE:${TARGET_BINARY}>"
|
|
40
40
|
"TEST_TMPDIR=${TEST_TMPDIR}"
|
|
41
|
+
"MUJOCO_PLUGIN_DIR=$<TARGET_FILE_DIR:obj_decoder>"
|
|
41
42
|
)
|
|
42
43
|
if(WIN32)
|
|
43
44
|
# Define the directory containing the mujoco DLL library so that it can be added to the PATH.
|
|
@@ -208,6 +208,7 @@ struct mjtEq {
|
|
|
208
208
|
std::make_pair("mjEQ_TENDON", ::mjtEq::mjEQ_TENDON),
|
|
209
209
|
std::make_pair("mjEQ_FLEX", ::mjtEq::mjEQ_FLEX),
|
|
210
210
|
std::make_pair("mjEQ_FLEXVERT", ::mjtEq::mjEQ_FLEXVERT),
|
|
211
|
+
std::make_pair("mjEQ_FLEXSTRAIN", ::mjtEq::mjEQ_FLEXSTRAIN),
|
|
211
212
|
std::make_pair("mjEQ_DISTANCE", ::mjtEq::mjEQ_DISTANCE)};
|
|
212
213
|
};
|
|
213
214
|
|
|
@@ -4642,6 +4642,17 @@ struct mjs_getSpec {
|
|
|
4642
4642
|
}
|
|
4643
4643
|
};
|
|
4644
4644
|
|
|
4645
|
+
struct mjs_getCompiler {
|
|
4646
|
+
static constexpr char name[] = "mjs_getCompiler";
|
|
4647
|
+
static constexpr char doc[] = "Get compiler associated with element's origin spec.";
|
|
4648
|
+
using type = mjsCompiler * (mjsElement *);
|
|
4649
|
+
static constexpr auto param_names = std::make_tuple("element");
|
|
4650
|
+
|
|
4651
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4652
|
+
return ::mjs_getCompiler;
|
|
4653
|
+
}
|
|
4654
|
+
};
|
|
4655
|
+
|
|
4645
4656
|
struct mjs_findSpec {
|
|
4646
4657
|
static constexpr char name[] = "mjs_findSpec";
|
|
4647
4658
|
static constexpr char doc[] = "Find spec (model asset) by name.";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright 2022 DeepMind Technologies Limited
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
15
|
+
"""Wrapper around mujoco.rendering.classic.gl_context for backwards compatibility."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
from mujoco.rendering.classic.gl_context import * # pytype: disable=import-error
|
|
20
|
+
except ImportError:
|
|
21
|
+
pass
|
|
@@ -259,7 +259,10 @@
|
|
|
259
259
|
X( mjtNum, tendon, _length0, ntendon, 1 ) \
|
|
260
260
|
X( mjtNum, tendon, _invweight0, ntendon, 1 ) \
|
|
261
261
|
X( mjtNum, tendon, _user, ntendon, MJ_M(nuser_tendon) ) \
|
|
262
|
-
X( float, tendon, _rgba, ntendon, 4 )
|
|
262
|
+
X( float, tendon, _rgba, ntendon, 4 ) \
|
|
263
|
+
X( int, ten_, J_rownnz, ntendon, 1 ) \
|
|
264
|
+
X( int, ten_, J_rowadr, ntendon, 1 ) \
|
|
265
|
+
X( int, ten_, J_colind, ntendon, MJ_M(nv) )
|
|
263
266
|
|
|
264
267
|
#define MJMODEL_TEXTURE \
|
|
265
268
|
X( int, tex_, type, ntex, 1 ) \
|
|
@@ -402,11 +405,7 @@
|
|
|
402
405
|
#define MJDATA_TENDON \
|
|
403
406
|
X( int, ten_, wrapadr , ntendon, 1 ) \
|
|
404
407
|
X( int, ten_, wrapnum , ntendon, 1 ) \
|
|
405
|
-
X( int, ten_, J_rownnz, ntendon, 1 ) \
|
|
406
|
-
X( int, ten_, J_rowadr, ntendon, 1 ) \
|
|
407
|
-
X( int, ten_, J_colind, ntendon, MJ_M(nv) ) \
|
|
408
408
|
X( mjtNum, ten_, length , ntendon, 1 ) \
|
|
409
|
-
X( mjtNum, ten_, J , ntendon, MJ_M(nv) ) \
|
|
410
409
|
X( mjtNum, ten_, velocity, ntendon, 1 )
|
|
411
410
|
|
|
412
411
|
#define MJDATA_VIEW_GROUPS \
|
|
@@ -10823,6 +10823,22 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
|
|
10823
10823
|
),
|
|
10824
10824
|
doc='Get spec from body.',
|
|
10825
10825
|
)),
|
|
10826
|
+
('mjs_getCompiler',
|
|
10827
|
+
FunctionDecl(
|
|
10828
|
+
name='mjs_getCompiler',
|
|
10829
|
+
return_type=PointerType(
|
|
10830
|
+
inner_type=ValueType(name='mjsCompiler'),
|
|
10831
|
+
),
|
|
10832
|
+
parameters=(
|
|
10833
|
+
FunctionParameterDecl(
|
|
10834
|
+
name='element',
|
|
10835
|
+
type=PointerType(
|
|
10836
|
+
inner_type=ValueType(name='mjsElement'),
|
|
10837
|
+
),
|
|
10838
|
+
),
|
|
10839
|
+
),
|
|
10840
|
+
doc="Get compiler associated with element's origin spec.",
|
|
10841
|
+
)),
|
|
10826
10842
|
('mjs_findSpec',
|
|
10827
10843
|
FunctionDecl(
|
|
10828
10844
|
name='mjs_findSpec',
|
|
@@ -1122,6 +1122,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|
|
1122
1122
|
type=ValueType(name='mjtSize'),
|
|
1123
1123
|
doc='number of tendons',
|
|
1124
1124
|
),
|
|
1125
|
+
StructFieldDecl(
|
|
1126
|
+
name='nJten',
|
|
1127
|
+
type=ValueType(name='mjtSize'),
|
|
1128
|
+
doc='number of non-zeros in sparse ten_J matrix',
|
|
1129
|
+
),
|
|
1125
1130
|
StructFieldDecl(
|
|
1126
1131
|
name='nwrap',
|
|
1127
1132
|
type=ValueType(name='mjtSize'),
|
|
@@ -2975,7 +2980,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|
|
2975
2980
|
type=PointerType(
|
|
2976
2981
|
inner_type=ValueType(name='int'),
|
|
2977
2982
|
),
|
|
2978
|
-
doc='0:
|
|
2983
|
+
doc='0:none, 1:edges, 2:vertices, 3:strain',
|
|
2979
2984
|
array_extent=('nflex',),
|
|
2980
2985
|
),
|
|
2981
2986
|
StructFieldDecl(
|
|
@@ -3922,6 +3927,30 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|
|
3922
3927
|
doc="first two trees along tendon's path",
|
|
3923
3928
|
array_extent=('ntendon', 2),
|
|
3924
3929
|
),
|
|
3930
|
+
StructFieldDecl(
|
|
3931
|
+
name='ten_J_rownnz',
|
|
3932
|
+
type=PointerType(
|
|
3933
|
+
inner_type=ValueType(name='int'),
|
|
3934
|
+
),
|
|
3935
|
+
doc='number of non-zeros in Jacobian row',
|
|
3936
|
+
array_extent=('ntendon',),
|
|
3937
|
+
),
|
|
3938
|
+
StructFieldDecl(
|
|
3939
|
+
name='ten_J_rowadr',
|
|
3940
|
+
type=PointerType(
|
|
3941
|
+
inner_type=ValueType(name='int'),
|
|
3942
|
+
),
|
|
3943
|
+
doc='row start address in colind array',
|
|
3944
|
+
array_extent=('ntendon',),
|
|
3945
|
+
),
|
|
3946
|
+
StructFieldDecl(
|
|
3947
|
+
name='ten_J_colind',
|
|
3948
|
+
type=PointerType(
|
|
3949
|
+
inner_type=ValueType(name='int'),
|
|
3950
|
+
),
|
|
3951
|
+
doc='column indices in sparse Jacobian',
|
|
3952
|
+
array_extent=('nJten',),
|
|
3953
|
+
),
|
|
3925
3954
|
StructFieldDecl(
|
|
3926
3955
|
name='tendon_limited',
|
|
3927
3956
|
type=PointerType(
|
|
@@ -5807,37 +5836,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|
|
5807
5836
|
doc='number of wrap points in path',
|
|
5808
5837
|
array_extent=('ntendon',),
|
|
5809
5838
|
),
|
|
5810
|
-
StructFieldDecl(
|
|
5811
|
-
name='ten_J_rownnz',
|
|
5812
|
-
type=PointerType(
|
|
5813
|
-
inner_type=ValueType(name='int'),
|
|
5814
|
-
),
|
|
5815
|
-
doc='number of non-zeros in Jacobian row',
|
|
5816
|
-
array_extent=('ntendon',),
|
|
5817
|
-
),
|
|
5818
|
-
StructFieldDecl(
|
|
5819
|
-
name='ten_J_rowadr',
|
|
5820
|
-
type=PointerType(
|
|
5821
|
-
inner_type=ValueType(name='int'),
|
|
5822
|
-
),
|
|
5823
|
-
doc='row start address in colind array',
|
|
5824
|
-
array_extent=('ntendon',),
|
|
5825
|
-
),
|
|
5826
|
-
StructFieldDecl(
|
|
5827
|
-
name='ten_J_colind',
|
|
5828
|
-
type=PointerType(
|
|
5829
|
-
inner_type=ValueType(name='int'),
|
|
5830
|
-
),
|
|
5831
|
-
doc='column indices in sparse Jacobian',
|
|
5832
|
-
array_extent=('ntendon', 'nv'),
|
|
5833
|
-
),
|
|
5834
5839
|
StructFieldDecl(
|
|
5835
5840
|
name='ten_J',
|
|
5836
5841
|
type=PointerType(
|
|
5837
5842
|
inner_type=ValueType(name='mjtNum'),
|
|
5838
5843
|
),
|
|
5839
5844
|
doc='tendon Jacobian',
|
|
5840
|
-
array_extent=('
|
|
5845
|
+
array_extent=('nJten',),
|
|
5841
5846
|
),
|
|
5842
5847
|
StructFieldDecl(
|
|
5843
5848
|
name='ten_length',
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
<key>CFBundleIdentifier</key>
|
|
8
8
|
<string>org.mujoco.mjpython</string>
|
|
9
9
|
<key>CFBundleVersion</key>
|
|
10
|
-
<string>3.
|
|
10
|
+
<string>3.6.0</string>
|
|
11
11
|
<key>CFBundleGetInfoString</key>
|
|
12
|
-
<string>3.
|
|
12
|
+
<string>3.6.0</string>
|
|
13
13
|
<key>CFBundleLongVersionString</key>
|
|
14
|
-
<string>3.
|
|
14
|
+
<string>3.6.0</string>
|
|
15
15
|
<key>CFBundleShortVersionString</key>
|
|
16
|
-
<string>3.
|
|
16
|
+
<string>3.6.0</string>
|
|
17
17
|
<key>CFBundleExecutable</key>
|
|
18
18
|
<string>mjpython</string>
|
|
19
19
|
<key>CFBundleIconFile</key>
|
|
@@ -36,6 +36,13 @@ extern char **environ; // for execve
|
|
|
36
36
|
// so that we can dlsym and call them from Python via ctypes.
|
|
37
37
|
__attribute__((used)) void mjpython_hide_dock_icon() {
|
|
38
38
|
[NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory];
|
|
39
|
+
|
|
40
|
+
// Drain pending Cocoa events on the main thread. The activation policy
|
|
41
|
+
// change triggers an asynchronous dock/screen reconfiguration via
|
|
42
|
+
// SkyLight. If we return before it's processed, the notification lands
|
|
43
|
+
// on a GCD worker thread and hits NSScreen's main-thread assertion.
|
|
44
|
+
NSDate* soon = [NSDate dateWithTimeIntervalSinceNow:0.01];
|
|
45
|
+
[[NSRunLoop mainRunLoop] runUntilDate:soon];
|
|
39
46
|
}
|
|
40
47
|
__attribute__((used)) void mjpython_show_dock_icon() {
|
|
41
48
|
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
|
|
@@ -50,6 +57,7 @@ constexpr rlim_t kThreadStackSize = 0x1000000;
|
|
|
50
57
|
struct {
|
|
51
58
|
#define CPYTHON_FN(fname) decltype(&::fname) fname
|
|
52
59
|
|
|
60
|
+
// LINT.IfChange(CPYTHON_FN)
|
|
53
61
|
// go/keep-sorted start
|
|
54
62
|
CPYTHON_FN(PyConfig_Clear);
|
|
55
63
|
CPYTHON_FN(PyConfig_InitPythonConfig);
|
|
@@ -57,15 +65,18 @@ struct {
|
|
|
57
65
|
CPYTHON_FN(PyGILState_Ensure);
|
|
58
66
|
CPYTHON_FN(PyGILState_Release);
|
|
59
67
|
CPYTHON_FN(PyRun_SimpleStringFlags);
|
|
68
|
+
CPYTHON_FN(PyStatus_Exception);
|
|
69
|
+
CPYTHON_FN(Py_ExitStatusException);
|
|
60
70
|
CPYTHON_FN(Py_FinalizeEx);
|
|
61
71
|
CPYTHON_FN(Py_InitializeFromConfig);
|
|
62
72
|
CPYTHON_FN(Py_RunMain);
|
|
63
73
|
// go/keep-sorted end
|
|
74
|
+
// LINT.ThenChange(:CPYTHON_INITFN)
|
|
64
75
|
|
|
65
76
|
#undef CPYTHON_FN
|
|
66
77
|
} cpython;
|
|
67
78
|
|
|
68
|
-
std::atomic_bool py_initialized
|
|
79
|
+
std::atomic_bool py_initialized;
|
|
69
80
|
|
|
70
81
|
struct Args {
|
|
71
82
|
int argc;
|
|
@@ -80,8 +91,20 @@ void* mjpython_pymain(void* vargs) {
|
|
|
80
91
|
// Initialize the Python interpreter.
|
|
81
92
|
PyConfig config;
|
|
82
93
|
cpython.PyConfig_InitPythonConfig(&config);
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
{
|
|
95
|
+
PyStatus status = cpython.PyConfig_SetBytesArgv(&config, args->argc, args->argv);
|
|
96
|
+
if (cpython.PyStatus_Exception(status)) {
|
|
97
|
+
// Calls exit() which aborts the entire process.
|
|
98
|
+
cpython.Py_ExitStatusException(status);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
{
|
|
102
|
+
PyStatus status = cpython.Py_InitializeFromConfig(&config);
|
|
103
|
+
if (cpython.PyStatus_Exception(status)) {
|
|
104
|
+
// Calls exit() which aborts the entire process.
|
|
105
|
+
cpython.Py_ExitStatusException(status);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
85
108
|
cpython.PyConfig_Clear(&config);
|
|
86
109
|
|
|
87
110
|
// Set up the condition variable to pass control back to the macOS main thread.
|
|
@@ -205,6 +228,7 @@ _mjpython_init()
|
|
|
205
228
|
} // namespace
|
|
206
229
|
|
|
207
230
|
int main(int argc, char** argv) {
|
|
231
|
+
py_initialized.store(false);
|
|
208
232
|
const char* libpython_path = getenv("MJPYTHON_LIBPYTHON");
|
|
209
233
|
if (!libpython_path || !libpython_path[0]) {
|
|
210
234
|
std::cerr << "This binary must be launched via the mjpython.py script.\n";
|
|
@@ -257,6 +281,7 @@ int main(int argc, char** argv) {
|
|
|
257
281
|
} \
|
|
258
282
|
}
|
|
259
283
|
|
|
284
|
+
// LINT.IfChange(CPYTHON_INITFN)
|
|
260
285
|
// go/keep-sorted start
|
|
261
286
|
CPYTHON_INITFN(PyConfig_Clear);
|
|
262
287
|
CPYTHON_INITFN(PyConfig_InitPythonConfig);
|
|
@@ -264,10 +289,13 @@ int main(int argc, char** argv) {
|
|
|
264
289
|
CPYTHON_INITFN(PyGILState_Ensure);
|
|
265
290
|
CPYTHON_INITFN(PyGILState_Release);
|
|
266
291
|
CPYTHON_INITFN(PyRun_SimpleStringFlags);
|
|
292
|
+
CPYTHON_INITFN(PyStatus_Exception);
|
|
293
|
+
CPYTHON_INITFN(Py_ExitStatusException);
|
|
267
294
|
CPYTHON_INITFN(Py_FinalizeEx);
|
|
268
295
|
CPYTHON_INITFN(Py_InitializeFromConfig);
|
|
269
296
|
CPYTHON_INITFN(Py_RunMain);
|
|
270
297
|
// go/keep-sorted end
|
|
298
|
+
// LINT.ThenChange(:CPYTHON_FN)
|
|
271
299
|
|
|
272
300
|
#undef CPYTHON_INITFN
|
|
273
301
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright 2022 DeepMind Technologies Limited
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
15
|
+
"""Wrapper around mujoco.rendering.classic.renderer for backwards compatibility."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
from mujoco.rendering.classic.renderer import Renderer # pytype: disable=import-error
|
|
20
|
+
except ImportError:
|
|
21
|
+
pass
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright 2026 DeepMind Technologies Limited
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
15
|
+
|
|
16
|
+
# Empty.
|