Skip to content

Swept volumes / Motion envelopes #1824

Closed

Description

@alecjacobson

Description

Given an object with articulated (piecewise rigid) motion, construct a mesh of the swept volume.

A satisfying minimal viable product would be dense SDF stamping over time, possibly employing some of the early exit tricks that libigl uses.

It would be interesting to improve on this for more accurate, conservative and efficient swept volumes. Perhaps incorporating the spatial continuation root-finding ideas from " Swept Volumes via Spacetime Numerical Continuation".

SDF output should be ready to feed into the marching cubes (or better isosurfacenets) for meshing.

A meaningful high-level API, might take a list of meshes and corresponding list of rigid-motion functions over time and outputs a dense grid SDF.

field  = wp.geometry.swept_volume( ...
   mesh_ids,
   motion_functions,
   nx,ny,nz,
   time_samples) 

Context

Robotics clearance zones.

Activity

  1. self-assigned this
    on Aug 21, 2026
  2. 46 remaining items

  3. shi-eric commented on Sep 11, 2026

    @shi-eric
    Contributor

    This is addressed by f76830f.

    The commit provides the dense time-stamping baseline requested here: evaluate the minimum signed distance over all meshes and sampled rigid poses, return a dense field, and extract a triangle mesh with marching cubes. The included example demonstrates a two-link articulated arm and can also load an animated USD assembly. Closing this issue as completed.

    Public API behavior

    • In Python, warp.geometry.swept_volume_field(meshes, transforms, ...) returns (field, lower, upper). Supply pre-sampled rigid transforms instead of motion callbacks, and choose either voxel_size or resolution=(nx, ny, nz). The field can be passed directly to wp.MarchingCubes.extract_surface_marching_cubes() using the returned domain corners.
    • swept_volume_mesh() combines field evaluation and extraction; swept_volume_bounds() helps size a shared domain. The default winding-number classifier requires meshes constructed with support_winding_number=True; SweptVolumeSignMode selects alternatives.
    • swept_volume_sdf() evaluates individual points inside Warp kernels. The result is a pseudo signed-distance field: taking the minimum preserves the sampled union’s sign and zero set, but does not generally give its exact interior distance. Autodiff is not supported.

    Test coverage

    • New tests in warp/tests/geometry/test_swept_volume.py cover translating spheres (test_swept_sphere_is_a_capsule), multiple meshes (test_union_of_two_static_spheres), rotation (test_rotation_pose), and sampled-pose enclosure (test_conservative_encloses_all_poses), along with sign modes, grid sizing, explicit domains, and argument validation.
    • warp/tests/test_examples.py adds TestGeometryExamples.test_geometry.example_swept_volume for the articulated-arm example. Both new test classes are registered in the default suite.

    Behavioral verification

    All 48 swept-volume test cases passed across CPU and two CUDA devices, and the example smoke tests passed on CPU and CUDA. A separate two-link articulated-motion check matched an analytic reference over 20,677 grid nodes on CPU and CUDA; direct field extraction and swept_volume_mesh() produced matching closed meshes.

    Follow-up to consider

    • Adaptive sampling, acceleration, and spacetime numerical continuation remain future work beyond the requested minimum viable implementation. Motion between supplied poses is not conservatively bounded, so temporal sampling still controls gaps and accuracy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature requestRequest for something to be added

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions