mujoco 3.3.2__tar.gz → 3.3.3__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.3.2/mujoco.egg-info → mujoco-3.3.3}/PKG-INFO +3 -3
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/CMakeLists.txt +4 -4
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/bindings_test.py +3 -1
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/MujocoDependencies.cmake +5 -5
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/enum_traits.h +32 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/function_traits.h +166 -78
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/functions.cc +9 -6
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/indexer_xmacro.h +1 -1
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/codegen/generate_functions.py +7 -2
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/enums.py +32 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/functions.py +443 -214
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/structs.py +589 -1846
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/mjpython/Info.plist +4 -4
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/CMakeLists.txt +2 -1
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/main.cc +1 -1
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/simulate.cc +106 -106
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/simulate.h +16 -2
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate.cc +59 -21
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/specs.cc +157 -3
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/specs.cc.inc +389 -350
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/specs_test.py +90 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/structs.cc +4 -1
- {mujoco-3.3.2 → mujoco-3.3.3/mujoco.egg-info}/PKG-INFO +3 -3
- {mujoco-3.3.2 → mujoco-3.3.3}/pyproject.toml +3 -3
- {mujoco-3.3.2 → mujoco-3.3.3}/LICENSE +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/LICENSES_THIRD_PARTY.md +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/MANIFEST.in +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/README.md +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/__init__.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/callbacks.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cgl/__init__.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cgl/cgl.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/CheckAvxSupport.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/FindOrFetch.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/MujocoHarden.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/MujocoLinkOptions.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/MujocoMacOS.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/MujocoOptions.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/ShellTests.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/cmake/TargetAddRpath.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/constants.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/egl/__init__.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/egl/egl_ext.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/enums.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/errors.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/errors.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/functions.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/gl_context.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/glfw/__init__.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/indexers.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/indexers.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/__init__.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/ast_nodes.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/ast_nodes_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/codegen/formatter.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/codegen/generate_enums.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/codegen/generate_structs.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/enums_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/functions_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/mjxmacro.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/structs_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/type_parsing.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/introspect/type_parsing_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/memory_leak_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/minimize.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/minimize_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/mjpython/mjpython.icns +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/mjpython/mjpython.mm +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/mjpython/mjpython.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/msh2obj.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/msh2obj_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/osmesa/__init__.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/private.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/raw.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/render.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/render_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/renderer.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/renderer_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/rollout.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/rollout.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/rollout_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/serialization.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/array_safety.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/CheckAvxSupport.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/FindOrFetch.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/MujocoHarden.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/MujocoLinkOptions.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/MujocoMacOS.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/SimulateDependencies.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/cmake/SimulateOptions.cmake +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/glfw_adapter.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/glfw_adapter.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/glfw_corevideo.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/glfw_corevideo.mm +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/glfw_dispatch.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/glfw_dispatch.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/macos_gui.mm +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/platform_ui_adapter.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/simulate/platform_ui_adapter.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/specs_wrapper.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/specs_wrapper.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/structs.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/structs_wrappers.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/testdata/abdomen_1_body.msh +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/testdata/model.xml +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/testdata/msh.xml +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/testdata/usd_golden.usda +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/threadpool.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/threadpool.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/camera.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/demo.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/exporter.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/exporter_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/lights.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/objects.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/shapes.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/usd/utils.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/CMakeLists.txt +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/array_traits.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/array_traits_test.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/crossplatform.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/func_traits.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/func_traits_test.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/func_wrap.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/func_wrap_test.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/tuple_tools.h +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/util/tuple_tools_test.cc +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/viewer.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco/viewer_test.py +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco.egg-info/SOURCES.txt +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco.egg-info/dependency_links.txt +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco.egg-info/requires.txt +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/mujoco.egg-info/top_level.txt +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/setup.cfg +0 -0
- {mujoco-3.3.2 → mujoco-3.3.3}/setup.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mujoco
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: MuJoCo Physics Simulator
|
|
5
5
|
Author-email: Google DeepMind <mujoco@deepmind.com>
|
|
6
6
|
License: Apache License 2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/google-deepmind/mujoco
|
|
8
|
-
Project-URL: Documentation, https://mujoco.readthedocs.io/en/3.3.
|
|
8
|
+
Project-URL: Documentation, https://mujoco.readthedocs.io/en/3.3.3
|
|
9
9
|
Project-URL: Repository, https://github.com/google-deepmind/mujoco
|
|
10
|
-
Project-URL: Changelog, https://mujoco.readthedocs.io/en/3.3.
|
|
10
|
+
Project-URL: Changelog, https://mujoco.readthedocs.io/en/3.3.3/changelog.html
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -84,7 +84,7 @@ if(NOT TARGET mujoco)
|
|
|
84
84
|
if(MUJOCO_FRAMEWORK)
|
|
85
85
|
message("MuJoCo framework is at ${MUJOCO_FRAMEWORK}/mujoco.framework")
|
|
86
86
|
set(MUJOCO_LIBRARY
|
|
87
|
-
${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.3.3.
|
|
87
|
+
${MUJOCO_FRAMEWORK}/mujoco.framework/Versions/A/libmujoco.3.3.3.dylib
|
|
88
88
|
)
|
|
89
89
|
target_compile_options(mujoco INTERFACE -F${MUJOCO_FRAMEWORK})
|
|
90
90
|
endif()
|
|
@@ -92,7 +92,7 @@ if(NOT TARGET mujoco)
|
|
|
92
92
|
|
|
93
93
|
if(NOT MUJOCO_FRAMEWORK)
|
|
94
94
|
find_library(
|
|
95
|
-
MUJOCO_LIBRARY mujoco mujoco.3.3.
|
|
95
|
+
MUJOCO_LIBRARY mujoco mujoco.3.3.3 HINTS ${MUJOCO_LIBRARY_DIR} REQUIRED
|
|
96
96
|
)
|
|
97
97
|
find_path(MUJOCO_INCLUDE mujoco/mujoco.h HINTS ${MUJOCO_INCLUDE_DIR} REQUIRED)
|
|
98
98
|
message("MuJoCo is at ${MUJOCO_LIBRARY}")
|
|
@@ -140,7 +140,7 @@ findorfetch(
|
|
|
140
140
|
GIT_REPO
|
|
141
141
|
https://github.com/abseil/abseil-cpp
|
|
142
142
|
GIT_TAG
|
|
143
|
-
|
|
143
|
+
bc257a88f7c1939f24e0379f14a3589e926c950c # LTS 20250512.0
|
|
144
144
|
TARGETS
|
|
145
145
|
${MUJOCO_PYTHON_ABSL_TARGETS}
|
|
146
146
|
EXCLUDE_FROM_ALL
|
|
@@ -173,7 +173,7 @@ findorfetch(
|
|
|
173
173
|
GIT_REPO
|
|
174
174
|
https://gitlab.com/libeigen/eigen
|
|
175
175
|
GIT_TAG
|
|
176
|
-
|
|
176
|
+
d0b490ee091629068e0c11953419eb089f9e6bb2
|
|
177
177
|
TARGETS
|
|
178
178
|
Eigen3::Eigen
|
|
179
179
|
EXCLUDE_FROM_ALL
|
|
@@ -623,10 +623,12 @@ class MuJoCoBindingsTest(parameterized.TestCase):
|
|
|
623
623
|
|
|
624
624
|
ncon = 13
|
|
625
625
|
nefc = 17
|
|
626
|
-
|
|
626
|
+
nj = 21
|
|
627
|
+
mujoco._functions._realloc_con_efc(self.data, ncon=ncon, nefc=nefc, nJ=nj)
|
|
627
628
|
|
|
628
629
|
self.assertLen(self.data.contact, ncon)
|
|
629
630
|
self.assertEqual(self.data.efc_id.shape, (nefc,))
|
|
631
|
+
self.assertEqual(self.data.efc_J.shape, (nj,))
|
|
630
632
|
self.assertEqual(self.data.efc_KBIP.shape, (nefc, 4))
|
|
631
633
|
|
|
632
634
|
expected_error = 'insufficient arena memory available'
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
# Build configuration for third party libraries used in MuJoCo.
|
|
16
16
|
|
|
17
17
|
set(MUJOCO_DEP_VERSION_lodepng
|
|
18
|
-
|
|
18
|
+
17d08dd26cac4d63f43af217ebd70318bfb8189c
|
|
19
19
|
CACHE STRING "Version of `lodepng` to be fetched."
|
|
20
20
|
)
|
|
21
21
|
set(MUJOCO_DEP_VERSION_tinyxml2
|
|
@@ -35,21 +35,21 @@ set(MUJOCO_DEP_VERSION_ccd
|
|
|
35
35
|
CACHE STRING "Version of `ccd` to be fetched."
|
|
36
36
|
)
|
|
37
37
|
set(MUJOCO_DEP_VERSION_qhull
|
|
38
|
-
|
|
38
|
+
c7bee59d068a69f427b1273e71cdc5bc455a5bdd
|
|
39
39
|
CACHE STRING "Version of `qhull` to be fetched."
|
|
40
40
|
)
|
|
41
41
|
set(MUJOCO_DEP_VERSION_Eigen3
|
|
42
|
-
|
|
42
|
+
d0b490ee091629068e0c11953419eb089f9e6bb2
|
|
43
43
|
CACHE STRING "Version of `Eigen3` to be fetched."
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
set(MUJOCO_DEP_VERSION_abseil
|
|
47
|
-
|
|
47
|
+
bc257a88f7c1939f24e0379f14a3589e926c950c # LTS 20250512.0
|
|
48
48
|
CACHE STRING "Version of `abseil` to be fetched."
|
|
49
49
|
)
|
|
50
50
|
|
|
51
51
|
set(MUJOCO_DEP_VERSION_gtest
|
|
52
|
-
|
|
52
|
+
52eb8108c5bdec04579160ae17225d66034bd723 # v1.17.0
|
|
53
53
|
CACHE STRING "Version of `gtest` to be fetched."
|
|
54
54
|
)
|
|
55
55
|
|
|
@@ -107,6 +107,16 @@ struct mjtCamLight {
|
|
|
107
107
|
std::make_pair("mjCAMLIGHT_TARGETBODYCOM", ::mjtCamLight::mjCAMLIGHT_TARGETBODYCOM)};
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
+
struct mjtLightType {
|
|
111
|
+
static constexpr char name[] = "mjtLightType";
|
|
112
|
+
using type = ::mjtLightType;
|
|
113
|
+
static constexpr auto values = std::array{
|
|
114
|
+
std::make_pair("mjLIGHT_SPOT", ::mjtLightType::mjLIGHT_SPOT),
|
|
115
|
+
std::make_pair("mjLIGHT_DIRECTIONAL", ::mjtLightType::mjLIGHT_DIRECTIONAL),
|
|
116
|
+
std::make_pair("mjLIGHT_POINT", ::mjtLightType::mjLIGHT_POINT),
|
|
117
|
+
std::make_pair("mjLIGHT_IMAGE", ::mjtLightType::mjLIGHT_IMAGE)};
|
|
118
|
+
};
|
|
119
|
+
|
|
110
120
|
struct mjtTexture {
|
|
111
121
|
static constexpr char name[] = "mjtTexture";
|
|
112
122
|
using type = ::mjtTexture;
|
|
@@ -133,6 +143,15 @@ struct mjtTextureRole {
|
|
|
133
143
|
std::make_pair("mjNTEXROLE", ::mjtTextureRole::mjNTEXROLE)};
|
|
134
144
|
};
|
|
135
145
|
|
|
146
|
+
struct mjtColorSpace {
|
|
147
|
+
static constexpr char name[] = "mjtColorSpace";
|
|
148
|
+
using type = ::mjtColorSpace;
|
|
149
|
+
static constexpr auto values = std::array{
|
|
150
|
+
std::make_pair("mjCOLORSPACE_AUTO", ::mjtColorSpace::mjCOLORSPACE_AUTO),
|
|
151
|
+
std::make_pair("mjCOLORSPACE_LINEAR", ::mjtColorSpace::mjCOLORSPACE_LINEAR),
|
|
152
|
+
std::make_pair("mjCOLORSPACE_SRGB", ::mjtColorSpace::mjCOLORSPACE_SRGB)};
|
|
153
|
+
};
|
|
154
|
+
|
|
136
155
|
struct mjtIntegrator {
|
|
137
156
|
static constexpr char name[] = "mjtIntegrator";
|
|
138
157
|
using type = ::mjtIntegrator;
|
|
@@ -403,6 +422,16 @@ struct mjtFlexSelf {
|
|
|
403
422
|
std::make_pair("mjFLEXSELF_AUTO", ::mjtFlexSelf::mjFLEXSELF_AUTO)};
|
|
404
423
|
};
|
|
405
424
|
|
|
425
|
+
struct mjtSDFType {
|
|
426
|
+
static constexpr char name[] = "mjtSDFType";
|
|
427
|
+
using type = ::mjtSDFType;
|
|
428
|
+
static constexpr auto values = std::array{
|
|
429
|
+
std::make_pair("mjSDFTYPE_SINGLE", ::mjtSDFType::mjSDFTYPE_SINGLE),
|
|
430
|
+
std::make_pair("mjSDFTYPE_INTERSECTION", ::mjtSDFType::mjSDFTYPE_INTERSECTION),
|
|
431
|
+
std::make_pair("mjSDFTYPE_MIDSURFACE", ::mjtSDFType::mjSDFTYPE_MIDSURFACE),
|
|
432
|
+
std::make_pair("mjSDFTYPE_COLLISION", ::mjtSDFType::mjSDFTYPE_COLLISION)};
|
|
433
|
+
};
|
|
434
|
+
|
|
406
435
|
struct mjtTaskStatus {
|
|
407
436
|
static constexpr char name[] = "mjtTaskStatus";
|
|
408
437
|
using type = ::mjtTaskStatus;
|
|
@@ -818,8 +847,10 @@ static constexpr auto kAllEnums = std::make_tuple(
|
|
|
818
847
|
mjtJoint{},
|
|
819
848
|
mjtGeom{},
|
|
820
849
|
mjtCamLight{},
|
|
850
|
+
mjtLightType{},
|
|
821
851
|
mjtTexture{},
|
|
822
852
|
mjtTextureRole{},
|
|
853
|
+
mjtColorSpace{},
|
|
823
854
|
mjtIntegrator{},
|
|
824
855
|
mjtCone{},
|
|
825
856
|
mjtJacobian{},
|
|
@@ -839,6 +870,7 @@ static constexpr auto kAllEnums = std::make_tuple(
|
|
|
839
870
|
mjtSameFrame{},
|
|
840
871
|
mjtLRMode{},
|
|
841
872
|
mjtFlexSelf{},
|
|
873
|
+
mjtSDFType{},
|
|
842
874
|
mjtTaskStatus{},
|
|
843
875
|
mjtState{},
|
|
844
876
|
mjtWarning{},
|
|
@@ -121,6 +121,17 @@ struct mj_compile {
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
+
struct mj_copyBack {
|
|
125
|
+
static constexpr char name[] = "mj_copyBack";
|
|
126
|
+
static constexpr char doc[] = "Copy real-valued arrays from model to spec, returns 1 on success.";
|
|
127
|
+
using type = int (mjSpec *, const mjModel *);
|
|
128
|
+
static constexpr auto param_names = std::make_tuple("s", "m");
|
|
129
|
+
|
|
130
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
131
|
+
return ::mj_copyBack;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
124
135
|
struct mj_recompile {
|
|
125
136
|
static constexpr char name[] = "mj_recompile";
|
|
126
137
|
static constexpr char doc[] = "Recompile spec to model, preserving the state, return 0 on success.";
|
|
@@ -374,6 +385,17 @@ struct mj_copyData {
|
|
|
374
385
|
}
|
|
375
386
|
};
|
|
376
387
|
|
|
388
|
+
struct mjv_copyData {
|
|
389
|
+
static constexpr char name[] = "mjv_copyData";
|
|
390
|
+
static constexpr char doc[] = "Copy mjData, skip large arrays not required for visualization.";
|
|
391
|
+
using type = mjData * (mjData *, const mjModel *, const mjData *);
|
|
392
|
+
static constexpr auto param_names = std::make_tuple("dest", "m", "src");
|
|
393
|
+
|
|
394
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
395
|
+
return ::mjv_copyData;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
|
|
377
399
|
struct mj_resetData {
|
|
378
400
|
static constexpr char name[] = "mj_resetData";
|
|
379
401
|
static constexpr char doc[] = "Reset data to defaults.";
|
|
@@ -935,6 +957,17 @@ struct mj_crb {
|
|
|
935
957
|
}
|
|
936
958
|
};
|
|
937
959
|
|
|
960
|
+
struct mj_makeM {
|
|
961
|
+
static constexpr char name[] = "mj_makeM";
|
|
962
|
+
static constexpr char doc[] = "Make inertia matrix.";
|
|
963
|
+
using type = void (const mjModel *, mjData *);
|
|
964
|
+
static constexpr auto param_names = std::make_tuple("m", "d");
|
|
965
|
+
|
|
966
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
967
|
+
return ::mj_makeM;
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
|
|
938
971
|
struct mj_factorM {
|
|
939
972
|
static constexpr char name[] = "mj_factorM";
|
|
940
973
|
static constexpr char doc[] = "Compute sparse L'*D*L factorizaton of inertia matrix.";
|
|
@@ -1355,7 +1388,7 @@ struct mj_mulM2 {
|
|
|
1355
1388
|
|
|
1356
1389
|
struct mj_addM {
|
|
1357
1390
|
static constexpr char name[] = "mj_addM";
|
|
1358
|
-
static constexpr char doc[] = "Add inertia matrix to destination matrix. Destination can be sparse
|
|
1391
|
+
static constexpr char doc[] = "Add inertia matrix to destination matrix. Destination can be sparse or dense when all int* are NULL.";
|
|
1359
1392
|
using type = void (const mjModel *, mjData *, mjtNum *, int *, int *, int *);
|
|
1360
1393
|
static constexpr auto param_names = std::make_tuple("m", "d", "dst", "rownnz", "rowadr", "colind");
|
|
1361
1394
|
|
|
@@ -1727,17 +1760,6 @@ struct mjv_moveCamera {
|
|
|
1727
1760
|
}
|
|
1728
1761
|
};
|
|
1729
1762
|
|
|
1730
|
-
struct mjv_moveCameraFromState {
|
|
1731
|
-
static constexpr char name[] = "mjv_moveCameraFromState";
|
|
1732
|
-
static constexpr char doc[] = "Move camera with mouse given a scene state; action is mjtMouse.";
|
|
1733
|
-
using type = void (const mjvSceneState *, int, mjtNum, mjtNum, const mjvScene *, mjvCamera *);
|
|
1734
|
-
static constexpr auto param_names = std::make_tuple("scnstate", "action", "reldx", "reldy", "scn", "cam");
|
|
1735
|
-
|
|
1736
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1737
|
-
return ::mjv_moveCameraFromState;
|
|
1738
|
-
}
|
|
1739
|
-
};
|
|
1740
|
-
|
|
1741
1763
|
struct mjv_movePerturb {
|
|
1742
1764
|
static constexpr char name[] = "mjv_movePerturb";
|
|
1743
1765
|
static constexpr char doc[] = "Move perturb object with mouse; action is mjtMouse.";
|
|
@@ -1749,17 +1771,6 @@ struct mjv_movePerturb {
|
|
|
1749
1771
|
}
|
|
1750
1772
|
};
|
|
1751
1773
|
|
|
1752
|
-
struct mjv_movePerturbFromState {
|
|
1753
|
-
static constexpr char name[] = "mjv_movePerturbFromState";
|
|
1754
|
-
static constexpr char doc[] = "Move perturb object with mouse given a scene state; action is mjtMouse.";
|
|
1755
|
-
using type = void (const mjvSceneState *, int, mjtNum, mjtNum, const mjvScene *, mjvPerturb *);
|
|
1756
|
-
static constexpr auto param_names = std::make_tuple("scnstate", "action", "reldx", "reldy", "scn", "pert");
|
|
1757
|
-
|
|
1758
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1759
|
-
return ::mjv_movePerturbFromState;
|
|
1760
|
-
}
|
|
1761
|
-
};
|
|
1762
|
-
|
|
1763
1774
|
struct mjv_moveModel {
|
|
1764
1775
|
static constexpr char name[] = "mjv_moveModel";
|
|
1765
1776
|
static constexpr char doc[] = "Move model with mouse; action is mjtMouse.";
|
|
@@ -1914,17 +1925,6 @@ struct mjv_updateScene {
|
|
|
1914
1925
|
}
|
|
1915
1926
|
};
|
|
1916
1927
|
|
|
1917
|
-
struct mjv_updateSceneFromState {
|
|
1918
|
-
static constexpr char name[] = "mjv_updateSceneFromState";
|
|
1919
|
-
static constexpr char doc[] = "Update entire scene from a scene state, return the number of new mjWARN_VGEOMFULL warnings.";
|
|
1920
|
-
using type = int (const mjvSceneState *, const mjvOption *, const mjvPerturb *, mjvCamera *, int, mjvScene *);
|
|
1921
|
-
static constexpr auto param_names = std::make_tuple("scnstate", "opt", "pert", "cam", "catmask", "scn");
|
|
1922
|
-
|
|
1923
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1924
|
-
return ::mjv_updateSceneFromState;
|
|
1925
|
-
}
|
|
1926
|
-
};
|
|
1927
|
-
|
|
1928
1928
|
struct mjv_copyModel {
|
|
1929
1929
|
static constexpr char name[] = "mjv_copyModel";
|
|
1930
1930
|
static constexpr char doc[] = "Copy mjModel, skip large arrays not required for abstract visualization.";
|
|
@@ -1936,50 +1936,6 @@ struct mjv_copyModel {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
};
|
|
1938
1938
|
|
|
1939
|
-
struct mjv_defaultSceneState {
|
|
1940
|
-
static constexpr char name[] = "mjv_defaultSceneState";
|
|
1941
|
-
static constexpr char doc[] = "Set default scene state.";
|
|
1942
|
-
using type = void (mjvSceneState *);
|
|
1943
|
-
static constexpr auto param_names = std::make_tuple("scnstate");
|
|
1944
|
-
|
|
1945
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1946
|
-
return ::mjv_defaultSceneState;
|
|
1947
|
-
}
|
|
1948
|
-
};
|
|
1949
|
-
|
|
1950
|
-
struct mjv_makeSceneState {
|
|
1951
|
-
static constexpr char name[] = "mjv_makeSceneState";
|
|
1952
|
-
static constexpr char doc[] = "Allocate resources and initialize a scene state object.";
|
|
1953
|
-
using type = void (const mjModel *, const mjData *, mjvSceneState *, int);
|
|
1954
|
-
static constexpr auto param_names = std::make_tuple("m", "d", "scnstate", "maxgeom");
|
|
1955
|
-
|
|
1956
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1957
|
-
return ::mjv_makeSceneState;
|
|
1958
|
-
}
|
|
1959
|
-
};
|
|
1960
|
-
|
|
1961
|
-
struct mjv_freeSceneState {
|
|
1962
|
-
static constexpr char name[] = "mjv_freeSceneState";
|
|
1963
|
-
static constexpr char doc[] = "Free scene state.";
|
|
1964
|
-
using type = void (mjvSceneState *);
|
|
1965
|
-
static constexpr auto param_names = std::make_tuple("scnstate");
|
|
1966
|
-
|
|
1967
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1968
|
-
return ::mjv_freeSceneState;
|
|
1969
|
-
}
|
|
1970
|
-
};
|
|
1971
|
-
|
|
1972
|
-
struct mjv_updateSceneState {
|
|
1973
|
-
static constexpr char name[] = "mjv_updateSceneState";
|
|
1974
|
-
static constexpr char doc[] = "Update a scene state from model and data.";
|
|
1975
|
-
using type = void (const mjModel *, mjData *, const mjvOption *, mjvSceneState *);
|
|
1976
|
-
static constexpr auto param_names = std::make_tuple("m", "d", "opt", "scnstate");
|
|
1977
|
-
|
|
1978
|
-
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
1979
|
-
return ::mjv_updateSceneState;
|
|
1980
|
-
}
|
|
1981
|
-
};
|
|
1982
|
-
|
|
1983
1939
|
struct mjv_addGeoms {
|
|
1984
1940
|
static constexpr char name[] = "mjv_addGeoms";
|
|
1985
1941
|
static constexpr char doc[] = "Add geoms from selected categories.";
|
|
@@ -3641,6 +3597,39 @@ struct mju_sigmoid {
|
|
|
3641
3597
|
}
|
|
3642
3598
|
};
|
|
3643
3599
|
|
|
3600
|
+
struct mjc_getSDF {
|
|
3601
|
+
static constexpr char name[] = "mjc_getSDF";
|
|
3602
|
+
static constexpr char doc[] = "get sdf from geom id";
|
|
3603
|
+
using type = const mjpPlugin * (const mjModel *, int);
|
|
3604
|
+
static constexpr auto param_names = std::make_tuple("m", "id");
|
|
3605
|
+
|
|
3606
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
3607
|
+
return ::mjc_getSDF;
|
|
3608
|
+
}
|
|
3609
|
+
};
|
|
3610
|
+
|
|
3611
|
+
struct mjc_distance {
|
|
3612
|
+
static constexpr char name[] = "mjc_distance";
|
|
3613
|
+
static constexpr char doc[] = "signed distance function";
|
|
3614
|
+
using type = mjtNum (const mjModel *, const mjData *, const mjSDF *, const mjtNum (*)[3]);
|
|
3615
|
+
static constexpr auto param_names = std::make_tuple("m", "d", "s", "x");
|
|
3616
|
+
|
|
3617
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
3618
|
+
return *reinterpret_cast<type*>(&::mjc_distance);
|
|
3619
|
+
}
|
|
3620
|
+
};
|
|
3621
|
+
|
|
3622
|
+
struct mjc_gradient {
|
|
3623
|
+
static constexpr char name[] = "mjc_gradient";
|
|
3624
|
+
static constexpr char doc[] = "gradient of sdf";
|
|
3625
|
+
using type = void (const mjModel *, const mjData *, const mjSDF *, mjtNum (*)[3], const mjtNum (*)[3]);
|
|
3626
|
+
static constexpr auto param_names = std::make_tuple("m", "d", "s", "gradient", "x");
|
|
3627
|
+
|
|
3628
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
3629
|
+
return *reinterpret_cast<type*>(&::mjc_gradient);
|
|
3630
|
+
}
|
|
3631
|
+
};
|
|
3632
|
+
|
|
3644
3633
|
struct mjd_transitionFD {
|
|
3645
3634
|
static constexpr char name[] = "mjd_transitionFD";
|
|
3646
3635
|
static constexpr char doc[] = "Finite differenced transition matrices (control theory notation) d(x_next) = A*dx + B*du d(sensor) = C*dx + D*du required output matrix dimensions: A: (2*nv+na x 2*nv+na) B: (2*nv+na x nu) D: (nsensordata x 2*nv+na) C: (nsensordata x nu)";
|
|
@@ -4180,6 +4169,94 @@ struct mjs_addDefault {
|
|
|
4180
4169
|
}
|
|
4181
4170
|
};
|
|
4182
4171
|
|
|
4172
|
+
struct mjs_setToMotor {
|
|
4173
|
+
static constexpr char name[] = "mjs_setToMotor";
|
|
4174
|
+
static constexpr char doc[] = "Set actuator to motor, return error if any.";
|
|
4175
|
+
using type = const char * (mjsActuator *);
|
|
4176
|
+
static constexpr auto param_names = std::make_tuple("actuator");
|
|
4177
|
+
|
|
4178
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4179
|
+
return ::mjs_setToMotor;
|
|
4180
|
+
}
|
|
4181
|
+
};
|
|
4182
|
+
|
|
4183
|
+
struct mjs_setToPosition {
|
|
4184
|
+
static constexpr char name[] = "mjs_setToPosition";
|
|
4185
|
+
static constexpr char doc[] = "Set actuator to position, return error if any.";
|
|
4186
|
+
using type = const char * (mjsActuator *, double, double (*)[1], double (*)[1], double (*)[1], double);
|
|
4187
|
+
static constexpr auto param_names = std::make_tuple("actuator", "kp", "kv", "dampratio", "timeconst", "inheritrange");
|
|
4188
|
+
|
|
4189
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4190
|
+
return *reinterpret_cast<type*>(&::mjs_setToPosition);
|
|
4191
|
+
}
|
|
4192
|
+
};
|
|
4193
|
+
|
|
4194
|
+
struct mjs_setToIntVelocity {
|
|
4195
|
+
static constexpr char name[] = "mjs_setToIntVelocity";
|
|
4196
|
+
static constexpr char doc[] = "Set actuator to integrated velocity, return error if any.";
|
|
4197
|
+
using type = const char * (mjsActuator *, double, double (*)[1], double (*)[1], double (*)[1], double);
|
|
4198
|
+
static constexpr auto param_names = std::make_tuple("actuator", "kp", "kv", "dampratio", "timeconst", "inheritrange");
|
|
4199
|
+
|
|
4200
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4201
|
+
return *reinterpret_cast<type*>(&::mjs_setToIntVelocity);
|
|
4202
|
+
}
|
|
4203
|
+
};
|
|
4204
|
+
|
|
4205
|
+
struct mjs_setToVelocity {
|
|
4206
|
+
static constexpr char name[] = "mjs_setToVelocity";
|
|
4207
|
+
static constexpr char doc[] = "Set actuator to velocity servo, return error if any.";
|
|
4208
|
+
using type = const char * (mjsActuator *, double);
|
|
4209
|
+
static constexpr auto param_names = std::make_tuple("actuator", "kv");
|
|
4210
|
+
|
|
4211
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4212
|
+
return ::mjs_setToVelocity;
|
|
4213
|
+
}
|
|
4214
|
+
};
|
|
4215
|
+
|
|
4216
|
+
struct mjs_setToDamper {
|
|
4217
|
+
static constexpr char name[] = "mjs_setToDamper";
|
|
4218
|
+
static constexpr char doc[] = "Set actuator to activate damper, return error if any.";
|
|
4219
|
+
using type = const char * (mjsActuator *, double);
|
|
4220
|
+
static constexpr auto param_names = std::make_tuple("actuator", "kv");
|
|
4221
|
+
|
|
4222
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4223
|
+
return ::mjs_setToDamper;
|
|
4224
|
+
}
|
|
4225
|
+
};
|
|
4226
|
+
|
|
4227
|
+
struct mjs_setToCylinder {
|
|
4228
|
+
static constexpr char name[] = "mjs_setToCylinder";
|
|
4229
|
+
static constexpr char doc[] = "Set actuator to hydraulic or pneumatic cylinder, return error if any.";
|
|
4230
|
+
using type = const char * (mjsActuator *, double, double, double, double);
|
|
4231
|
+
static constexpr auto param_names = std::make_tuple("actuator", "timeconst", "bias", "area", "diameter");
|
|
4232
|
+
|
|
4233
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4234
|
+
return ::mjs_setToCylinder;
|
|
4235
|
+
}
|
|
4236
|
+
};
|
|
4237
|
+
|
|
4238
|
+
struct mjs_setToMuscle {
|
|
4239
|
+
static constexpr char name[] = "mjs_setToMuscle";
|
|
4240
|
+
static constexpr char doc[] = "Set actuator to muscle, return error if any.a";
|
|
4241
|
+
using type = const char * (mjsActuator *, double (*)[2], double, double (*)[2], double, double, double, double, double, double, double);
|
|
4242
|
+
static constexpr auto param_names = std::make_tuple("actuator", "timeconst", "tausmooth", "range", "force", "scale", "lmin", "lmax", "vmax", "fpmax", "fvmax");
|
|
4243
|
+
|
|
4244
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4245
|
+
return *reinterpret_cast<type*>(&::mjs_setToMuscle);
|
|
4246
|
+
}
|
|
4247
|
+
};
|
|
4248
|
+
|
|
4249
|
+
struct mjs_setToAdhesion {
|
|
4250
|
+
static constexpr char name[] = "mjs_setToAdhesion";
|
|
4251
|
+
static constexpr char doc[] = "Set actuator to active adhesion, return error if any.";
|
|
4252
|
+
using type = const char * (mjsActuator *, double);
|
|
4253
|
+
static constexpr auto param_names = std::make_tuple("actuator", "gain");
|
|
4254
|
+
|
|
4255
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4256
|
+
return ::mjs_setToAdhesion;
|
|
4257
|
+
}
|
|
4258
|
+
};
|
|
4259
|
+
|
|
4183
4260
|
struct mjs_addMesh {
|
|
4184
4261
|
static constexpr char name[] = "mjs_addMesh";
|
|
4185
4262
|
static constexpr char doc[] = "Add mesh.";
|
|
@@ -4554,6 +4631,17 @@ struct mjs_getDouble {
|
|
|
4554
4631
|
}
|
|
4555
4632
|
};
|
|
4556
4633
|
|
|
4634
|
+
struct mjs_getPluginAttributes {
|
|
4635
|
+
static constexpr char name[] = "mjs_getPluginAttributes";
|
|
4636
|
+
static constexpr char doc[] = "Get plugin attributes.";
|
|
4637
|
+
using type = const void * (const mjsPlugin *);
|
|
4638
|
+
static constexpr auto param_names = std::make_tuple("plugin");
|
|
4639
|
+
|
|
4640
|
+
MUJOCO_ALWAYS_INLINE static type& GetFunc() {
|
|
4641
|
+
return ::mjs_getPluginAttributes;
|
|
4642
|
+
}
|
|
4643
|
+
};
|
|
4644
|
+
|
|
4557
4645
|
struct mjs_setDefault {
|
|
4558
4646
|
static constexpr char name[] = "mjs_setDefault";
|
|
4559
4647
|
static constexpr char doc[] = "Set element's default.";
|
|
@@ -211,6 +211,7 @@ PYBIND11_MODULE(_functions, pymodule) {
|
|
|
211
211
|
Def<traits::mj_tendon>(pymodule);
|
|
212
212
|
Def<traits::mj_transmission>(pymodule);
|
|
213
213
|
Def<traits::mj_crb>(pymodule);
|
|
214
|
+
Def<traits::mj_makeM>(pymodule);
|
|
214
215
|
Def<traits::mj_factorM>(pymodule);
|
|
215
216
|
DEF_WITH_OMITTED_PY_ARGS(traits::mj_solveM, "n")(
|
|
216
217
|
pymodule,
|
|
@@ -1467,10 +1468,10 @@ PYBIND11_MODULE(_functions, pymodule) {
|
|
|
1467
1468
|
|
|
1468
1469
|
pymodule.def(
|
|
1469
1470
|
"_realloc_con_efc",
|
|
1470
|
-
[](MjDataWrapper& d, int ncon, int nefc) {
|
|
1471
|
+
[](MjDataWrapper& d, int ncon, int nefc, int nJ) {
|
|
1471
1472
|
raw::MjData* data = d.get();
|
|
1472
1473
|
|
|
1473
|
-
auto cleanup = [](raw::MjData* data) {
|
|
1474
|
+
auto cleanup = [](raw::MjData* data, int nJ) {
|
|
1474
1475
|
#ifdef ADDRESS_SANITIZER
|
|
1475
1476
|
ASAN_POISON_MEMORY_REGION(
|
|
1476
1477
|
static_cast<char*>(data->arena),
|
|
@@ -1479,6 +1480,7 @@ PYBIND11_MODULE(_functions, pymodule) {
|
|
|
1479
1480
|
data->parena = 0;
|
|
1480
1481
|
data->ncon = 0;
|
|
1481
1482
|
data->nefc = 0;
|
|
1483
|
+
if (nJ > -1) data->nJ = 0;
|
|
1482
1484
|
data->contact = static_cast<raw::MjContact*>(data->arena);
|
|
1483
1485
|
#define X(type, name, nr, nc) data->name = nullptr;
|
|
1484
1486
|
MJDATA_ARENA_POINTERS_SOLVER
|
|
@@ -1486,14 +1488,15 @@ PYBIND11_MODULE(_functions, pymodule) {
|
|
|
1486
1488
|
#undef X
|
|
1487
1489
|
};
|
|
1488
1490
|
|
|
1489
|
-
cleanup(data);
|
|
1491
|
+
cleanup(data, nJ);
|
|
1490
1492
|
data->ncon = ncon;
|
|
1491
1493
|
data->nefc = nefc;
|
|
1494
|
+
if (nJ > -1) data->nJ = nJ;
|
|
1492
1495
|
data->contact =
|
|
1493
1496
|
static_cast<raw::MjContact*>(InterceptMjErrors(::mj_arenaAllocByte)(
|
|
1494
1497
|
data, ncon * sizeof(raw::MjContact), alignof(raw::MjContact)));
|
|
1495
1498
|
if (!data->contact) {
|
|
1496
|
-
cleanup(data);
|
|
1499
|
+
cleanup(data, nJ);
|
|
1497
1500
|
throw FatalError("insufficient arena memory available");
|
|
1498
1501
|
}
|
|
1499
1502
|
|
|
@@ -1505,7 +1508,7 @@ PYBIND11_MODULE(_functions, pymodule) {
|
|
|
1505
1508
|
data->name = static_cast<type*>(InterceptMjErrors(::mj_arenaAllocByte)( \
|
|
1506
1509
|
data, sizeof(type) * (nr) * (nc), alignof(type))); \
|
|
1507
1510
|
if (!data->name) { \
|
|
1508
|
-
cleanup(data); \
|
|
1511
|
+
cleanup(data, nJ); \
|
|
1509
1512
|
throw FatalError("insufficient arena memory available"); \
|
|
1510
1513
|
}
|
|
1511
1514
|
|
|
@@ -1519,7 +1522,7 @@ PYBIND11_MODULE(_functions, pymodule) {
|
|
|
1519
1522
|
#undef MJ_M
|
|
1520
1523
|
#define MJ_M(x) x
|
|
1521
1524
|
},
|
|
1522
|
-
py::arg("d"), py::arg("ncon"), py::arg("nefc"),
|
|
1525
|
+
py::arg("d"), py::arg("ncon"), py::arg("nefc"), py::arg("nJ") = -1,
|
|
1523
1526
|
py::call_guard<py::gil_scoped_release>());
|
|
1524
1527
|
} // PYBIND11_MODULE NOLINT(readability/fn_size)
|
|
1525
1528
|
} // namespace
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
X( int, light_, mode, nlight, 1 ) \
|
|
153
153
|
X( int, light_, bodyid, nlight, 1 ) \
|
|
154
154
|
X( int, light_, targetbodyid, nlight, 1 ) \
|
|
155
|
-
X(
|
|
155
|
+
X( int, light_, type, nlight, 1 ) \
|
|
156
156
|
X( mjtByte, light_, castshadow, nlight, 1 ) \
|
|
157
157
|
X( mjtByte, light_, active, nlight, 1 ) \
|
|
158
158
|
X( mjtNum, light_, pos, nlight, 3 ) \
|
|
@@ -99,8 +99,13 @@ class MjFunctionVisitor:
|
|
|
99
99
|
return ''.join(strings)
|
|
100
100
|
|
|
101
101
|
def visit(self, node: ClangJsonNode) -> None:
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
# Skip mjs_setUserValueWithCleanup as it's only useful for heap allocated
|
|
103
|
+
# objects and doesn't need a python wrapper.
|
|
104
|
+
if (
|
|
105
|
+
node.get('kind') == 'FunctionDecl'
|
|
106
|
+
and node.get('name', '').startswith('mj')
|
|
107
|
+
and node.get('name', '') != 'mjs_setUserValueWithCleanup'
|
|
108
|
+
):
|
|
104
109
|
func_decl = self._make_function(node)
|
|
105
110
|
self._functions[func_decl.name] = func_decl
|
|
106
111
|
|
|
@@ -111,6 +111,17 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|
|
111
111
|
('mjCAMLIGHT_TARGETBODYCOM', 4),
|
|
112
112
|
]),
|
|
113
113
|
)),
|
|
114
|
+
('mjtLightType',
|
|
115
|
+
EnumDecl(
|
|
116
|
+
name='mjtLightType',
|
|
117
|
+
declname='enum mjtLightType_',
|
|
118
|
+
values=dict([
|
|
119
|
+
('mjLIGHT_SPOT', 0),
|
|
120
|
+
('mjLIGHT_DIRECTIONAL', 1),
|
|
121
|
+
('mjLIGHT_POINT', 2),
|
|
122
|
+
('mjLIGHT_IMAGE', 3),
|
|
123
|
+
]),
|
|
124
|
+
)),
|
|
114
125
|
('mjtTexture',
|
|
115
126
|
EnumDecl(
|
|
116
127
|
name='mjtTexture',
|
|
@@ -139,6 +150,16 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|
|
139
150
|
('mjNTEXROLE', 10),
|
|
140
151
|
]),
|
|
141
152
|
)),
|
|
153
|
+
('mjtColorSpace',
|
|
154
|
+
EnumDecl(
|
|
155
|
+
name='mjtColorSpace',
|
|
156
|
+
declname='enum mjtColorSpace_',
|
|
157
|
+
values=dict([
|
|
158
|
+
('mjCOLORSPACE_AUTO', 0),
|
|
159
|
+
('mjCOLORSPACE_LINEAR', 1),
|
|
160
|
+
('mjCOLORSPACE_SRGB', 2),
|
|
161
|
+
]),
|
|
162
|
+
)),
|
|
142
163
|
('mjtIntegrator',
|
|
143
164
|
EnumDecl(
|
|
144
165
|
name='mjtIntegrator',
|
|
@@ -428,6 +449,17 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|
|
428
449
|
('mjFLEXSELF_AUTO', 4),
|
|
429
450
|
]),
|
|
430
451
|
)),
|
|
452
|
+
('mjtSDFType',
|
|
453
|
+
EnumDecl(
|
|
454
|
+
name='mjtSDFType',
|
|
455
|
+
declname='enum mjtSDFType_',
|
|
456
|
+
values=dict([
|
|
457
|
+
('mjSDFTYPE_SINGLE', 0),
|
|
458
|
+
('mjSDFTYPE_INTERSECTION', 1),
|
|
459
|
+
('mjSDFTYPE_MIDSURFACE', 2),
|
|
460
|
+
('mjSDFTYPE_COLLISION', 3),
|
|
461
|
+
]),
|
|
462
|
+
)),
|
|
431
463
|
('mjtTaskStatus',
|
|
432
464
|
EnumDecl(
|
|
433
465
|
name='mjtTaskStatus',
|