ipc-toolkit icon indicating copy to clipboard operation
ipc-toolkit copied to clipboard

Rigid and Affine Body Dynamics

Open zfergus opened this issue 5 months ago • 1 comments

Description

This pull request introduces support for rigid body dynamics simulation.

Rigid body dynamics support in Python bindings

  • Added a new dynamics module with subfolder rigid, including Simulator, RigidBodies, Pose, and Poses classes, and exposed them via pybind11 in the Python bindings

Improvements to CMake dependency management

  • Updated CPM versions and refactored third-party recipes to use the OPTIONS argument for configuration, improving clarity and maintainability.
  • Added a new CMake recipe for TinyGLTF and integrated it into the build.

Python usability improvements and new examples

  • Added a new example script demonstrating rigid body simulation and visualization using ipctk, meshio, and polyscope (python/examples/rigid.py).

Minor Python binding improvements

  • Changed save_obj method to write_obj in Candidates Python bindings for clarity.
  • Made CollisionMesh Python class use std::shared_ptr for better memory management.

Type of change

  • [x] New feature (non-breaking change which adds functionality)
  • [x] This change requires a documentation update

zfergus avatar Aug 18 '25 03:08 zfergus

Codecov Report

:x: Patch coverage is 77.25857% with 146 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 94.74%. Comparing base (c4753ba) to head (a5674a6).

Files with missing lines Patch % Lines
...rc/ipc/dynamics/affine/orthogonality_potential.cpp 34.88% 56 Missing :warning:
src/ipc/dynamics/rigid/mass.cpp 66.24% 53 Missing :warning:
src/ipc/dynamics/rigid/inertial_term.cpp 84.04% 15 Missing :warning:
src/ipc/candidates/candidates.cpp 0.00% 9 Missing :warning:
src/ipc/dynamics/rigid/rigid_body.cpp 89.83% 6 Missing :warning:
src/ipc/dynamics/rigid/rigid_body.hpp 50.00% 2 Missing :warning:
src/ipc/dynamics/rigid/time_integrator.hpp 90.47% 2 Missing :warning:
src/ipc/utils/sinc.hpp 0.00% 2 Missing :warning:
src/ipc/ccd/nonlinear_ccd.hpp 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #184      +/-   ##
==========================================
- Coverage   96.02%   94.74%   -1.28%     
==========================================
  Files         105      119      +14     
  Lines        8100     8738     +638     
==========================================
+ Hits         7778     8279     +501     
- Misses        322      459     +137     
Flag Coverage Δ
unittests 94.74% <77.25%> (-1.28%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Aug 18 '25 03:08 codecov[bot]