Files
Mujoco_WASM/test/engine/CMakeLists.txt
T
Alessio Quaglino b924ac66bd Add continuous-collision infrastructure for deformables
The discrete collision pipeline generates contact points at a configuration;
this module prices gaps along trajectories: differentiable vertex-triangle,
edge-edge and vertex-geom distance kernels with closest-point barycentrics,
swept-volume candidate generation over the flex bounding-volume hierarchy,
per-pair gap evaluation with the gradient's vertex weights, and a conservative
advancement that bounds each contact pair's time of impact.

Engine-internal, with no consumer in this change: it is the groundwork for
continuous-contact (IPC-style) solvers for flex, which will arrive as callers.
The mjcPair type carries the geometric identity of a candidate pair only;
solver state (multipliers, ages) and cached linearizations belong to the
consumer. The two lengths the module needs -- the standoff cap and the
detection band -- are caller-supplied parameters, not constants.

Flex-flex pairs measure their gap at the midsurface rather than skin-to-skin:
where mesh geometry is tighter than the combined radii (a string threaded
through a hem) a skin gap is permanently negative and the pair would be
discarded as invalid, losing CCD coverage exactly where tunneling is likeliest.
The broad phase adds the radii back into its reach, so detection range is
unchanged.

Tests cover the distance kernels, the geom sharp features, the pair gap with
its gradient checked by central differences at every involved vertex, the
conservative advancement (the analytic cap on a crossing sweep, the
conservative closing-rate bound, the small-motion early-out), and candidate
generation on stacked cloths (pairs within reach found, distant ones not).

PiperOrigin-RevId: 962197295
Change-Id: I90e017f4580a288b2a7d341830077fc273c9acde
2026-08-10 09:27:23 -07:00

87 lines
2.0 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_box_test ADDITIONAL_LINK_LIBRARIES ccd)
mujoco_test(engine_collision_continuous_test)
mujoco_test(engine_collision_convex_test)
mujoco_test(engine_collision_driver_test)
mujoco_test(engine_collision_gjk_test ADDITIONAL_LINK_LIBRARIES ccd)
mujoco_test(engine_core_constraint_test)
mujoco_test(engine_core_smooth_test ADDITIONAL_LINK_LIBRARIES absl::span)
mujoco_test(engine_core_util_test)
mujoco_test(engine_derivative_test)
mujoco_test(engine_forward_test)
mujoco_test(engine_inverse_test)
mujoco_test(engine_island_test)
mujoco_test(engine_io_test ADDITIONAL_LINK_LIBRARIES absl::str_format)
mujoco_test(
engine_plugin_test
ADDITIONAL_LINK_LIBRARIES
absl::str_format
PROPERTIES
ENVIRONMENT
"MUJOCO_PLUGIN_DIR=$<TARGET_FILE_DIR:elasticity>"
)
mujoco_test(engine_passive_test)
mujoco_test(engine_print_test)
mujoco_test(
engine_ray_test
PROPERTIES
ENVIRONMENT
"MUJOCO_PLUGIN_DIR=$<TARGET_FILE_DIR:sdf_plugin>")
mujoco_test(engine_sensor_test)
mujoco_test(engine_setconst_test)
mujoco_test(engine_sleep_test)
mujoco_test(engine_solver_test)
mujoco_test(engine_sort_test)
mujoco_test(engine_support_test)
mujoco_test(engine_thread_test)
mujoco_test(engine_util_blas_test)
mujoco_test(engine_util_errmem_test)
mujoco_test(engine_util_misc_test)
mujoco_test(engine_util_solve_test)
mujoco_test(engine_util_sparse_test)
mujoco_test(engine_util_spatial_test)
mujoco_test(engine_vis_visualize_test)