Files
Mujoco_WASM/test/engine/CMakeLists.txt
T
Saran Tunyasuvunakool b362cb4972 Expose a handle for the Python viewer.
This change also requires user scripts to explicitly synchronize changes to physics state to the viewer. The Simulate class was reconfigured so that certain UI events are handled during this sync operation, outside of the render loop on the main thread. These correspond to operations that require access to the full mjModel/mjData.

To support other, more interactive operations (e.g. camera movements), a new mjvSceneState struct is introduced which captures only the portion of the physics state required for scene re-rendering. The mjvSceneState is updated from mjModel/mjData during the viewer sync operation, and is significantly cheaper than a full mj_copyModel and mj_copyData.

Fixes https://github.com/deepmind/mujoco/issues/796

PiperOrigin-RevId: 525723636
Change-Id: Id08d0210a2c067d5afe85e2bf104f276aeddd75e
2023-04-20 05:59:19 -07:00

84 lines
2.5 KiB
CMake

# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
mujoco_test(engine_collision_convex_test)
target_link_libraries(engine_collision_convex_test fixture gmock)
mujoco_test(engine_collision_driver_test)
target_link_libraries(engine_collision_driver_test fixture gmock)
mujoco_test(engine_core_constraint_test)
target_link_libraries(engine_core_constraint_test fixture gmock)
mujoco_test(engine_core_smooth_test)
target_link_libraries(engine_core_smooth_test fixture gmock)
mujoco_test(engine_derivative_test)
target_link_libraries(engine_derivative_test fixture gmock)
mujoco_test(engine_forward_test)
target_link_libraries(engine_forward_test fixture gmock)
mujoco_test(engine_io_test)
target_link_libraries(
engine_io_test
fixture
gmock
absl::str_format
)
mujoco_test(engine_plugin_test)
target_link_libraries(
engine_plugin_test
fixture
gmock
absl::str_format
)
mujoco_test(engine_passive_test)
target_link_libraries(engine_passive_test fixture gmock)
mujoco_test(engine_print_test)
target_link_libraries(engine_print_test fixture gmock)
mujoco_test(engine_ray_test)
target_link_libraries(engine_ray_test fixture gmock)
mujoco_test(engine_resource_test)
target_link_libraries(engine_resource_test fixture gmock)
mujoco_test(engine_sensor_test)
target_link_libraries(engine_sensor_test fixture gmock)
mujoco_test(engine_support_test)
target_link_libraries(engine_support_test fixture gmock)
mujoco_test(engine_util_blas_test)
target_link_libraries(engine_util_blas_test fixture gmock)
mujoco_test(engine_util_errmem_test)
target_link_libraries(engine_util_errmem_test fixture gmock)
mujoco_test(engine_util_solve_test)
target_link_libraries(engine_util_solve_test fixture gmock)
mujoco_test(engine_util_spatial_test)
target_link_libraries(engine_util_spatial_test fixture gmock)
mujoco_test(engine_vfs_test)
target_link_libraries(engine_vfs_test fixture gmock)
mujoco_test(engine_vis_state_test)
target_link_libraries(engine_vis_state_test fixture gmock)