File tree Expand file tree Collapse file tree
python/mujoco/experimental/studio Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ set(STUDIO_COMMON_LIBS
2323 structs_wrappers
2424)
2525
26- mujoco_pybind11_module (parser parser.cc )
27- target_link_libraries (parser PRIVATE ${STUDIO_COMMON_LIBS} )
28-
2926mujoco_pybind11_module (native_viewer_cc native_viewer.cc )
3027target_link_libraries (native_viewer_cc PRIVATE ${STUDIO_COMMON_LIBS} )
3128
@@ -39,7 +36,6 @@ mujoco_pybind11_module(sim sim.cc)
3936target_link_libraries (sim PRIVATE ${STUDIO_COMMON_LIBS} )
4037
4138set (MUJOCO_STUDIO_TARGETS
42- parser
4339 native_viewer_cc
4440 renderer
4541 ux
@@ -73,7 +69,6 @@ set_target_properties(implot PROPERTIES
7369# when linking both GLFW (via Filament) and SDL2 statically on Linux.
7470if (UNIX AND NOT APPLE )
7571 set (STUDIO_PY_MODULES
76- parser
7772 native_viewer_cc
7873 renderer
7974 ux
@@ -86,7 +81,6 @@ endif()
8681
8782if (APPLE )
8883 set (STUDIO_PY_MODULES
89- parser
9084 native_viewer_cc
9185 renderer
9286 ux
Load diff This file was deleted.
Original file line number Diff line number Diff line change 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+ # https://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+ """Loads and compiles MuJoCo models for the studio viewer."""
15+
16+ import mujoco
17+
18+
19+ def parse (filepath : str ) -> mujoco .MjData :
20+ if filepath .endswith ('.mjb' ):
21+ model = mujoco .MjModel .from_binary_path (filepath )
22+ else :
23+ model = mujoco .MjSpec .from_file (filepath ).compile ()
24+ return mujoco .MjData (model )
You can’t perform that action at this time.
0 commit comments