diff options
116 files changed, 5376 insertions, 1619 deletions
diff --git a/.github/workflows/rapier-ci-build.yml b/.github/workflows/rapier-ci-build.yml index 1b29d15..c38a1a5 100644 --- a/.github/workflows/rapier-ci-build.yml +++ b/.github/workflows/rapier-ci-build.yml @@ -13,7 +13,7 @@ jobs: check-fmt: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check formatting run: cargo fmt -- --check build-native: @@ -21,7 +21,7 @@ jobs: env: RUSTFLAGS: -D warnings steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: sudo apt-get install -y cmake libxcb-composite0-dev - name: Clippy run: cargo clippy @@ -60,7 +60,7 @@ jobs: env: RUSTFLAGS: -D warnings steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: rustup target add wasm32-unknown-unknown - name: build rapier2d run: cd crates/rapier2d && cargo build --verbose --features wasm-bindgen --target wasm32-unknown-unknown; @@ -71,7 +71,7 @@ jobs: env: RUSTFLAGS: -D warnings steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: rustup target add wasm32-unknown-emscripten - name: build rapier2d run: cd crates/rapier2d && cargo build --verbose --target wasm32-unknown-emscripten; diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f57869..f9ec4d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,96 @@ +## Unreleased + +### Added + +- Add `Multibody::inverse_kinematics`, `Multibody::inverse_kinematics_delta`, + and `::inverse_kinematics_delta_with_jacobian` + for running inverse kinematics on a multibody to align one its links pose to the given prescribed pose. +- Add `InverseKinematicsOption` to customize some behaviors of the inverse-kinematics solver. +- Add `Multibody::body_jacobian` to get the jacobian of a specific link. +- Add `Multibody::update_rigid_bodies` to update rigid-bodies based on the multibody links poses. +- Add `Multibody::forward_kinematics_single_link` to run forward-kinematics to compute the new pose and jacobian of a + single link without mutating the multibody. This can take an optional displacement on generalized coordinates that are + taken into account during transform propagation. + +### Modified + +- The contact constraints regularization parameters have been changed from `erp/damping_ratio` to + `natural_frequency/damping_ratio`. This helps define them in a timestep-length independent way. The new variables + are named `IntegrationParameters::contact_natural_frequency` and `IntegrationParameters::contact_damping_ratio`. +- The `IntegrationParameters::normalized_max_penetration_correction` has been replaced + by `::normalized_max_corrective_velocity` + to make the parameter more timestep-length independent. It is now set to a non-infinite value to eliminate aggressive + "popping effects". +- The `Multibody::forward_kinematics` method will no longer automatically update the poses of the `RigidBody` associated + to each joint. Instead `Multibody::update_rigid_bodies` has to be called explicitly. +- The `Multibody::forward_kinematics` method will automatically adjust the multibody’s degrees of freedom if the root + rigid-body changed type (between dynamic and non-dynamic). It can also optionally apply the root’s rigid-body pose + instead of the root link’s pose (useful for example if you modified the root rigid-body pose externally and wanted + to propagate it to the multibody). +- Remove an internal special-case for contact constraints on fast contacts. The doesn’t seem necessary with the substep + solver. + +## v0.19.0 (05 May 2024) + +### Fix + +- Fix crash when simulating a spring joint between two dynamic bodies. +- Fix kinematic bodies not being affected by gravity after being switched back to dynamic. +- Fix regression on contact force reporting from contact force events. +- Fix kinematic character controller getting stuck against vertical walls. +- Fix joint limits/motors occasionally not being applied properly when one of the attached + rigid-bodies is fixed. +- Fix an issue where contacts would be completely ignored between two convex shapes. + +### Added + +**Many stability improvements were added as part of this release. To see illustrations of some of these +changes, see [#625](https://github.com/dimforge/rapier/pull/625).** + +- Add `RigidBody::predict_position_using_velocity` to predict the next position of the rigid-body + based only on its current velocity. +- Add `Collider::copy_from` to copy most collider attributes to an existing collider. +- Add `RigidBody::copy_from` to copy most rigid-body attributes to an existing rigid-body. +- Add the `BroadPhase` trait and expect an implementor of this trait as input to `PhysicsPipeline::step`. +- Implement a 2D block-solver as well as warmstarting. Significantly improves stacking capabilities. Generally reduces + the "pop" effect that can happen due to penetration corrections. +- Add `RigidBodyBuilder::soft_ccd_prediction` and `RigidBody::set_soft_ccd_prediction` to enable `soft-ccd`: a form of + CCD based on predictive contacts. This is helpful for objects moving moderately fast. This form of CCD is generally + cheaper than the normal (time-dropping) CCD implemented so far. It is possible to combine both soft-ccd and + time-dropping ccd. +- Add a `ColliderBuilder::contact_skin`, `Collider::set_contact_skin`, and `Collider::contact_skin`. This forces the + solver te maintain a gap between colliders with non-zero contact skin, as if they had a slight margin around them. + This helps performance and stability for thin objects (like triangle meshes). +- Internal edges were reworked to avoid dropping contacts that would help with stability, and improve stability of + collisions between two triangle meshes. The `TriMeshFlags::FIX_INTERNAL_EDGES` and + `HeightFieldFlags::FIX_INTERNAL_EDGES` flags were added to enable internal edges handling. +- Add `IntegrationParameters::length_units` to automatically adjust internal thresholds when the user relies on custom + length units (e.g. pixels in 2D). + +### Modified + +**Many shape-casting related functions/structs were renamed. Check out the CHANGELOG for parry 0.15.0 for +additional details.** + +- Renamed `BroadPhase` to `BroadPhaseMultiSap`. The `BroadPhase` is now a trait that can be + implemented for providing a custom broad-phase to rapier. Equivalent |
