aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Berger <contact@thierryberger.com>2024-06-03 15:20:24 +0200
committerThierry Berger <contact@thierryberger.com>2024-06-03 15:20:24 +0200
commite1ed90603e618e28f48916690d761e0d8213e2ad (patch)
tree8399da9825ca9ee8edd601b1265e818fa303b541
parentfe336b9b98d5825544ad3a153a84cb59dc9171c6 (diff)
parent856675032e76b6eb4bc9e0be4dc87abdbcfe0421 (diff)
downloadrapier-e1ed90603e618e28f48916690d761e0d8213e2ad.tar.gz
rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.tar.bz2
rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.zip
Merge branch 'master' into collider-builder-debug
-rw-r--r--.github/workflows/rapier-ci-build.yml8
-rw-r--r--CHANGELOG.md321
-rw-r--r--Cargo.toml4
-rw-r--r--README.md28
-rw-r--r--benchmarks2d/all_benchmarks2.rs4
-rw-r--r--benchmarks2d/vertical_stacks2.rs61
-rw-r--r--benchmarks3d/all_benchmarks3.rs4
-rw-r--r--benchmarks3d/ccd3.rs4
-rw-r--r--benchmarks3d/many_pyramids3.rs80
-rw-r--r--benchmarks3d/many_sleep3.rs54
-rw-r--r--crates/rapier2d-f64/Cargo.toml48
-rw-r--r--crates/rapier2d/Cargo.toml48
-rw-r--r--crates/rapier3d-f64/Cargo.toml46
-rw-r--r--crates/rapier3d/Cargo.toml48
-rw-r--r--crates/rapier_testbed2d-f64/Cargo.toml54
-rw-r--r--crates/rapier_testbed2d/Cargo.toml54
-rw-r--r--crates/rapier_testbed3d-f64/Cargo.toml54
-rw-r--r--crates/rapier_testbed3d/Cargo.toml58
-rw-r--r--examples2d/all_examples2.rs33
-rw-r--r--examples2d/character_controller2.rs14
-rw-r--r--examples2d/debug_compression2.rs75
-rw-r--r--examples2d/debug_total_overlap2.rs28
-rw-r--r--examples2d/debug_vertical_column2.rs47
-rw-r--r--examples2d/inverse_kinematics2.rs96
-rw-r--r--examples2d/s2d_arch.rs109
-rw-r--r--examples2d/s2d_ball_and_chain.rs73
-rw-r--r--examples2d/s2d_bridge.rs56
-rw-r--r--examples2d/s2d_card_house.rs78
-rw-r--r--examples2d/s2d_confined.rs69
-rw-r--r--examples2d/s2d_far_pyramid.rs50
-rw-r--r--examples2d/s2d_high_mass_ratio_1.rs66
-rw-r--r--examples2d/s2d_high_mass_ratio_2.rs53
-rw-r--r--examples2d/s2d_high_mass_ratio_3.rs47
-rw-r--r--examples2d/s2d_joint_grid.rs63
-rw-r--r--examples2d/s2d_pyramid.rs47
-rw-r--r--examples2d/trimesh2.rs7
-rw-r--r--examples3d-f64/debug_serialized3.rs2
-rw-r--r--examples3d/all_examples3.rs8
-rw-r--r--examples3d/character_controller3.rs77
-rw-r--r--examples3d/convex_decomposition3.rs125
-rw-r--r--examples3d/debug_deserialize3.rs2
-rw-r--r--examples3d/debug_internal_edges3.rs3
-rw-r--r--examples3d/debug_pop3.rs42
-rw-r--r--examples3d/debug_thin_cube_on_mesh3.rs56
-rw-r--r--examples3d/dynamic_trimesh3.rs145
-rw-r--r--examples3d/inverse_kinematics3.rs103
-rw-r--r--examples3d/vehicle_joints3.rs8
-rw-r--r--src/control/character_controller.rs247
-rw-r--r--src/control/ray_cast_vehicle_controller.rs6
-rw-r--r--src/counters/mod.rs18
-rw-r--r--src/counters/solver_counters.rs17
-rw-r--r--src/counters/stages_counters.rs14
-rw-r--r--src/data/graph.rs2
-rw-r--r--src/data/pubsub.rs24
-rw-r--r--src/dynamics/ccd/toi_entry.rs4
-rw-r--r--src/dynamics/integration_parameters.rs285
-rw-r--r--src/dynamics/island_manager.rs14
-rw-r--r--src/dynamics/joint/generic_joint.rs18
-rw-r--r--src/dynamics/joint/multibody_joint/mod.rs2
-rw-r--r--src/dynamics/joint/multibody_joint/multibody.rs217
-rw-r--r--src/dynamics/joint/multibody_joint/multibody_ik.rs238
-rw-r--r--src/dynamics/joint/multibody_joint/multibody_joint_set.rs11
-rw-r--r--src/dynamics/joint/multibody_joint/multibody_link.rs2
-rw-r--r--src/dynamics/rigid_body.rs159
-rw-r--r--src/dynamics/rigid_body_components.rs23
-rw-r--r--src/dynamics/rigid_body_set.rs2
-rw-r--r--src/dynamics/solver/contact_constraint/contact_constraints_set.rs12
-rw-r--r--src/dynamics/solver/contact_constraint/generic_one_body_constraint.rs30
-rw-r--r--src/dynamics/solver/contact_constraint/generic_one_body_constraint_element.rs86
-rw-r--r--src/dynamics/solver/contact_constraint/generic_two_body_constraint.rs62
-rw-r--r--src/dynamics/solver/contact_constraint/generic_two_body_constraint_element.rs196
-rw-r--r--src/dynamics/solver/contact_constraint/one_body_constraint.rs116
-rw-r--r--src/dynamics/solver/contact_constraint/one_body_constraint_element.rs165
-rw-r--r--src/dynamics/solver/contact_constraint/one_body_constraint_simd.rs134
-rw-r--r--src/dynamics/solver/contact_constraint/two_body_constraint.rs139
-rw-r--r--src/dynamics/solver/contact_constraint/two_body_constraint_element.rs243
-rw-r--r--src/dynamics/solver/contact_constraint/two_body_constraint_simd.rs151
-rw-r--r--src/dynamics/solver/island_solver.rs10
-rw-r--r--src/dynamics/solver/joint_constraint/joint_constraint_builder.rs78
-rw-r--r--src/dynamics/solver/joint_constraint/joint_generic_constraint_builder.rs22
-rw-r--r--src/dynamics/solver/joint_constraint/joint_velocity_constraint.rs43
-rw-r--r--src/dynamics/solver/solver_constraints_set.rs3
-rw-r--r--src/dynamics/solver/solver_vel.rs9
-rw-r--r--src/dynamics/solver/velocity_solver.rs25
-rw-r--r--src/geometry/broad_phase.rs50
-rw-r--r--src/geometry/broad_phase_multi_sap/broad_phase_multi_sap.rs (renamed from src/geometry/broad_phase_multi_sap/broad_phase.rs)184
-rw-r--r--src/geometry/broad_phase_multi_sap/mod.rs5
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_axis.rs4
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_layer.rs20
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_proxy.rs24
-rw-r--r--src/geometry/broad_phase_multi_sap/sap_region.rs18
-rw-r--r--src/geometry/broad_phase_qbvh.rs13
-rw-r--r--src/geometry/collider.rs143
-rw-r--r--src/geometry/collider_components.rs4
-rw-r--r--src/geometry/contact_pair.rs44
-rw-r--r--src/geometry/mod.rs17
-rw-r--r--src/geometry/narrow_phase.rs124
-rw-r--r--src/lib.rs9
-rw-r--r--src/pipeline/collision_pipeline.rs15
-rw-r--r--src/pipeline/debug_render_pipeline/debug_render_pipeline.rs12
-rw-r--r--src/pipeline/physics_pipeline.rs113
-rw-r--r--src/pipeline/query_pipeline.rs33
-rw-r--r--src/pipeline/user_changes.rs6
-rw-r--r--src/utils.rs165
-rw-r--r--src_testbed/camera2d.rs2
-rw-r--r--src_testbed/camera3d.rs2
-rw-r--r--src_testbed/debug_render.rs6
-rw-r--r--src_testbed/graphics.rs26
-rw-r--r--src_testbed/harness/mod.rs4
-rw-r--r--src_testbed/lib.rs2
-rw-r--r--src_testbed/mouse.rs46
-rw-r--r--src_testbed/objects/node.rs84
-rw-r--r--src_testbed/physics/mod.rs62
-rw-r--r--src_testbed/plugin.rs6
-rw-r--r--src_testbed/testbed.rs176
-rw-r--r--src_testbed/ui.rs189
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 war